mirror of https://github.com/YosysHQ/yosys.git
memory_dff: Add support for no_rw_check attribute.
This commit is contained in:
parent
01cb02c81d
commit
3a0aa9c663
|
@ -137,6 +137,7 @@ X(nomem2reg)
|
||||||
X(nomeminit)
|
X(nomeminit)
|
||||||
X(nosync)
|
X(nosync)
|
||||||
X(nowrshmsk)
|
X(nowrshmsk)
|
||||||
|
X(no_rw_check)
|
||||||
X(O)
|
X(O)
|
||||||
X(OFFSET)
|
X(OFFSET)
|
||||||
X(onehot)
|
X(onehot)
|
||||||
|
|
|
@ -357,6 +357,14 @@ struct MemoryDffWorker
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for no_rw_check
|
||||||
|
bool no_rw_check = mem.get_bool_attribute(ID::no_rw_check);
|
||||||
|
for (auto attr: {ID::ram_block, ID::rom_block, ID::ram_style, ID::rom_style, ID::ramstyle, ID::romstyle, ID::syn_ramstyle, ID::syn_romstyle}) {
|
||||||
|
if (mem.get_string_attribute(attr) == "no_rw_check") {
|
||||||
|
no_rw_check = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Construct cache.
|
// Construct cache.
|
||||||
MemQueryCache cache(qcsat, mem, port, ff);
|
MemQueryCache cache(qcsat, mem, port, ff);
|
||||||
|
|
||||||
|
@ -392,6 +400,8 @@ struct MemoryDffWorker
|
||||||
pd.uncollidable_mask[j] = true;
|
pd.uncollidable_mask[j] = true;
|
||||||
pd.collision_x_mask[j] = true;
|
pd.collision_x_mask[j] = true;
|
||||||
}
|
}
|
||||||
|
if (no_rw_check)
|
||||||
|
pd.collision_x_mask[j] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portdata.push_back(pd);
|
portdata.push_back(pd);
|
||||||
|
|
|
@ -443,6 +443,9 @@ void MemMapping::determine_style() {
|
||||||
std::string val_s = val.decode_string();
|
std::string val_s = val.decode_string();
|
||||||
for (auto &c: val_s)
|
for (auto &c: val_s)
|
||||||
c = std::tolower(c);
|
c = std::tolower(c);
|
||||||
|
// Handled in memory_dff.
|
||||||
|
if (val_s == "no_rw_check")
|
||||||
|
continue;
|
||||||
if (val_s == "auto") {
|
if (val_s == "auto") {
|
||||||
// Nothing.
|
// Nothing.
|
||||||
} else if (val_s == "logic" || val_s == "registers") {
|
} else if (val_s == "logic" || val_s == "registers") {
|
||||||
|
|
Loading…
Reference in New Issue