Skip to content

Commit

Permalink
ise_hammer: 5v IOB, 6v GTX.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanda-phi committed Sep 14, 2024
1 parent 658a09c commit a913c85
Show file tree
Hide file tree
Showing 29 changed files with 3,016 additions and 350 deletions.
2 changes: 1 addition & 1 deletion databases/xc2v-tiledb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion databases/xc3s-tiledb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion databases/xc4v-tiledb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion databases/xc5v-tiledb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion databases/xc6v-tiledb.json

Large diffs are not rendered by default.

25 changes: 17 additions & 8 deletions docs/gen_xilinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,15 @@ def emit_dev_table_string(f, name):
emit_misc_table("xilinx/gen/xc2v-iostd-output-misc.html", "IOSTD:V2:OUTPUT_MISC")
emit_misc_table("xilinx/gen/xc2v-iostd-output-diff.html", "IOSTD:V2:OUTPUT_DIFF")
emit_misc_table("xilinx/gen/xc2v-iostd-lvdsbias.html", "IOSTD:V2:LVDSBIAS")
emit_misc_table("xilinx/gen/xc2v-iostd-dci-term-split.html", "IOSTD:V2:TERM_SPLIT")
emit_misc_table("xilinx/gen/xc2v-iostd-dci-term-vcc.html", "IOSTD:V2:TERM_VCC")
emit_misc_table("xilinx/gen/xc2v-iostd-dci-term-split.html", "IOSTD:V2:PMASK_TERM_SPLIT", "IOSTD:V2:NMASK_TERM_SPLIT")
emit_misc_table("xilinx/gen/xc2v-iostd-dci-term-vcc.html", "IOSTD:V2:PMASK_TERM_VCC")
emit_misc_table("xilinx/gen/xc2vp-iostd-drive.html", "IOSTD:V2P:PDRIVE", "IOSTD:V2P:NDRIVE")
emit_misc_table("xilinx/gen/xc2vp-iostd-slew.html", "IOSTD:V2P:SLEW")
emit_misc_table("xilinx/gen/xc2vp-iostd-output-misc.html", "IOSTD:V2P:OUTPUT_MISC")
emit_misc_table("xilinx/gen/xc2vp-iostd-output-diff.html", "IOSTD:V2P:OUTPUT_DIFF")
emit_misc_table("xilinx/gen/xc2vp-iostd-lvdsbias.html", "IOSTD:V2P:LVDSBIAS")
emit_misc_table("xilinx/gen/xc2vp-iostd-dci-term-split.html", "IOSTD:V2P:TERM_SPLIT")
emit_misc_table("xilinx/gen/xc2vp-iostd-dci-term-vcc.html", "IOSTD:V2P:TERM_VCC")
emit_misc_table("xilinx/gen/xc2vp-iostd-dci-term-split.html", "IOSTD:V2P:PMASK_TERM_SPLIT", "IOSTD:V2P:NMASK_TERM_SPLIT")
emit_misc_table("xilinx/gen/xc2vp-iostd-dci-term-vcc.html", "IOSTD:V2P:PMASK_TERM_VCC")
emit_misc_table("xilinx/gen/xc2v-gt10-PMA_SPEED.html", "GT10:PMA_SPEED")

