3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-30 04:15:52 +00:00

Small changes

This commit is contained in:
Akash Levy 2024-09-22 01:11:26 -07:00
parent 3b8c607dfd
commit f0b1d2cac5

View file

@ -230,7 +230,7 @@ bool is_blackbox(Netlist *nl)
RTLIL::IdString VerificImporter::new_verific_id(Verific::DesignObj *obj) RTLIL::IdString VerificImporter::new_verific_id(Verific::DesignObj *obj)
{ {
std::string s = stringf("$%s", obj->Name()); std::string s = stringf("$%s", obj->Name());
if (seen_ids.count(s)) s += stringf("$%d", autoidx++); while (seen_ids.count(s) > 0) s = "$" + s;
seen_ids.insert(s); seen_ids.insert(s);
return s; return s;
} }
@ -449,19 +449,21 @@ void VerificImporter::import_attributes(dict<RTLIL::IdString, RTLIL::Const> &att
auto type_range = nl->GetTypeRange(obj->Name()); auto type_range = nl->GetTypeRange(obj->Name());
if (!type_range) if (!type_range)
return; return;
// if (type_range->IsTypeScalar()) { /* SILIMATE: causes issues with OpenSTA attribute parsing
// const long long bottom_bound = type_range->GetScalarRangeLeftBound(); if (type_range->IsTypeScalar()) {
// const long long top_bound = type_range->GetScalarRangeRightBound(); const long long bottom_bound = type_range->GetScalarRangeLeftBound();
// const unsigned bit_width = type_range->NumElements(); const long long top_bound = type_range->GetScalarRangeRightBound();
// RTLIL::Const bottom_const(bottom_bound, bit_width); const unsigned bit_width = type_range->NumElements();
// RTLIL::Const top_const(top_bound, bit_width); RTLIL::Const bottom_const(bottom_bound, bit_width);
// if (bottom_bound < 0 || top_bound < 0) { RTLIL::Const top_const(top_bound, bit_width);
// bottom_const.flags |= RTLIL::CONST_FLAG_SIGNED; if (bottom_bound < 0 || top_bound < 0) {
// top_const.flags |= RTLIL::CONST_FLAG_SIGNED; bottom_const.flags |= RTLIL::CONST_FLAG_SIGNED;
// } top_const.flags |= RTLIL::CONST_FLAG_SIGNED;
// attributes.emplace(ID(bottom_bound), bottom_const); }
// attributes.emplace(ID(top_bound), top_const); attributes.emplace(ID(bottom_bound), bottom_const);
// } attributes.emplace(ID(top_bound), top_const);
}
*/
if (!type_range->IsTypeEnum()) if (!type_range->IsTypeEnum())
return; return;
#ifdef VERIFIC_VHDL_SUPPORT #ifdef VERIFIC_VHDL_SUPPORT