Skip to content

Commit

Permalink
ise_hammer: 7v IOI.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanda-phi committed Oct 3, 2024
1 parent 999dc0c commit fe0a267
Show file tree
Hide file tree
Showing 11 changed files with 1,599 additions and 66 deletions.
2 changes: 1 addition & 1 deletion databases/xc7v-tiledb.json

Large diffs are not rendered by default.

48 changes: 45 additions & 3 deletions docs/xilinx/virtex7/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ There are two genders of I/O banks:

In both cases, banks are 50 rows high. They have the following structure:

- row 0: contains a ``IOS_HP`` or ``IOS_HR`` tile with a single unpaired IOB
- rows 1-2, 3-4, 5-6, 7-8, ..., 45-46, 47-48: contain ``IOP_HP`` or ``IOP_HR`` tiles, which are two rows high and contain two IOBs each, forming a differential pair; ``IOB0`` is located in the bottom (odd) row and is the "complemented" pin of the pair, while ``IOB1`` is in the top (even) row and is the "true" pin of the pair
- row 49: contains another ``IOS_HP`` or ``IOS_HR`` tile
- row 0: contains a ``IO_HP_BOT`` or ``IO_HR_BOT`` tile with a single unpaired IOB
- rows 1-2, 3-4, 5-6, 7-8, ..., 45-46, 47-48: contain ``IO_HP_PAIR`` or ``IO_HR_PAIR`` tiles, which are two rows high and contain two IOBs each, forming a differential pair; ``IOB0`` is located in the bottom (odd) row and is the "complemented" pin of the pair, while ``IOB1`` is in the top (even) row and is the "true" pin of the pair
- row 49: contains another ``IO_HP_TOP`` or ``IO_HR_TOP`` tile
- HCLK row: contains an ``HCLK_IO_HP`` or ``HCLK_IO_HR`` tile with common bank circuitry

The single IOB in row 0 is the VRP pin for DCI. The single IOB in row 49 is VRN pin.
Expand Down Expand Up @@ -180,6 +180,48 @@ The devices also have dedicated configuration bank 0, which has no user I/O and
- ``TCK``, ``TDI``, ``TDO``, ``TMS``


Bitstream — ``IO_HP_PAIR``
==========================

.. raw:: html
:file: ../gen/tile-xc7v-IO_HP_PAIR.html


Bitstream — ``IO_HP_BOT``
=========================

.. raw:: html
:file: ../gen/tile-xc7v-IO_HP_BOT.html


Bitstream — ``IO_HP_TOP``
=========================

.. raw:: html
:file: ../gen/tile-xc7v-IO_HP_TOP.html


Bitstream — ``IO_HR_PAIR``
==========================

.. raw:: html
:file: ../gen/tile-xc7v-IO_HR_PAIR.html


Bitstream — ``IO_HR_BOT``
=========================

.. raw:: html
:file: ../gen/tile-xc7v-IO_HR_BOT.html


Bitstream — ``IO_HR_TOP``
=========================

.. raw:: html
:file: ../gen/tile-xc7v-IO_HR_TOP.html


Bitstream — ``HCLK_IOI_HP``
===========================

