aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/bitstream.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-10 15:06:26 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-10 15:06:26 +0200
commit02b83d6db6c2d0d690b302459fbe490eaa5d140c (patch)
treef0570a9626eec89a7a8ef0bc557a0c5356dda1f7 /ice40/bitstream.cc
parent032c94d094b74bec922004cbbac0dcb2ae734839 (diff)
downloadnextpnr-02b83d6db6c2d0d690b302459fbe490eaa5d140c.tar.gz
nextpnr-02b83d6db6c2d0d690b302459fbe490eaa5d140c.tar.bz2
nextpnr-02b83d6db6c2d0d690b302459fbe490eaa5d140c.zip
Debugging on icebreaker
Diffstat (limited to 'ice40/bitstream.cc')
-rw-r--r--ice40/bitstream.cc28
1 files changed, 19 insertions, 9 deletions
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index 818ba180..9b749717 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -180,10 +180,18 @@ void write_asc(const Design &design, std::ostream &out)
IdString())) {
input_en = true;
}
- set_config(ti, config.at(iey).at(iex),
- "IoCtrl.IE_" + std::to_string(iez), !input_en);
- set_config(ti, config.at(iey).at(iex),
- "IoCtrl.REN_" + std::to_string(iez), !pullup);
+
+ if(chip.args.type == ChipArgs::LP1K || chip.args.type == ChipArgs::HX1K) {
+ set_config(ti, config.at(iey).at(iex),
+ "IoCtrl.IE_" + std::to_string(iez), !input_en);
+ set_config(ti, config.at(iey).at(iex),
+ "IoCtrl.REN_" + std::to_string(iez), !pullup);
+ } else {
+ set_config(ti, config.at(iey).at(iex),
+ "IoCtrl.IE_" + std::to_string(iez), input_en);
+ set_config(ti, config.at(iey).at(iex),
+ "IoCtrl.REN_" + std::to_string(iez), !pullup);
+ }
} else {
assert(false);
}
@@ -198,10 +206,12 @@ void write_asc(const Design &design, std::ostream &out)
int iex, iey, iez;
std::tie(iex, iey, iez) = ieren;
if (iez != -1) {
- set_config(ti, config.at(iey).at(iex),
- "IoCtrl.IE_" + std::to_string(iez), true);
- set_config(ti, config.at(iey).at(iex),
- "IoCtrl.REN_" + std::to_string(iez), false);
+ if(chip.args.type == ChipArgs::LP1K || chip.args.type == ChipArgs::HX1K) {
+ set_config(ti, config.at(iey).at(iex),
+ "IoCtrl.IE_" + std::to_string(iez), true);
+ set_config(ti, config.at(iey).at(iex),
+ "IoCtrl.REN_" + std::to_string(iez), false);
+ }
}
}
}
@@ -213,7 +223,7 @@ void write_asc(const Design &design, std::ostream &out)
for (int x = 0; x < ci.width; x++) {
TileType tile = tile_at(chip, x, y);
TileInfoPOD &ti = bi.tiles_nonrouting[tile];
- if (tile == TILE_RAMB) {
+ if ((tile == TILE_RAMB) && (chip.args.type == ChipArgs::LP1K || chip.args.type == ChipArgs::HX1K)) {
set_config(ti, config.at(y).at(x), "RamConfig.PowerUp", true);
}
}