As @maerhart pointed out, there is an issue in Moore surrounding instances, where each connected signal would first be probed, then driven to a temporary with a delay, before connecting to the instance. In cases of simple connections like .clk(clk), this is not what should happen. For expression connections like .data(a + b * 3), this is okay.
Example
The SV input
module A(input clk);
B b(clk);
endmodule
module B(input clk);
endmodule
The delay of 1e is also wrong: in case of an expression, a 1d delay is expected.
Todo
[x] During lvalue/rvalue codegen, track the required mode (signal vs. value); if an identifier refers to a signal, and signal mode is needed, don't emit the prb/drv combo.
[x] If a temporary signal is needed, the drv should have a 1d delay
As @maerhart pointed out, there is an issue in Moore surrounding instances, where each connected signal would first be probed, then driven to a temporary with a delay, before connecting to the instance. In cases of simple connections like
.clk(clk)
, this is not what should happen. For expression connections like.data(a + b * 3)
, this is okay.Example
The SV input
translates to
when it should actually just be
The delay of
1e
is also wrong: in case of an expression, a1d
delay is expected.Todo
prb
/drv
combo.drv
should have a1d
delay