with open("xilinx/gen/xc2v-dcm-deskew-adjust.html", "w") as f:
Expand All @@ -267,14 +267,13 @@ def emit_dev_table_string(f, name):
emit_misc_table("xilinx/gen/xc3s-iostd-output-misc.html", "IOSTD:S3:OUTPUT_MISC")
emit_misc_table("xilinx/gen/xc3s-iostd-output-diff.html", "IOSTD:S3:OUTPUT_DIFF")
emit_misc_table("xilinx/gen/xc3s-iostd-lvdsbias.html", "IOSTD:S3:LVDSBIAS")
emit_misc_table("xilinx/gen/xc3s-iostd-dci-term-split.html", "IOSTD:S3:TERM_SPLIT")
emit_misc_table("xilinx/gen/xc3s-iostd-dci-term-vcc.html", "IOSTD:S3:TERM_VCC")
emit_misc_table("xilinx/gen/xc3s-iostd-dci-term-split.html", "IOSTD:S3:PMASK_TERM_SPLIT", "IOSTD:S3:NMASK_TERM_SPLIT")
emit_misc_table("xilinx/gen/xc3s-iostd-dci-term-vcc.html", "IOSTD:S3:PMASK_TERM_VCC")
emit_misc_table("xilinx/gen/xc3se-iostd-drive.html", "IOSTD:S3E:PDRIVE", "IOSTD:S3E:NDRIVE")
emit_misc_table("xilinx/gen/xc3se-iostd-slew.html", "IOSTD:S3E:SLEW")
emit_misc_table("xilinx/gen/xc3se-iostd-output-misc.html", "IOSTD:S3E:OUTPUT_MISC")
emit_misc_table("xilinx/gen/xc3se-iostd-output-diff.html", "IOSTD:S3E:OUTPUT_DIFF")
emit_misc_table("xilinx/gen/xc3se-iostd-lvdsbias-0.html", "IOSTD:S3E:LVDSBIAS_0")
emit_misc_table("xilinx/gen/xc3se-iostd-lvdsbias-1.html", "IOSTD:S3E:LVDSBIAS_1")
emit_misc_table("xilinx/gen/xc3se-iostd-lvdsbias.html", "IOSTD:S3E:LVDSBIAS")
emit_misc_table("xilinx/gen/xc3sa-iostd-tb-drive.html", "IOSTD:S3A.TB:PDRIVE", "IOSTD:S3A.TB:NDRIVE")
emit_misc_table("xilinx/gen/xc3sa-iostd-tb-slew.html", "IOSTD:S3A.TB:PSLEW", "IOSTD:S3A.TB:NSLEW")
emit_misc_table("xilinx/gen/xc3sa-iostd-tb-output-diff.html", "IOSTD:S3A.TB:OUTPUT_DIFF")
Expand Down Expand Up @@ -332,3 +331,13 @@ def emit_dev_table_string(f, name):
emit_misc_table("xilinx/gen/xc4v-iostd-dci-lvdiv2.html", "IOSTD:DCI:LVDIV2")
emit_misc_table("xilinx/gen/xc4v-iostd-dci-mask-term-vcc.html", "IOSTD:DCI:PMASK_TERM_VCC")
emit_misc_table("xilinx/gen/xc4v-iostd-dci-mask-term-split.html", "IOSTD:DCI:PMASK_TERM_SPLIT", "IOSTD:DCI:NMASK_TERM_SPLIT")

if kind == "xc5v":
emit_misc_table("xilinx/gen/xc5v-iostd-misc.html", "IOSTD:OUTPUT_MISC")
emit_misc_table("xilinx/gen/xc5v-iostd-drive.html", "IOSTD:PDRIVE", "IOSTD:NDRIVE")
emit_misc_table("xilinx/gen/xc5v-iostd-slew.html", "IOSTD:PSLEW", "IOSTD:NSLEW")
emit_misc_table("xilinx/gen/xc5v-iostd-lvds.html", "IOSTD:LVDS_T", "IOSTD:LVDS_C")
emit_misc_table("xilinx/gen/xc5v-iostd-lvdsbias.html", "IOSTD:LVDSBIAS")
emit_misc_table("xilinx/gen/xc5v-iostd-dci-lvdiv2.html", "IOSTD:DCI:LVDIV2")
emit_misc_table("xilinx/gen/xc5v-iostd-dci-mask-term-vcc.html", "IOSTD:DCI:PMASK_TERM_VCC")
emit_misc_table("xilinx/gen/xc5v-iostd-dci-mask-term-split.html", "IOSTD:DCI:PMASK_TERM_SPLIT", "IOSTD:DCI:NMASK_TERM_SPLIT")
5 changes: 1 addition & 4 deletions docs/xilinx/spartan3/corner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ I/O data — Spartan 3E
=====================

.. raw:: html
:file: ../gen/xc3se-iostd-lvdsbias-0.html

.. raw:: html
:file: ../gen/xc3se-iostd-lvdsbias-1.html
:file: ../gen/xc3se-iostd-lvdsbias.html


I/O data — Spartan 3A
Expand Down
16 changes: 16 additions & 0 deletions docs/xilinx/virtex5/clock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,19 @@ IO clock nodes

.. raw:: html
:file: ../gen/tile-xc5v-HCLK_CMT.html


I/O standard data
=================

.. raw:: html
:file: ../gen/xc5v-iostd-lvdsbias.html

.. raw:: html
:file: ../gen/xc5v-iostd-dci-lvdiv2.html

.. raw:: html
:file: ../gen/xc5v-iostd-dci-mask-term-vcc.html

.. raw:: html
:file: ../gen/xc5v-iostd-dci-mask-term-split.html
12 changes: 12 additions & 0 deletions docs/xilinx/virtex5/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,17 @@ The ``SYSMON`` present on the device can use up to 16 IOB pairs from the left I/
Bitstream
=========

.. raw:: html
:file: ../gen/xc5v-iostd-drive.html

.. raw:: html
:file: ../gen/xc5v-iostd-slew.html

.. raw:: html
:file: ../gen/xc5v-iostd-misc.html

.. raw:: html
:file: ../gen/xc5v-iostd-lvds.html

.. raw:: html
:file: ../gen/tile-xc5v-IO.html
13 changes: 13 additions & 0 deletions docs/xilinx/virtex6/gtx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _virtex6-gtx:

