How to apply b to a after a time delay: a<=#10b in Verilo

Status
Not open for further replies.

flushrat

Full Member level 3
Joined
Jan 25, 2005
Messages
180
Helped
23
Reputation
46
Reaction score
8
Trophy points
1,298
Activity points
1,532
About verilog-A question

In verilog, we can use apply b to a after a time delay: a <= #10 b
But in verilog-A, how can realize it?
Here is the verilog-A code:
integer a;
integer b;
@(V(clk),1) begin
a = b;
end

Simulation shows there should be some delay when applying a to b.
Now my method is apply b to a electrical first, then apply the electrical to a.
But it is quite complicated.

integer a;
integer b;
electrical c;
parameter td=1n;
c <+ transition ( b, td, tr, tf);
@(V(clk),1) begin
a = V(c);
end
 

Re: About verilog-A question

How about this?

@(timer(td)) begin
a = tmp;
tmp = b;
end
 

Re: About verilog-A question

Thank for your answer.
I am designing a series of DFFs, which are clock trigged.
But @timer cant be included in @(clk) statement.

cooldog said:
How about this?

@(timer(td)) begin
a = tmp;
tmp = b;
end
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…