Expand Down
33 changes: 32 additions & 1 deletion prjcombine_ise_hammer/src/clk/virtex7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,29 @@ pub fn add_fuzzers<'a>(
]);
}
}
// TODO more IDELAYCTRL things
fuzz_one!(ctx, "PRESENT", "1", [], [(mode "IDELAYCTRL")]);
fuzz_enum!(ctx, "HIGH_PERFORMANCE_MODE", ["FALSE", "TRUE"], [(mode "IDELAYCTRL")]);
fuzz_one!(ctx, "MODE", "DEFAULT", [
(tile_mutex "IDELAYCTRL", "TEST"),
(mode "IDELAYCTRL")
], [
(attr "IDELAYCTRL_EN", "DEFAULT"),
(attr "BIAS_MODE", "2")
]);
fuzz_one!(ctx, "MODE", "FULL_0", [
(tile_mutex "IDELAYCTRL", "TEST"),
(mode "IDELAYCTRL")
], [
(attr "IDELAYCTRL_EN", "ENABLE"),
(attr "BIAS_MODE", "0")
]);
fuzz_one!(ctx, "MODE", "FULL_1", [
(tile_mutex "IDELAYCTRL", "TEST"),
(mode "IDELAYCTRL")
], [
(attr "IDELAYCTRL_EN", "ENABLE"),
(attr "BIAS_MODE", "1")
]);
}
{
let ctx = FuzzCtx::new(session, backend, tile, "HCLK_IOI", TileBits::Hclk);
Expand Down Expand Up @@ -1125,6 +1147,15 @@ pub fn collect_fuzzers(ctx: &mut CollectorCtx, bali_only: bool) {
],
"NONE",
);
ctx.state.get_diff(tile, bel, "PRESENT", "1").assert_empty();
ctx.collect_enum_bool(tile, bel, "HIGH_PERFORMANCE_MODE", "FALSE", "TRUE");
ctx.collect_enum_default(
tile,
bel,
"MODE",
&["DEFAULT", "FULL_0", "FULL_1"],
"NONE",
);
}
{
let bel = "HCLK_IOI";
Expand Down
36 changes: 13 additions & 23 deletions prjcombine_ise_hammer/src/fgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4375,29 +4375,19 @@ impl ExtraFeatureKind {
}
ExpandedDevice::Virtex2(_) => todo!(),
ExpandedDevice::Spartan6(_) => todo!(),
ExpandedDevice::Virtex4(edev) => match edev.kind {
prjcombine_virtex4::grid::GridKind::Virtex4 => todo!(),
prjcombine_virtex4::grid::GridKind::Virtex5 => {
let node = backend.egrid.db.get_node(tile);
backend.egrid.node_index[node]
.iter()
.map(|loc| vec![edev.btile_main(loc.0, loc.1, loc.2)])
.collect()
}
prjcombine_virtex4::grid::GridKind::Virtex6 => {
let node = backend.egrid.db.get_node(tile);
backend.egrid.node_index[node]
.iter()
.map(|loc| {
vec![
edev.btile_main(loc.0, loc.1, loc.2),
edev.btile_main(loc.0, loc.1, loc.2 + 1),
]
})
.collect()
}
prjcombine_virtex4::grid::GridKind::Virtex7 => todo!(),
},
ExpandedDevice::Virtex4(edev) => {
let node = backend.egrid.db.get_node(tile);
backend.egrid.node_index[node]
.iter()
.map(|loc| {
backend.egrid.db.nodes[node]
.tiles
.ids()
.map(|ti| edev.btile_main(loc.0, loc.1, loc.2 + ti.to_idx()))
.collect()
})
.collect()
}
ExpandedDevice::Ultrascale(_) => todo!(),
ExpandedDevice::Versal(_) => todo!(),
},
Expand Down
1 change: 1 addition & 0 deletions prjcombine_ise_hammer/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pub mod virtex2;
pub mod virtex4;
pub mod virtex5;
pub mod virtex6;
pub mod virtex7;
pub mod xc5200;
22 changes: 0 additions & 22 deletions prjcombine_ise_hammer/src/io/virtex6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,26 +510,6 @@ pub fn add_fuzzers<'a>(
fuzz_multi_attr_bin!(ctx, "INIT_PIPE_DATA0", 12, [(mode "OSERDESE1")]);
fuzz_multi_attr_bin!(ctx, "INIT_PIPE_DATA1", 12, [(mode "OSERDESE1")]);

// TODO OLOGIC
// - TFFTYPE DDR #LATCH #FF
// - OUTFFTYPE DDR #LATCH #FF
// - TMUX T1 TFF
// - OMUX D1 OUTFF
// - T1USED 0
// - O1USED 0
// - TQUSED 0
// - OQUSED 0
// - TFBUSED 0
// - OFBUSED 0

// TODO OSERDES
// - DATA_RATE_OQ SDR DDR
// - DATA_RATE_TQ SDR DDR BUF
// - DATA_WIDTH 2 3 4 5 6 7 8 10
// - INTERFACE_TYPE DEFAULT MEMORY_DDR3

// TODO: OLOGIC

for (src, num) in [("HCLK", 12), ("RCLK", 6)] {
for j in 0..num {
fuzz_one!(ctx, "MUX.CLKDIV", format!("{src}{j}"), [
Expand Down Expand Up @@ -1526,8 +1506,6 @@ pub fn collect_fuzzers(ctx: &mut CollectorCtx, devdata_only: bool) {
ctx.tiledb.insert(tile, bel, "OFF_SR_USED", osrused);
ctx.tiledb.insert(tile, bel, "TFF_SR_USED", tsrused);

// TODO: OLOGIC

let mut diffs = vec![];
for val in ["2", "3", "4", "5", "6", "7", "8"] {
diffs.push((
Expand Down
Loading

0 comments on commit fe0a267

Please sign in to comment.