From 8d372b86f3aed86c7a8ef7869e92335bd965c2ae Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 3 Aug 2018 21:11:12 +0200 Subject: Proper ice40 wire types Signed-off-by: Clifford Wolf --- ice40/arch.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'ice40/arch.h') diff --git a/ice40/arch.h b/ice40/arch.h index 4a5157bd..50905098 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -88,6 +88,25 @@ NPNR_PACKED_STRUCT(struct WireSegmentPOD { }); NPNR_PACKED_STRUCT(struct WireInfoPOD { + enum WireType : int8_t + { + WIRE_TYPE_NONE = 0, + WIRE_TYPE_GLB2LOCAL = 1, + WIRE_TYPE_GLB_NETWK = 2, + WIRE_TYPE_LOCAL = 3, + WIRE_TYPE_LUTFF_IN = 4, + WIRE_TYPE_LUTFF_IN_LUT = 5, + WIRE_TYPE_LUTFF_LOUT = 6, + WIRE_TYPE_LUTFF_OUT = 7, + WIRE_TYPE_LUTFF_COUT = 8, + WIRE_TYPE_LUTFF_GLOBAL = 9, + WIRE_TYPE_CARRY_IN_MUX = 10, + WIRE_TYPE_SP4_V = 11, + WIRE_TYPE_SP4_H = 12, + WIRE_TYPE_SP12_V = 13, + WIRE_TYPE_SP12_H = 14 + }; + RelPtr name; int32_t num_uphill, num_downhill; RelPtr pips_uphill, pips_downhill; @@ -503,7 +522,7 @@ struct Arch : BaseCtx return id(chip_info->wire_data[wire.index].name.get()); } - IdString getWireType(WireId wire) const { return IdString(); } + IdString getWireType(WireId wire) const; uint32_t getWireChecksum(WireId wire) const { return wire.index; } -- cgit v1.2.3