diff options
author | gatecat <gatecat@ds0.me> | 2021-05-01 15:25:43 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 8677d59b927ddf60167c15a7422f9deeac5f817a (patch) | |
tree | 463fb6edc18fa53d4c6a356a3ff4370113bb24d4 /cyclonev/arch.cc | |
parent | 5d1b8bf74469d0d5c5cc15e8c8e042da55da5357 (diff) | |
download | nextpnr-8677d59b927ddf60167c15a7422f9deeac5f817a.tar.gz nextpnr-8677d59b927ddf60167c15a7422f9deeac5f817a.tar.bz2 nextpnr-8677d59b927ddf60167c15a7422f9deeac5f817a.zip |
cyclonev: Add routing graph
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'cyclonev/arch.cc')
-rw-r--r-- | cyclonev/arch.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cyclonev/arch.cc b/cyclonev/arch.cc index eff6660e..10b7a71b 100644 --- a/cyclonev/arch.cc +++ b/cyclonev/arch.cc @@ -55,6 +55,7 @@ Arch::Arch(ArchArgs args) id2rn_t[rnode_id] = CycloneV::rnode_type_t(t); } + log_info("Initialising bels...\n"); for (int x = 0; x < cyclonev->get_tile_sx(); x++) { for (int y = 0; y < cyclonev->get_tile_sy(); y++) { CycloneV::pos_t pos = cyclonev->xy2pos(x, y); @@ -86,6 +87,24 @@ Arch::Arch(ArchArgs args) } } + // This import takes about 5s, perhaps long term we can speed it up, e.g. defer to Mistral more... + log_info("Initialising routing graph...\n"); + int pip_count = 0; + for (const auto &mux : cyclonev->dest_node_to_rmux) { + const auto &rmux = cyclonev->rmux_info[mux.second]; + WireId dst_wire(mux.first); + for (const auto &src : rmux.sources) { + if (CycloneV::rn2t(src) == CycloneV::NONE) + continue; + WireId src_wire(src); + wires[dst_wire].wires_uphill.push_back(src_wire); + wires[src_wire].wires_downhill.push_back(dst_wire); + ++pip_count; + } + } + + log_info(" imported %d wires and %d pips\n", int(wires.size()), pip_count); + BaseArch::init_cell_types(); BaseArch::init_bel_buckets(); } |