cxxrtl: store comb $print cell last EN/ARGS in module

statics were obviously wrong -- may be multiple instantiations of any
given module.  Extend test to cover this.
This commit is contained in:
Charlotte
2023-08-11 04:46:52 +02:00
committed by Marcelina Kościelnicka
parent 843ad9331b
commit 4ffdee65e0
3 changed files with 21 additions and 26 deletions
+6 -3
View File
@@ -3,11 +3,14 @@
int main()
{
cxxrtl_design::p_top uut;
cxxrtl_design::p_top uut1, uut2;
for (int i = 0; i < 20; ++i) {
uut.p_clk.set(!uut.p_clk);
uut.step();
uut1.p_clk.set(!uut1.p_clk);
uut1.step();
uut2.p_clk.set(!uut2.p_clk);
uut2.step();
}
return 0;
+2 -1
View File
@@ -1,7 +1,8 @@
module tb;
reg clk = 0;
top uut (.clk(clk));
top uut1 (.clk(clk));
top uut2 (.clk(clk));
always #1 clk <= ~clk;
initial #20 $finish;