mirror of https://github.com/YosysHQ/yosys.git
Fixed parsing or liberty file statements such as 'clocked_on : "(!CLK)";'
Patch by Tim Edwards
This commit is contained in:
parent
a12d39bc86
commit
845590aa8e
|
@ -69,12 +69,15 @@ static bool parse_pin(LibertyAst *cell, LibertyAst *attr, std::string &pin_name,
|
||||||
|
|
||||||
std::string value = attr->value;
|
std::string value = attr->value;
|
||||||
|
|
||||||
for (size_t pos = value.find_first_of("\" \t"); pos != std::string::npos; pos = value.find_first_of("\" \t"))
|
for (size_t pos = value.find_first_of("\" \t()"); pos != std::string::npos; pos = value.find_first_of("\" \t()"))
|
||||||
value.erase(pos, 1);
|
value.erase(pos, 1);
|
||||||
|
|
||||||
if (value[value.size()-1] == '\'') {
|
if (value[value.size()-1] == '\'') {
|
||||||
pin_name = value.substr(0, value.size()-1);
|
pin_name = value.substr(0, value.size()-1);
|
||||||
pin_pol = false;
|
pin_pol = false;
|
||||||
|
} else if (value[0] == '!') {
|
||||||
|
pin_name = value.substr(1, value.size()-1);
|
||||||
|
pin_pol = false;
|
||||||
} else {
|
} else {
|
||||||
pin_name = value;
|
pin_name = value;
|
||||||
pin_pol = true;
|
pin_pol = true;
|
||||||
|
|
Loading…
Reference in New Issue