[#73220] change signal name to its final name
This commit is contained in:
parent
379e91cf83
commit
5c3e3a35c2
|
|
@ -280,7 +280,7 @@ void VerilatedSaif::recursivelyPrintScopes(uint32_t scopeIndex) {
|
|||
|
||||
printIndent();
|
||||
printStr("(");
|
||||
printStr(signalName);
|
||||
printStr(signalName.c_str());
|
||||
if (activity.width > 1) {
|
||||
printStr("[");
|
||||
printStr(std::to_string(activity.lsb + i).c_str());
|
||||
|
|
@ -451,14 +451,6 @@ void VerilatedSaif::popPrefix() {
|
|||
|
||||
void VerilatedSaif::declare(uint32_t code, const char* name, const char* wirep, bool array,
|
||||
int arraynum, bool bussed, int msb, int lsb) {
|
||||
assert(m_currentScope >= 0);
|
||||
m_scopes.at(m_currentScope).childSignals.emplace_back(code, name);
|
||||
|
||||
// check if already declared to avoid duplicates
|
||||
if (m_activity.count(code)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const int bits = ((msb > lsb) ? (msb - lsb) : (lsb - msb)) + 1;
|
||||
|
||||
std::string hierarchicalName = m_prefixStack.back().first + name;
|
||||
|
|
@ -481,6 +473,9 @@ void VerilatedSaif::declare(uint32_t code, const char* name, const char* wirep,
|
|||
finalName += ']';
|
||||
}
|
||||
|
||||
assert(m_currentScope >= 0);
|
||||
m_scopes.at(m_currentScope).childSignals.emplace_back(code, std::move(finalName));
|
||||
|
||||
m_activity.emplace(code, ActivityVar{
|
||||
static_cast<uint32_t>(lsb),
|
||||
static_cast<uint32_t>(bits),
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct ActivityVar {
|
|||
struct SaifScope {
|
||||
std::string scopeName{};
|
||||
std::vector<int32_t> childScopesIndices{};
|
||||
std::vector<std::pair<uint32_t, const char*>> childSignals{};
|
||||
std::vector<std::pair<uint32_t, std::string>> childSignals{};
|
||||
int32_t parentScopeIndex{-1};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue