mirror of
https://github.com/verilator/verilator.git
synced 2025-05-03 22:16:53 +00:00
Fix class extend parameter dot case (#3926)
This commit is contained in:
parent
0e955d503e
commit
33468fa0e7
@ -2440,13 +2440,13 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const bool unresolvedClass = m_ds.m_unresolvedClass;
|
|
||||||
if (start) {
|
if (start) {
|
||||||
m_ds = lastStates;
|
m_ds = lastStates;
|
||||||
} else {
|
} else {
|
||||||
|
const bool unresolvedClass = m_ds.m_unresolvedClass;
|
||||||
m_ds.m_dotp = lastStates.m_dotp;
|
m_ds.m_dotp = lastStates.m_dotp;
|
||||||
|
m_ds.m_unresolvedClass |= unresolvedClass;
|
||||||
}
|
}
|
||||||
m_ds.m_unresolvedClass |= unresolvedClass;
|
|
||||||
}
|
}
|
||||||
void visit(AstSenItem* nodep) override {
|
void visit(AstSenItem* nodep) override {
|
||||||
VL_RESTORER(m_inSens);
|
VL_RESTORER(m_inSens);
|
||||||
|
@ -81,6 +81,15 @@ class ClsParam #(type T);
|
|||||||
typedef T param_t;
|
typedef T param_t;
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
|
class ClsWithParamField;
|
||||||
|
int m_field = Sum#(int)::sum;
|
||||||
|
int m_queue[$];
|
||||||
|
|
||||||
|
function int get(int index);
|
||||||
|
return m_queue[index];
|
||||||
|
endfunction
|
||||||
|
endclass
|
||||||
|
|
||||||
module t (/*AUTOARG*/);
|
module t (/*AUTOARG*/);
|
||||||
|
|
||||||
Cls c12;
|
Cls c12;
|
||||||
@ -93,6 +102,7 @@ module t (/*AUTOARG*/);
|
|||||||
SelfRefClassIntParam src1;
|
SelfRefClassIntParam src1;
|
||||||
SelfRefClassIntParam::self_int_t src10;
|
SelfRefClassIntParam::self_int_t src10;
|
||||||
IntQueue qi;
|
IntQueue qi;
|
||||||
|
ClsWithParamField cls_param_field;
|
||||||
int arr [1:0] = '{1, 2};
|
int arr [1:0] = '{1, 2};
|
||||||
initial begin
|
initial begin
|
||||||
c12 = new;
|
c12 = new;
|
||||||
@ -105,6 +115,7 @@ module t (/*AUTOARG*/);
|
|||||||
src1 = new;
|
src1 = new;
|
||||||
src10 = new;
|
src10 = new;
|
||||||
qi = new;
|
qi = new;
|
||||||
|
cls_param_field = new;
|
||||||
if (Cls#()::PBASE != 12) $stop;
|
if (Cls#()::PBASE != 12) $stop;
|
||||||
if (Cls#(4)::PBASE != 4) $stop;
|
if (Cls#(4)::PBASE != 4) $stop;
|
||||||
if (Cls8_t::PBASE != 8) $stop;
|
if (Cls8_t::PBASE != 8) $stop;
|
||||||
@ -153,6 +164,9 @@ module t (/*AUTOARG*/);
|
|||||||
if (ClsParam#(ClsStatic)::param_t::x != 1) $stop;
|
if (ClsParam#(ClsStatic)::param_t::x != 1) $stop;
|
||||||
if (ClsParam#(ClsStatic)::param_t::get_2() != 2) $stop;
|
if (ClsParam#(ClsStatic)::param_t::get_2() != 2) $stop;
|
||||||
|
|
||||||
|
cls_param_field.m_queue = '{1, 5, 7};
|
||||||
|
if (cls_param_field.get(2) != 7) $stop;
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user