Fixed parsing or liberty file statements such as 'clocked_on : "(!CLK)";'
authorClifford Wolf <clifford@clifford.at>
Wed, 16 Oct 2013 04:32:35 +0000 (06:32 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 16 Oct 2013 04:32:35 +0000 (06:32 +0200)
Patch by Tim Edwards

passes/dfflibmap/dfflibmap.cc

index dd873cadd9bec30def2dd4222d7dd72fff13f328..5e3219d55bf7f7502c0805a743e083b1182ae80e 100644 (file)
@@ -69,12 +69,15 @@ static bool parse_pin(LibertyAst *cell, LibertyAst *attr, std::string &pin_name,
        
        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);
 
        if (value[value.size()-1] == '\'') {
                pin_name = value.substr(0, value.size()-1);
                pin_pol = false;
+       } else if (value[0] == '!') {
+               pin_name = value.substr(1, value.size()-1);
+               pin_pol = false;
        } else {
                pin_name = value;
                pin_pol = true;