Himbaechel xilinx : Fix regex to parse Zynq device names

This commit is contained in:
Adrien Prost-Boucle 2024-08-19 16:13:25 +02:00 committed by Lofty
parent 0d5d32951c
commit fa55e93848

View File

@ -43,8 +43,8 @@ void XilinxImpl::init_database(Arch *arch)
{ {
const ArchArgs &args = arch->args; const ArchArgs &args = arch->args;
init_uarch_constids(arch); init_uarch_constids(arch);
std::regex devicere = std::regex("(xc7[azkv]\\d+t)([a-z0-9]+)-(\\dL?)");
std::smatch match; std::smatch match;
std::regex devicere = std::regex("(xc7[azkv]\\d+t?)([a-z0-9]+)-(\\dL?)");
if (!std::regex_match(args.device, match, devicere)) { if (!std::regex_match(args.device, match, devicere)) {
log_error("Invalid device %s\n", args.device.c_str()); log_error("Invalid device %s\n", args.device.c_str());
} }