mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Cleanup
This commit is contained in:
parent
a73f96594f
commit
dccd7eb39f
|
@ -330,7 +330,7 @@ struct rules_t
|
||||||
|
|
||||||
if (GetSize(tokens) >= 2 && tokens[0] == "attribute") {
|
if (GetSize(tokens) >= 2 && tokens[0] == "attribute") {
|
||||||
data.attributes.emplace_back();
|
data.attributes.emplace_back();
|
||||||
for (int idx = 1; idx <= GetSize(tokens)-1; idx++) {
|
for (int idx = 1; idx < GetSize(tokens); idx++) {
|
||||||
size_t c1 = tokens[idx][0] == '!' ? 1 : 0;
|
size_t c1 = tokens[idx][0] == '!' ? 1 : 0;
|
||||||
size_t c2 = tokens[idx].find("=");
|
size_t c2 = tokens[idx].find("=");
|
||||||
bool exists = (c1 == 0);
|
bool exists = (c1 == 0);
|
||||||
|
@ -854,12 +854,10 @@ grow_read_ports:;
|
||||||
if (!exists)
|
if (!exists)
|
||||||
ss << "!";
|
ss << "!";
|
||||||
IdString key = std::get<1>(sums.front());
|
IdString key = std::get<1>(sums.front());
|
||||||
ss << key.str();
|
ss << log_id(key);
|
||||||
const Const &value = std::get<2>(sums.front());
|
const Const &value = std::get<2>(sums.front());
|
||||||
if (exists)
|
if (exists && value != Const(1))
|
||||||
ss << "=";
|
ss << "=\"" << value.decode_string() << "\"";
|
||||||
if (value != Const(1))
|
|
||||||
ss << "\"" << value.decode_string() << "\"";
|
|
||||||
|
|
||||||
log(" Rule for bram type %s rejected: requirement 'attribute %s ...' not met.\n",
|
log(" Rule for bram type %s rejected: requirement 'attribute %s ...' not met.\n",
|
||||||
log_id(match.name), ss.str().c_str());
|
log_id(match.name), ss.str().c_str());
|
||||||
|
@ -1180,12 +1178,10 @@ void handle_cell(Cell *cell, const rules_t &rules)
|
||||||
if (!exists)
|
if (!exists)
|
||||||
ss << "!";
|
ss << "!";
|
||||||
IdString key = std::get<1>(sums.front());
|
IdString key = std::get<1>(sums.front());
|
||||||
ss << key.str();
|
ss << log_id(key);
|
||||||
const Const &value = std::get<2>(sums.front());
|
const Const &value = std::get<2>(sums.front());
|
||||||
if (exists)
|
if (exists && value != Const(1))
|
||||||
ss << "=";
|
ss << "=\"" << value.decode_string() << "\"";
|
||||||
if (value != Const(1))
|
|
||||||
ss << "\"" << value.decode_string() << "\"";
|
|
||||||
|
|
||||||
log(" Rule for bram type %s (variant %d) rejected: requirement 'attribute %s ...' not met.\n",
|
log(" Rule for bram type %s (variant %d) rejected: requirement 'attribute %s ...' not met.\n",
|
||||||
log_id(bram.name), bram.variant, ss.str().c_str());
|
log_id(bram.name), bram.variant, ss.str().c_str());
|
||||||
|
|
Loading…
Reference in a new issue