L
Lou Barth
Guest
Hi guys,
I try to model a complexe analog circuit with assymetric timing behavior. Imagine a circuit with start as input and out as output.
When start rise, out rise after 10 ns.
When start fall, out fall after 100ns.
If a falling glitch occurs on start, I expect to have out staing at 1, I expect to have the out falling event cancel of the simulator memory when start rise again. I try many solutions like blocking and non blocking assignement, using join fork ... I have no idea how I can model that correctly.
You will find code + tb just after, any help will be warmly welcome!
Lou Barth
reg start;
reg out_be;
always @ (start) begin
if ( start == 1'b1) begin
#10 out = 1'b1;
end
else begin
#100 out = 1'b0;
end
end
initial begin: main_loop
start = 1'b1;
#20 start = 1'b0;
#20 start = 1'b1;
end
I try to model a complexe analog circuit with assymetric timing behavior. Imagine a circuit with start as input and out as output.
When start rise, out rise after 10 ns.
When start fall, out fall after 100ns.
If a falling glitch occurs on start, I expect to have out staing at 1, I expect to have the out falling event cancel of the simulator memory when start rise again. I try many solutions like blocking and non blocking assignement, using join fork ... I have no idea how I can model that correctly.
You will find code + tb just after, any help will be warmly welcome!
Lou Barth
reg start;
reg out_be;
always @ (start) begin
if ( start == 1'b1) begin
#10 out = 1'b1;
end
else begin
#100 out = 1'b0;
end
end
initial begin: main_loop
start = 1'b1;
#20 start = 1'b0;
#20 start = 1'b1;
end