diff options
author | gatecat <gatecat@ds0.me> | 2021-11-07 08:12:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-07 08:12:12 +0000 |
commit | b7207b088539e7b5f34ebbd9f53f9fa14bef6e62 (patch) | |
tree | d6fb308cea78395e25ac08e779ccc6cff75ffedb /gowin/main.cc | |
parent | 1615b0a50044b2cef2fa5d572c7010040c98fe19 (diff) | |
parent | deb14762aadc9eda0610215849829f5957d7c71d (diff) | |
download | nextpnr-b7207b088539e7b5f34ebbd9f53f9fa14bef6e62.tar.gz nextpnr-b7207b088539e7b5f34ebbd9f53f9fa14bef6e62.tar.bz2 nextpnr-b7207b088539e7b5f34ebbd9f53f9fa14bef6e62.zip |
Merge pull request #859 from yrabbit/gowin-packages
gowin: Add partnumbers and packages to the chipdb
Diffstat (limited to 'gowin/main.cc')
-rw-r--r-- | gowin/main.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gowin/main.cc b/gowin/main.cc index a56cc8e8..c6697ecc 100644 --- a/gowin/main.cc +++ b/gowin/main.cc @@ -54,7 +54,7 @@ po::options_description GowinCommandHandler::getArchOptions() std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Property> &values) { - std::regex devicere = std::regex("GW1N([A-Z]*)-(LV|UV|UX)([0-9])(C?)([A-Z]{2}[0-9]+)(C[0-9]/I[0-9])"); + std::regex devicere = std::regex("GW1N([A-Z]*)-(LV|UV|UX)([0-9])(C?).*"); std::smatch match; std::string device = vm["device"].as<std::string>(); if (!std::regex_match(device, match, devicere)) { @@ -62,8 +62,6 @@ std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Pr } ArchArgs chipArgs; char buf[36]; - snprintf(buf, 36, "GW1N%s-%s%s", match[1].str().c_str(), match[3].str().c_str(), match[4].str().c_str()); - chipArgs.device = buf; // 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. @@ -73,8 +71,7 @@ std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Pr snprintf(buf, 36, "GW1N-%s", match[3].str().c_str()); } chipArgs.family = buf; - chipArgs.package = match[5]; - chipArgs.speed = match[6]; + chipArgs.partnumber = match[0]; return std::unique_ptr<Context>(new Context(chipArgs)); } |