diff options
author | gatecat <gatecat@ds0.me> | 2022-02-16 18:13:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 18:13:22 +0000 |
commit | 61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2 (patch) | |
tree | 379b38c06745919df0e87c1be1410e16793b0925 /mistral | |
parent | 25c47e5b7e12d232cac9408b7d6d339ee11793b7 (diff) | |
parent | 76683a1e3c123d28deff750c38467c6377936879 (diff) | |
download | nextpnr-61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2.tar.gz nextpnr-61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2.tar.bz2 nextpnr-61d1db16be2c68cf6ae8b4d2ff3266b5c7086ad2.zip |
Merge pull request #918 from YosysHQ/gatecat/netlist-ii
Refactor pt2, barnacle cleanup
Diffstat (limited to 'mistral')
-rw-r--r-- | mistral/arch.cc | 8 | ||||
-rw-r--r-- | mistral/constids.inc | 8 | ||||
-rw-r--r-- | mistral/globals.cc | 6 | ||||
-rw-r--r-- | mistral/main.cc | 2 |
4 files changed, 16 insertions, 8 deletions
diff --git a/mistral/arch.cc b/mistral/arch.cc index c50e30f4..e79a3910 100644 --- a/mistral/arch.cc +++ b/mistral/arch.cc @@ -446,7 +446,7 @@ ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const bool Arch::place() { - std::string placer = str_or_default(settings, id("placer"), defaultPlacer); + std::string placer = str_or_default(settings, id_placer, defaultPlacer); if (placer == "heap") { PlacerHeapCfg cfg(getCtx()); @@ -468,7 +468,7 @@ bool Arch::place() log_error("Mistral architecture does not support placer '%s'\n", placer.c_str()); } - getCtx()->attrs[getCtx()->id("step")] = std::string("place"); + getCtx()->attrs[id_step] = std::string("place"); archInfoToAttributes(); return true; } @@ -479,7 +479,7 @@ bool Arch::route() lab_pre_route(); - std::string router = str_or_default(settings, id("router"), defaultRouter); + std::string router = str_or_default(settings, id_router, defaultRouter); bool result; if (router == "router1") { result = router1(getCtx(), Router1Cfg(getCtx())); @@ -489,7 +489,7 @@ bool Arch::route() } else { log_error("Mistral architecture does not support router '%s'\n", router.c_str()); } - getCtx()->attrs[getCtx()->id("step")] = std::string("route"); + getCtx()->attrs[id_step] = std::string("route"); archInfoToAttributes(); return result; } diff --git a/mistral/constids.inc b/mistral/constids.inc index 2aa2c157..d241c8ef 100644 --- a/mistral/constids.inc +++ b/mistral/constids.inc @@ -97,3 +97,11 @@ X(WE_INV) X(cyclonev_oscillator) X(cyclonev_hps_interface_mpu_general_purpose) + +X(clkout) +X(clkout1) +X(compress_rbf) +X(oscena) +X(placer) +X(router) +X(step) diff --git a/mistral/globals.cc b/mistral/globals.cc index d41b2afe..1ba70919 100644 --- a/mistral/globals.cc +++ b/mistral/globals.cc @@ -58,9 +58,9 @@ void Arch::create_hps_mpu_general_purpose(int x, int y) void Arch::create_control(int x, int y) { BelId oscillator_bel = add_bel(x, y, id_cyclonev_oscillator, id_cyclonev_oscillator); - add_bel_pin(oscillator_bel, id("oscena"), PORT_IN, get_port(CycloneV::CTRL, x, y, -1, CycloneV::OSC_ENA, -1)); - add_bel_pin(oscillator_bel, id("clkout"), PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT, -1)); - add_bel_pin(oscillator_bel, id("clkout1"), PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT1, -1)); + add_bel_pin(oscillator_bel, id_oscena, PORT_IN, get_port(CycloneV::CTRL, x, y, -1, CycloneV::OSC_ENA, -1)); + add_bel_pin(oscillator_bel, id_clkout, PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT, -1)); + add_bel_pin(oscillator_bel, id_clkout1, PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT1, -1)); } NEXTPNR_NAMESPACE_END diff --git a/mistral/main.cc b/mistral/main.cc index bd9ef591..34bf759e 100644 --- a/mistral/main.cc +++ b/mistral/main.cc @@ -79,7 +79,7 @@ std::unique_ptr<Context> MistralCommandHandler::createContext(dict<std::string, chipArgs.device = vm["device"].as<std::string>(); auto ctx = std::unique_ptr<Context>(new Context(chipArgs)); if (vm.count("compress-rbf")) - ctx->settings[ctx->id("compress_rbf")] = Property::State::S1; + ctx->settings[id_compress_rbf] = Property::State::S1; return ctx; } |