S
skyworld
Guest
Hi,
I would like to generage some data with random delay from rising edge
of clock, which simulates data jitter. I write code as this:
always @ (posedge clk or negedge rstn)
begin
if (!rstn)
data <= 4'b0;
else
data <= #($random%10*period/100) input_data;
end
period is defined as clock cycle time. My purpose is to generate data
which appears after clock rising edge with random delayed time (within
10% of clock period). But this doesn't work. Every time the data always
changes at the rising edge of clock. I am confused. Can anybody explain
why this happens? Thanks very much.
skyworld
I would like to generage some data with random delay from rising edge
of clock, which simulates data jitter. I write code as this:
always @ (posedge clk or negedge rstn)
begin
if (!rstn)
data <= 4'b0;
else
data <= #($random%10*period/100) input_data;
end
period is defined as clock cycle time. My purpose is to generate data
which appears after clock rising edge with random delayed time (within
10% of clock period). But this doesn't work. Every time the data always
changes at the rising edge of clock. I am confused. Can anybody explain
why this happens? Thanks very much.
skyworld