3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

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-06-28 11:51:31 +10:00 committed by Marcelina Kościelnicka
parent 843ad9331b
commit 4ffdee65e0
3 changed files with 21 additions and 26 deletions

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;

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;