#888 Module path delays do not properly filter pulses


By default, module path delays described in a specify block should be modelled as pure inertial delays. So if I write inside a module:

assign o = i;

(i => o) = (4,0);

and outside the module:

initial begin
i = 0;
$monitor("%t i=%b, o=%b", $time, i, o);
#1 i = 1;
#1 i = 0;
#1 i = 1;
#8 $finish;

the expected output would be:

0 i=0, o=0
1 i=1, o=0
2 i=0, o=0
3 i=1, o=0
7 i=1, o=1

i.e. the first pulse has been swallowed. The output from Icarus is:

0 i=0, o=0
1 i=1, o=0
2 i=0, o=0
3 i=1, o=0
5 i=1, o=1

i.e. the first pulse has not been swallowed, but the pulse back to zero has.

If I replace the module path delay with a delayed continuous assignment, i.e.

assign #(4,0) o = i;

then I get the correct behaviour.

A quick look at the code suggests we just need to copy the pulse filtering code from vvp_fun_delay into vvp_fun_modpath, although no doubt it will prove more complicated than that...


  • Martin Whitaker

    Martin Whitaker - 2012-05-07

    test case illustrating problem

  • Martin Whitaker

    Martin Whitaker - 2012-08-09
    • assigned_to: nobody --> martinwhitaker

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks