Renamed LOC attribute to BEL, fix ice40 IO bel names

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-06-09 19:52:22 +02:00
parent 72f5e640af
commit 70f322ab44
3 changed files with 12 additions and 12 deletions

View File

@ -41,13 +41,13 @@ void place_design(Design *design)
// Initial constraints placer
for (auto cell_entry : design->cells) {
CellInfo *cell = cell_entry.second;
auto loc = cell->attrs.find("LOC");
auto loc = cell->attrs.find("BEL");
if (loc != cell->attrs.end()) {
std::string loc_name = loc->second;
BelId bel = design->chip.getBelByName(IdString(loc_name));
if (bel == BelId()) {
log_error("No Bel named \'%s\' located for "
"this chip (processing LOC on \'%s\')\n",
"this chip (processing BEL attribute on \'%s\')\n",
loc_name.c_str(), cell->name.c_str());
}
@ -112,7 +112,7 @@ void place_design(Design *design)
design->chip.bindBel(cell->bel, cell->name);
// Back annotate location
cell->attrs["LOC"] = design->chip.getBelName(cell->bel);
cell->attrs["BEL"] = design->chip.getBelName(cell->bel);
}
}
}

View File

@ -7,8 +7,8 @@ module blinky (
output led5_pin
);
wire clk, led1, led2, led3, led4, led5;
(* LOC="0_3_lc0" *)
(* BEL="13_12_io1" *)
SB_IO #(
.PIN_TYPE(6'b 0110_01),
.PULLUP(1'b0),
@ -25,8 +25,8 @@ module blinky (
.D_IN_0(),
.D_IN_1()
);
(* LOC="0_3_lc1" *)
(* BEL="13_12_io0" *)
SB_IO #(
.PIN_TYPE(6'b 0110_01),
.PULLUP(1'b0),
@ -44,7 +44,7 @@ module blinky (
.D_IN_1()
);
(* LOC="5_17_lc1" *)
(* BEL="13_11_io1" *)
SB_IO #(
.PIN_TYPE(6'b 0110_01),
.PULLUP(1'b0),
@ -62,7 +62,7 @@ module blinky (
.D_IN_1()
);
(* LOC="10_0_lc1" *)
(* BEL="13_11_io0" *)
SB_IO #(
.PIN_TYPE(6'b 0110_01),
.PULLUP(1'b0),
@ -80,7 +80,7 @@ module blinky (
.D_IN_1()
);
(* LOC="12_17_lc0" *)
(* BEL="13_9_io1" *)
SB_IO #(
.PIN_TYPE(6'b 0110_01),
.PULLUP(1'b0),
@ -98,7 +98,7 @@ module blinky (
.D_IN_1()
);
(* LOC="0_6_lc0" *)
(* BEL="0_8_io1" *)
SB_IO #(
.PIN_TYPE(6'b 0000_01),
.PULLUP(1'b0),

View File

@ -186,7 +186,7 @@ def add_bel_lc(x, y, z):
def add_bel_io(x, y, z):
bel = len(bel_name)
bel_name.append("%d_%d_lc%d" % (x, y, z))
bel_name.append("%d_%d_io%d" % (x, y, z))
bel_type.append("SB_IO")
bel_pos.append((x, y, z))
bel_wires.append(list())