aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chip.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-17 14:30:26 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-17 14:30:26 +0200
commit3b5c33d685b1330747612e4cebb422b09b2bd8de (patch)
tree78e2ae6163b15b6e8f9fa194e8e13cba8bbe30c5 /ice40/chip.h
parent84defd3fee71ab48c46fa1ba7c4acd49fba3cc5f (diff)
downloadnextpnr-3b5c33d685b1330747612e4cebb422b09b2bd8de.tar.gz
nextpnr-3b5c33d685b1330747612e4cebb422b09b2bd8de.tar.bz2
nextpnr-3b5c33d685b1330747612e4cebb422b09b2bd8de.zip
Move WireInfoPOD into ChipDB binary blob
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/chip.h')
-rw-r--r--ice40/chip.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/ice40/chip.h b/ice40/chip.h
index 196d169d..9f15bf60 100644
--- a/ice40/chip.h
+++ b/ice40/chip.h
@@ -132,15 +132,15 @@ struct PipInfoPOD
struct WireInfoPOD
{
- const char *name;
+ RelPtr<char> name;
int32_t num_uphill, num_downhill;
- int32_t *pips_uphill, *pips_downhill;
+ RelPtr<int32_t> pips_uphill, pips_downhill;
int32_t num_bels_downhill;
BelPortPOD bel_uphill;
- BelPortPOD *bels_downhill;
+ RelPtr<BelPortPOD> bels_downhill;
- int8_t x, y;
+ int16_t x, y;
} __attribute__((packed));
struct PackagePinPOD
@@ -339,7 +339,7 @@ struct BelRange
struct BelPinIterator
{
- BelPortPOD *ptr = nullptr;
+ const BelPortPOD *ptr = nullptr;
void operator++() { ptr++; }
bool operator!=(const BelPinIterator &other) const
@@ -421,7 +421,7 @@ struct AllPipRange
struct PipIterator
{
- int *cursor = nullptr;
+ const int *cursor = nullptr;
void operator++() { cursor++; }
bool operator!=(const PipIterator &other) const
@@ -565,7 +565,7 @@ struct Chip
{
BelPinRange range;
assert(wire != WireId());
- range.b.ptr = chip_info.wire_data[wire.index].bels_downhill;
+ range.b.ptr = chip_info.wire_data[wire.index].bels_downhill.get();
range.e.ptr =
range.b.ptr + chip_info.wire_data[wire.index].num_bels_downhill;
return range;
@@ -578,7 +578,7 @@ struct Chip
IdString getWireName(WireId wire) const
{
assert(wire != WireId());
- return chip_info.wire_data[wire.index].name;
+ return chip_info.wire_data[wire.index].name.get();
}
void bindWire(WireId wire, IdString net)
@@ -697,7 +697,7 @@ struct Chip
{
PipRange range;
assert(wire != WireId());
- range.b.cursor = chip_info.wire_data[wire.index].pips_downhill;
+ range.b.cursor = chip_info.wire_data[wire.index].pips_downhill.get();
range.e.cursor =
range.b.cursor + chip_info.wire_data[wire.index].num_downhill;
return range;
@@ -707,7 +707,7 @@ struct Chip
{
PipRange range;
assert(wire != WireId());
- range.b.cursor = chip_info.wire_data[wire.index].pips_uphill;
+ range.b.cursor = chip_info.wire_data[wire.index].pips_uphill.get();
range.e.cursor =
range.b.cursor + chip_info.wire_data[wire.index].num_uphill;
return range;