aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/main.cc
diff options
context:
space:
mode:
authorYRabbit <rabbit@yrabbit.cyou>2021-12-15 07:56:34 +1000
committerYRabbit <rabbit@yrabbit.cyou>2021-12-15 07:56:34 +1000
commit120ed0c42d0d7a70003667d4e8dcc7b9ac86afef (patch)
treec32520593bf36d4a67629b05b5e6c37a5254afba /gowin/main.cc
parent762125d3cfa26f5718d409a33c2cf57b157f692b (diff)
downloadnextpnr-120ed0c42d0d7a70003667d4e8dcc7b9ac86afef.tar.gz
nextpnr-120ed0c42d0d7a70003667d4e8dcc7b9ac86afef.tar.bz2
nextpnr-120ed0c42d0d7a70003667d4e8dcc7b9ac86afef.zip
gowin: Recognize models correctly
For example, clearly distinguish between GW1N-4 GW1NR-4 GW1NS-4 GW1NSR-4 GW1NSR-4 Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Diffstat (limited to 'gowin/main.cc')
-rw-r--r--gowin/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gowin/main.cc b/gowin/main.cc
index c6697ecc..cbd62ed9 100644
--- a/gowin/main.cc
+++ b/gowin/main.cc
@@ -65,7 +65,7 @@ std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Pr
// GW1N and GW1NR variants share the same database.
// Most Gowin devices are a System in Package with some SDRAM wirebonded to a GPIO bank.
// However, it appears that the S series with embedded ARM core are unique silicon.
- if (match[1].str() == "S") {
+ if (match[1].str().length() && match[1].str()[0] == 'S') {
snprintf(buf, 36, "GW1NS-%s", match[3].str().c_str());
} else {
snprintf(buf, 36, "GW1N-%s", match[3].str().c_str());