diff options
author | gatecat <gatecat@ds0.me> | 2021-04-20 11:33:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 11:33:51 +0100 |
commit | 95698827b876c5afa368ed8746d155d68a8b6bbf (patch) | |
tree | 2af311119f6ff54222020691248d0509ccd9ad69 /fpga_interchange/chipdb.h | |
parent | 6fbefb8f1388dbb2bfe059624f7cb76ee9a81c5e (diff) | |
parent | 0e6955a08dabf744cb57e6c440ff3ab62fd2a507 (diff) | |
download | nextpnr-95698827b876c5afa368ed8746d155d68a8b6bbf.tar.gz nextpnr-95698827b876c5afa368ed8746d155d68a8b6bbf.tar.bz2 nextpnr-95698827b876c5afa368ed8746d155d68a8b6bbf.zip |
Merge pull request #682 from YosysHQ/gatecat/default-cellpins
interchange: Handle missing/disconnected cell pins
Diffstat (limited to 'fpga_interchange/chipdb.h')
-rw-r--r-- | fpga_interchange/chipdb.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/fpga_interchange/chipdb.h b/fpga_interchange/chipdb.h index 6c7b8c83..b66640e3 100644 --- a/fpga_interchange/chipdb.h +++ b/fpga_interchange/chipdb.h @@ -34,7 +34,7 @@ NEXTPNR_NAMESPACE_BEGIN * kExpectedChipInfoVersion */ -static constexpr int32_t kExpectedChipInfoVersion = 6; +static constexpr int32_t kExpectedChipInfoVersion = 7; // Flattened site indexing. // @@ -255,6 +255,26 @@ NPNR_PACKED_STRUCT(struct PackagePOD { RelSlice<PackagePinPOD> pins; }); +enum CellPinValue +{ + // leave floating + PIN_VALUE_FLOAT = 0, + // connect to ground + PIN_VALUE_GND = 1, + // connect to vcc + PIN_VALUE_VCC = 2, +}; + +NPNR_PACKED_STRUCT(struct DefaultCellConnPOD { + int32_t pin_name; // constid + int32_t value; // CellPinValue +}); + +NPNR_PACKED_STRUCT(struct DefaultCellConnsPOD { + int32_t cell_type; // constid + RelSlice<DefaultCellConnPOD> pins; +}); + NPNR_PACKED_STRUCT(struct ConstantsPOD { // Cell type and port for the GND and VCC global source. int32_t gnd_cell_name; // constid @@ -280,6 +300,9 @@ NPNR_PACKED_STRUCT(struct ConstantsPOD { // If a choice is available, which constant net should be used? // Can be ''/0 if either constant net are equivilent. int32_t best_constant_net; // constid + + // Default cell pin connections + RelSlice<DefaultCellConnsPOD> default_conns; }); NPNR_PACKED_STRUCT(struct ChipInfoPOD { |