Skip to content

Commit

Permalink
virtex7: deal with GTZ.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanda-phi committed Dec 15, 2024
1 parent 96426ef commit 44ba972
Show file tree
Hide file tree
Showing 62 changed files with 3,929 additions and 266 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ sha2 = "0.10.8"

[profile.dev]
opt-level = 2
overflow-checks = false
debug-assertions = false
debug = 2

[workspace.lints.clippy]
Expand Down
2 changes: 1 addition & 1 deletion databases/virtex4.json

Large diffs are not rendered by default.

Binary file modified databases/virtex4.zstd
Binary file not shown.
2 changes: 1 addition & 1 deletion databases/virtex5.json

Large diffs are not rendered by default.

Binary file modified databases/virtex5.zstd
Binary file not shown.
2 changes: 1 addition & 1 deletion databases/virtex6.json

Large diffs are not rendered by default.

Binary file modified databases/virtex6.zstd
Binary file not shown.
2 changes: 1 addition & 1 deletion databases/virtex7.json

Large diffs are not rendered by default.

Binary file modified databases/virtex7.zstd
Binary file not shown.
13 changes: 13 additions & 0 deletions docs/xilinx/virtex7/gtz.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _virtex7-gtz:

GTZ transceivers
################

.. todo:: document


``GTZ``
=======

.. raw:: html
:file: ../gen/tile-xc7v-GTZ.html
1 change: 1 addition & 0 deletions docs/xilinx/virtex7/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Virtex 7
gtp
gtx
gth
gtz
config
6 changes: 6 additions & 0 deletions prjcombine_ise_hammer/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ impl<'a> Backend for IseBackend<'a> {
site_to_tile.insert(name.to_string(), nnode.names[rt].to_string());
}
}
if let ExpandedNamedDevice::Virtex4(endev) = self.endev {
for ngt in endev.gtz.values() {
let Some(ngt) = ngt else { continue };
site_to_tile.insert(ngt.bel.clone(), ngt.tile.clone());
}
}

let mut site_to_place = HashMap::new();
let bond = &self.db.bonds[self.device.bonds[combo.devbond_idx].bond];
Expand Down
10 changes: 6 additions & 4 deletions prjcombine_ise_hammer/src/fgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4531,15 +4531,16 @@ impl BelFuzzKV {
}

#[derive(Debug, Clone)]
pub enum TileMultiFuzzKV {
pub enum TileMultiFuzzKV<'a> {
SiteAttr(BelId, String, MultiValue),
IobSiteAttr(usize, BelId, String, MultiValue),
GlobalOpt(String, MultiValue),
BelGlobalOpt(BelId, BelGlobalKind, String, MultiValue),
Raw(Key<'a>, MultiValue),
}

impl TileMultiFuzzKV {
fn apply<'a>(
impl<'a> TileMultiFuzzKV<'a> {
fn apply(
&self,
backend: &IseBackend<'a>,
loc: NodeLoc,
Expand All @@ -4563,6 +4564,7 @@ impl TileMultiFuzzKV {
let name = kind.apply(backend, opt, site);
fuzzer.fuzz_multi(Key::GlobalOpt(name), *val)
}
TileMultiFuzzKV::Raw(key, val) => fuzzer.fuzz_multi(key.clone(), *val),
}
}
}
Expand Down Expand Up @@ -6691,7 +6693,7 @@ pub struct TileMultiFuzzerGen<'a> {
pub feature: FeatureId,
pub base: Vec<TileKV<'a>>,
pub width: usize,
pub fuzz: TileMultiFuzzKV,
pub fuzz: TileMultiFuzzKV<'a>,
pub extras: Vec<ExtraFeature>,
}

Expand Down
9 changes: 9 additions & 0 deletions prjcombine_ise_hammer/src/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ macro_rules! fuzz_base {
($ctx:ident, (nop)) => {
$crate::fgen::TileKV::Nop
};
($ctx:ident, (raw $key:expr, $val:expr)) => {
$crate::fgen::TileKV::Raw($key, $val.into())
};
}

#[macro_export]
Expand Down Expand Up @@ -499,6 +502,9 @@ macro_rules! fuzz_diff {
($ctx:ident, (bel_special $special:expr)) => {
$crate::fgen::TileFuzzKV::Bel($ctx.bel, $special)
};
($ctx:ident, (raw $key:expr, $val0:expr, $val1:expr)) => {
$crate::fgen::TileFuzzKV::Raw($key, $val0.into(), $val1.into())
};
}

#[macro_export]
Expand Down Expand Up @@ -592,6 +598,9 @@ macro_rules! fuzz_diff_multi {
$crate::backend::MultiValue::Bin,
)
};
($ctx:ident, (raw $key:expr, $val:expr)) => {
$crate::fgen::TileMultiFuzzKV::Raw($key, $val)
};
}

#[macro_export]
Expand Down
Loading

0 comments on commit 44ba972

Please sign in to comment.