J
Jan Stuyt
Guest
Hello Verilog community,
Does anyone know how to program a transport delay, rather than the default inertial delay?
Here is the problem:
--------------------------------------------------------------------------------
`timescale 1ns / 1ps
module problem;
reg a;
wire b;
initial
begin
a = 1'b0;
#5 a = 1'b1; // pulse just one time unit wide
#6 a = 1'b0;
#10 a = 1'b1;
#15 $finish;
end
assign #2 b = a; // intend to delay the pulse by 2 time units
initial $monitor($time,,a,b); // the pulse on b is gone!
endmodule
--------------------------------------------------------------------------------
Because the width of the pulse on signal a is less than the distributed delay in the assignment to b,
the default Verilog behaviour is cancel the pulse altogether. In VHDL you can add the qualifier
"transport" in the assignment:
b <= transport a after 2 ns;
which neatly shifts the 1ns pulse by 2ns.
Question: How do I get this behaviour in Verilog?
Note: I use Verilog-XL, NcVerilog or ncvlog/ncelab/ncsim; I want consistent behaviour in all simulators.
Does anyone know how to program a transport delay, rather than the default inertial delay?
Here is the problem:
--------------------------------------------------------------------------------
`timescale 1ns / 1ps
module problem;
reg a;
wire b;
initial
begin
a = 1'b0;
#5 a = 1'b1; // pulse just one time unit wide
#6 a = 1'b0;
#10 a = 1'b1;
#15 $finish;
end
assign #2 b = a; // intend to delay the pulse by 2 time units
initial $monitor($time,,a,b); // the pulse on b is gone!
endmodule
--------------------------------------------------------------------------------
Because the width of the pulse on signal a is less than the distributed delay in the assignment to b,
the default Verilog behaviour is cancel the pulse altogether. In VHDL you can add the qualifier
"transport" in the assignment:
b <= transport a after 2 ns;
which neatly shifts the 1ns pulse by 2ns.
Question: How do I get this behaviour in Verilog?
Note: I use Verilog-XL, NcVerilog or ncvlog/ncelab/ncsim; I want consistent behaviour in all simulators.