aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/main.cc
diff options
context:
space:
mode:
authorYRabbit <rabbit@yrabbit.cyou>2022-12-30 11:55:39 +1000
committerYRabbit <rabbit@yrabbit.cyou>2022-12-30 11:55:39 +1000
commitb8ab3116b223648af19c190c392c1fe36844907b (patch)
tree6226d4a8605d8b99ff1e629d4d9dae0eb6b9e7c0 /gowin/main.cc
parent8424dc79d2555ce6b070371c9a5fb11aa76e950d (diff)
downloadnextpnr-b8ab3116b223648af19c190c392c1fe36844907b.tar.gz
nextpnr-b8ab3116b223648af19c190c392c1fe36844907b.tar.bz2
nextpnr-b8ab3116b223648af19c190c392c1fe36844907b.zip
gowin: improve clock wire routing
The dedicated router for clock wires now understands not only the IO pins but also the rPLL outputs as clock sources. This simple router sets an optimal route, so it is now the default router. It can be disabled with the --disable-globals command line flag if desired, but this is not recommended due to possible clock skew. Still for GW1N-4C there is no good router for clock wires as there external quartz resonator is connected via PLL. Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Diffstat (limited to 'gowin/main.cc')
-rw-r--r--gowin/main.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gowin/main.cc b/gowin/main.cc
index 36bd8656..ccf4d190 100644
--- a/gowin/main.cc
+++ b/gowin/main.cc
@@ -51,7 +51,8 @@ po::options_description GowinCommandHandler::getArchOptions()
specific.add_options()("device", po::value<std::string>(), "device name");
specific.add_options()("family", po::value<std::string>(), "family name");
specific.add_options()("cst", po::value<std::string>(), "physical constraints file");
- specific.add_options()("enable-globals", "separate routing of the clocks");
+ specific.add_options()("enable-globals", "enable separate routing of the clocks");
+ specific.add_options()("disable-globals", "disable separate routing of the clocks");
specific.add_options()("enable-auto-longwires", "automatic detection and routing of long wires");
return specific;
}
@@ -84,11 +85,10 @@ std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Pr
auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
// routing options
- // the default values will change in the future
- ctx->settings[ctx->id("arch.enable-globals")] = 0;
+ ctx->settings[ctx->id("arch.enable-globals")] = 1;
ctx->settings[ctx->id("arch.enable-auto-longwires")] = 0;
- if (vm.count("enable-globals")) {
- ctx->settings[ctx->id("arch.enable-globals")] = 1;
+ if (vm.count("disable-globals")) {
+ ctx->settings[ctx->id("arch.enable-globals")] = 0;
}
if (vm.count("enable-auto-longwires")) {
ctx->settings[ctx->id("arch.enable-auto-longwires")] = 1;