R
Robert Willy
Guest
Hello,
When I implement an integrator, I notice that there are two kinds of writing.
One looks like this:
always @(posedge clk)
begin
if (rst)
begin
d1 <= 0;
d2 <= 0;
count <= 0;
end else
begin
// Integrator section
d2 <= d1 + d2;
d1 <= d_in + d1;
if (count == decimation_ratio - 1)
begin
count <= 16'b0;
d_tmp <= d2;
end else
count <= count + 16'd1;
end
end
The other is reverse the sequence of these two lines:
d1 <= d_in + d1;
d2 <= d1 + d2;
I think there should be one delay difference for the two coding lines.
The delay unit can be put in the forward path, or in the feedback path.
But I don't see there is such a difference in simulation and in FPGA
implementation.
What is your opinion on this?
Thanks,
When I implement an integrator, I notice that there are two kinds of writing.
One looks like this:
always @(posedge clk)
begin
if (rst)
begin
d1 <= 0;
d2 <= 0;
count <= 0;
end else
begin
// Integrator section
d2 <= d1 + d2;
d1 <= d_in + d1;
if (count == decimation_ratio - 1)
begin
count <= 16'b0;
d_tmp <= d2;
end else
count <= count + 16'd1;
end
end
The other is reverse the sequence of these two lines:
d1 <= d_in + d1;
d2 <= d1 + d2;
I think there should be one delay difference for the two coding lines.
The delay unit can be put in the forward path, or in the feedback path.
But I don't see there is such a difference in simulation and in FPGA
implementation.
What is your opinion on this?
Thanks,