diff options
author | gatecat <gatecat@ds0.me> | 2021-05-03 15:12:24 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 431c4cec9ff9652ddafabac7244f19f425ff3e06 (patch) | |
tree | 590d4ede9c0970e132d9864d70f8c419742b88c7 /cyclonev/lab.cc | |
parent | 86ce6abf6a47f0f452dfe0045cec762d986e7ada (diff) | |
download | nextpnr-431c4cec9ff9652ddafabac7244f19f425ff3e06.tar.gz nextpnr-431c4cec9ff9652ddafabac7244f19f425ff3e06.tar.bz2 nextpnr-431c4cec9ff9652ddafabac7244f19f425ff3e06.zip |
cyclonev: Rework bels
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'cyclonev/lab.cc')
-rw-r--r-- | cyclonev/lab.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cyclonev/lab.cc b/cyclonev/lab.cc index b464b88a..55602da4 100644 --- a/cyclonev/lab.cc +++ b/cyclonev/lab.cc @@ -79,9 +79,10 @@ static void create_alm(Arch *arch, int x, int y, int z, uint32_t lab_idx) arch->add_bel_pin(bel, id_COMBOUT, PORT_OUT, comb_out); // Assign indexing lab.alms.at(z).lut_bels.at(i) = bel; - arch->bels.at(bel).lab_data.lab = lab_idx; - arch->bels.at(bel).lab_data.alm = z; - arch->bels.at(bel).lab_data.idx = i; + auto &b = arch->bel_data(bel); + b.lab_data.lab = lab_idx; + b.lab_data.alm = z; + b.lab_data.idx = i; } // Create the control set and E/F selection - which is per pair of FF std::array<WireId, 2> sel_clk, sel_ena, sel_aclr, sel_ef; @@ -138,9 +139,10 @@ static void create_alm(Arch *arch, int x, int y, int z, uint32_t lab_idx) } lab.alms.at(z).ff_bels.at(i) = bel; - arch->bels.at(bel).lab_data.lab = lab_idx; - arch->bels.at(bel).lab_data.alm = z; - arch->bels.at(bel).lab_data.idx = i; + auto &b = arch->bel_data(bel); + b.lab_data.lab = lab_idx; + b.lab_data.alm = z; + b.lab_data.idx = i; } } } // namespace |