Merge pull request #1034 from lushaylabs/support-windows-crlf

Support windows line endings in constraints for nextpnr-gowin
This commit is contained in:
myrtle 2022-10-17 12:33:33 +02:00 committed by GitHub
commit bd082132ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -876,12 +876,12 @@ void Arch::read_cst(std::istream &in)
// If two locations are specified separated by commas (for differential I/O buffers), // If two locations are specified separated by commas (for differential I/O buffers),
// only the first location is actually recognized and used. // only the first location is actually recognized and used.
// And pin A will be Positive and pin B will be Negative in any case. // And pin A will be Positive and pin B will be Negative in any case.
std::regex iobre = std::regex("IO_LOC +\"([^\"]+)\" +([^ ,;]+)(, *[^ ;]+)? *;.*"); std::regex iobre = std::regex("IO_LOC +\"([^\"]+)\" +([^ ,;]+)(, *[^ ;]+)? *;.*[\\s\\S]*");
std::regex portre = std::regex("IO_PORT +\"([^\"]+)\" +([^;]+;).*"); std::regex portre = std::regex("IO_PORT +\"([^\"]+)\" +([^;]+;).*[\\s\\S]*");
std::regex port_attrre = std::regex("([^ =;]+=[^ =;]+) *([^;]*;)"); std::regex port_attrre = std::regex("([^ =;]+=[^ =;]+) *([^;]*;)");
std::regex iobelre = std::regex("IO([TRBL])([0-9]+)\\[?([A-Z])\\]?"); std::regex iobelre = std::regex("IO([TRBL])([0-9]+)\\[?([A-Z])\\]?");
std::regex inslocre = std::regex("INS_LOC +\"([^\"]+)\" +R([0-9]+)C([0-9]+)\\[([0-9])\\]\\[([AB])\\] *;.*"); std::regex inslocre = std::regex("INS_LOC +\"([^\"]+)\" +R([0-9]+)C([0-9]+)\\[([0-9])\\]\\[([AB])\\] *;.*[\\s\\S]*");
std::regex clockre = std::regex("CLOCK_LOC +\"([^\"]+)\" +BUF([GS])(\\[([0-7])\\])?[^;]*;.*"); std::regex clockre = std::regex("CLOCK_LOC +\"([^\"]+)\" +BUF([GS])(\\[([0-7])\\])?[^;]*;.*[\\s\\S]*");
std::smatch match, match_attr, match_pinloc; std::smatch match, match_attr, match_pinloc;
std::string line, pinline; std::string line, pinline;
enum enum