R
Robert Willy
Guest
Hi,
When I simulate my test bench, it is a surprise that d_in0 and d_in have the
save waveform. From my impression on registered signals, d_in should have one
clock delay than d_in0. Could you explain it to me?
Thanks in advance.
initial
begin
repeat(10) @(posedge clk);
rst <= 1'b1;
@(posedge clk);
rst <= 1'b0;
repeat(5) @(posedge clk);
while (!$feof(x_in))
begin
x_read <= $fscanf(x_in,"%d\n",d_in0);
d_in <= d_in0;
@(posedge clk);
end
repeat(1000) @(posedge clk);
$fclose(x_in);
$fclose(x_out);
$stop;
end
When I simulate my test bench, it is a surprise that d_in0 and d_in have the
save waveform. From my impression on registered signals, d_in should have one
clock delay than d_in0. Could you explain it to me?
Thanks in advance.
initial
begin
repeat(10) @(posedge clk);
rst <= 1'b1;
@(posedge clk);
rst <= 1'b0;
repeat(5) @(posedge clk);
while (!$feof(x_in))
begin
x_read <= $fscanf(x_in,"%d\n",d_in0);
d_in <= d_in0;
@(posedge clk);
end
repeat(1000) @(posedge clk);
$fclose(x_in);
$fclose(x_out);
$stop;
end