GTX transceivers
################

.. todo:: document


Bitstream
=========

.. raw:: html
:file: ../gen/tile-xc6v-GTX.html
1 change: 1 addition & 0 deletions docs/xilinx/virtex6/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ Virtex 6
center
emac
pcie
gtx
config
75 changes: 65 additions & 10 deletions prjcombine_ise_hammer/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ pub enum Key<'a> {
Pip(&'a str, &'a str, &'a str),
VccAux,
AltVr,
InternalVref(u32),
DciCascade(u32),
GlobalMutex(String),
RowMutex(String, RowId),
BelMutex((DieId, ColId, RowId, LayerId, BelId), String),
Expand All @@ -59,50 +61,58 @@ pub enum PinFromKind {
}

#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Value {
pub enum Value<'a> {
None,
Bool(bool),
String(String),
U32(u32),
PinFrom(PinFromKind),
FromPin(&'a str, String),
Bel(DieId, ColId, RowId, LayerId, BelId),
}

impl From<Option<core::convert::Infallible>> for Value {
impl From<Option<core::convert::Infallible>> for Value<'_> {
fn from(_: Option<core::convert::Infallible>) -> Self {
Self::None
}
}

impl<'a> From<&'a str> for Value {
impl<'a> From<&'a str> for Value<'_> {
fn from(value: &'a str) -> Self {
Self::String(value.into())
}
}

impl<'a> From<&'a String> for Value {
impl<'a> From<&'a String> for Value<'_> {
fn from(value: &'a String) -> Self {
Self::String(value.clone())
}
}

impl From<String> for Value {
impl From<String> for Value<'_> {
fn from(value: String) -> Self {
Self::String(value)
}
}

impl From<PinFromKind> for Value {
impl From<PinFromKind> for Value<'_> {
fn from(value: PinFromKind) -> Self {
Self::PinFrom(value)
}
}

impl From<bool> for Value {
impl From<bool> for Value<'_> {
fn from(value: bool) -> Self {
Self::Bool(value)
}
}

impl From<u32> for Value<'_> {
fn from(value: u32) -> Self {
Self::U32(value)
}
}

#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum MultiValue {
Lut,
Expand Down Expand Up @@ -319,7 +329,7 @@ impl<'a> IseBackend<'a> {

impl<'a> Backend for IseBackend<'a> {
type Key = Key<'a>;
type Value = Value;
type Value = Value<'a>;
type MultiValue = MultiValue;
type Bitstream = Bitstream;
type FuzzerInfo = FuzzerInfo;
Expand Down Expand Up @@ -651,6 +661,26 @@ impl<'a> Backend for IseBackend<'a> {
}
nets.insert(name, net);
}
Value::FromPin(site_other, pin_other) => {
let name = format!("SINGLE_PIN__{site}__{pin}");
nets.insert(
name.clone(),
Net {
name,
typ: NetType::Plain,
inpins: vec![NetPin {
inst_name: site_other.to_string(),
pin: pin_other.to_string(),
}],
outpins: vec![NetPin {
inst_name: site.to_string(),
pin: pin.to_string(),
}],
pips: vec![],
cfg: vec![],
},
);
}
_ => unreachable!(),
},
_ => (),
Expand Down Expand Up @@ -693,7 +723,32 @@ impl<'a> Backend for IseBackend<'a> {
None
};
let altvr = kv.get(&Key::AltVr) == Some(&Value::Bool(true));
let pcf = Pcf { vccaux };
let mut internal_vref = HashMap::new();
let mut dci_cascade = HashMap::new();
for (k, v) in &kv {
match k {
Key::DciCascade(bank) => match v {
Value::U32(val) => {
dci_cascade.insert(*bank, *val);
}
Value::None => (),
_ => unreachable!(),
},
Key::InternalVref(bank) => match v {
Value::U32(val) => {
internal_vref.insert(*bank, *val);
}
Value::None => (),
_ => unreachable!(),
},
_ => (),
}
}
let pcf = Pcf {
vccaux,
internal_vref,
dci_cascade,
};
let mut key = KeyData::None;
if let Some(encrypt) = gopts.get("ENCRYPT") {
if encrypt == "YES" {
Expand Down Expand Up @@ -782,7 +837,7 @@ impl<'a> Backend for IseBackend<'a> {
Bitstream::diff(bs1, bs2)
}

fn assemble_multi(mv: &MultiValue, y: &BitVec) -> Value {
fn assemble_multi(mv: &MultiValue, y: &BitVec) -> Value<'a> {
match *mv {
MultiValue::Lut => {
let mut v = "#LUT:0x".to_string();
Expand Down
Loading

0 comments on commit a913c85

Please sign in to comment.