From ecf24201ec35c01045a970cff4ed471f1b23a19b Mon Sep 17 00:00:00 2001 From: gatecat Date: Fri, 30 Apr 2021 11:07:14 +0100 Subject: interchange: Add wire types to chipdb Signed-off-by: gatecat --- fpga_interchange/chipdb.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'fpga_interchange') diff --git a/fpga_interchange/chipdb.h b/fpga_interchange/chipdb.h index b66640e3..e9cac84e 100644 --- a/fpga_interchange/chipdb.h +++ b/fpga_interchange/chipdb.h @@ -34,7 +34,7 @@ NEXTPNR_NAMESPACE_BEGIN * kExpectedChipInfoVersion */ -static constexpr int32_t kExpectedChipInfoVersion = 7; +static constexpr int32_t kExpectedChipInfoVersion = 8; // Flattened site indexing. // @@ -182,6 +182,9 @@ NPNR_PACKED_STRUCT(struct TileInstInfoPOD { // as they will never be nodal // -1 if a tile-local wire; node index if nodal wire RelSlice tile_wire_to_node; + + // Index into wire_types + RelSlice tile_wire_to_type; }); NPNR_PACKED_STRUCT(struct TileWireRefPOD { @@ -305,6 +308,18 @@ NPNR_PACKED_STRUCT(struct ConstantsPOD { RelSlice default_conns; }); +enum WireCategory +{ + WIRE_CAT_GENERAL = 0, + WIRE_CAT_SPECIAL = 1, + WIRE_CAT_GLOBAL = 2, +}; + +NPNR_PACKED_STRUCT(struct WireTypePOD { + int32_t name; // constid + int32_t category; // WireCategory +}); + NPNR_PACKED_STRUCT(struct ChipInfoPOD { RelPtr name; RelPtr generator; @@ -317,6 +332,7 @@ NPNR_PACKED_STRUCT(struct ChipInfoPOD { RelSlice tiles; RelSlice nodes; RelSlice packages; + RelSlice wire_types; // BEL bucket constids. RelSlice bel_buckets; -- cgit v1.2.3