Merge pull request #923 from yrabbit/partnumber-re

gowin: recognize partnumbers of GW1NZ-1
This commit is contained in:
gatecat 2022-02-24 11:13:39 +00:00 committed by GitHub
commit 33ca747b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ po::options_description GowinCommandHandler::getArchOptions()
std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Property> &values) std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Property> &values)
{ {
std::regex devicere = std::regex("GW1N(S?)[A-Z]*-(LV|UV|UX)([0-9])(C?).*"); std::regex devicere = std::regex("GW1N([SZ]?)[A-Z]*-(LV|UV|UX)([0-9])(C?).*");
std::smatch match; std::smatch match;
std::string device = vm["device"].as<std::string>(); std::string device = vm["device"].as<std::string>();
if (!std::regex_match(device, match, devicere)) { if (!std::regex_match(device, match, devicere)) {