dipin
Full Member level 4
- Joined
- Jul 16, 2014
- Messages
- 223
- Helped
- 14
- Reputation
- 28
- Reaction score
- 14
- Trophy points
- 18
- Activity points
- 1,731
Why not, I'm primarily interested in the testbench and the portion of the design that distributes the clock that drives the first register that gets data. If my theory is correct you've got data that is captured on the same edge it transitions.HI
actually its not possible to post code.......
[FONT=Courier New] ____ ____ ____
clk __| |____| |____| |_
__ _________ _________ ______
din __X___A_____X___B_____X___C__
__ _________ _________ ______
q_bad __X___A_____X___B_____X___C__
__ _________ _________ ______
q_ok __X___?_____X___A_____X___B__[/FONT]
.**broken link removed**
this is the output wave form.
in this out must come in the rising edge of the previous clock.
but it is coming in negative edge???
how can i solve this???
if i increase the frequency , the latency will increase more...
regards
A behavioral simulation has no timing information about the logic. It only knows when the clock transitions occur. A design with 999 cascaded inverters would behave in simulation exactly the same a one with 1 inverter. In both cases the simulation would show changes in the output with a 0 delay offset from changes in the input.when i do behavioral simulation my output is coming with a latency of 9 clockcycle(what ever be the clock frequency) .
but in my post route simulation output is coming after 10 clock cycle(100 mhz). so how can i fix this ???
This is because you don't know the difference between behavioral and post route simulation. The first has no timing information about the design beyond the clock you use. The second has full placed and routed timing delays for a specific PVT corner (or nominal values).i also noticed that if i decrease the frequency (50 mhz) then output is coming in 10th clock cycle. little decrease in the delay??
Also my outputs are correct but the are coming in the wrong clock compared to behavioral simulation.
Why not, I'm primarily interested in the testbench and the portion of the design that distributes the clock that drives the first register that gets data. If my theory is correct you've got data that is captured on the same edge it transitions.
always @(posedge clk)begin
if(reset) begin
........apply 0 to registers...............
end else if( !reset ) begin
temp_in_data[1][N+1:2] <= in_data[N-1:0];
xtemp_in_data_1[N+3:4] <= in_data[N-1:0];
temp_sub_result_1 <= 1;
xa_out_data[0] <= 0;
if(conditions)begin
if(conditions) begin
.....design......
end
end
module_test();
......
initial begin;
in_data = 0;
reset =1;
#100 = 0;
#10 in_data = 32'd10000;
#10 in_data = 32'd20000;
#10 in_data = 32'd30000;
#10 in_data = 32'd40000;
#10 in_data = 32'd50000;
end
always begin
#5 clk <=~clk;
end
endmodule
module sqrt_test();
reg [31:0]in_data;
reg clk;
reg reset;
reg [31:0]count;
wire [16:0]out_data;
wire [17:0]remainder;
sqrt U1(
.in_data(in_data),
.clk(clk),
.reset(reset),
.out_data(out_data),
.remainder(remainder)
);
initial begin
clk =1;
reset =1'b1;
in_data =32'd0;
count = 0;
repeat(10) @(negedge clk);
reset=1'b0;
count = 40000;
end
always@(negedge clk) begin
if(!reset) begin
in_data = count;
count = count+1;
end
end
always begin
#5 clk <=~clk;
end
endmodule
Why is in_data and count assigned under reset?
2. it will fitMoreover 40000 will not fit in 32 bits
This begs the question: Did the OP have any timing constraints for the design when they ran synthesis, placement, and route?then it just means that this design has not been timing closed for the increased frequency.
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 end else if( !reset ) begin temp_in_data[1][N+1:2] <= in_data[N-1:0]; xtemp_in_data_1[N+3:4] <= in_data[N-1:0]; if(conditions)begin if(conditions) begin .....design...... end end
always @(posedge clk)begin
if(reset) begin
tin_data <=0;
............
remainder <= 0;
out_data <= 0;
end else begin
tin_data <= in_data;
temp_in_data[1][N+1:2] <= tin_data[N-1:0];
xtemp_in_data_1[N+3:4] <= tin_data[N-1:0];
temp_sub_result_1 <= 1;
xa_out_data[0] <= 0;
if (condition)
......design............
Can you dump the timing reports from tin_data to temp_in_data and from tin_data to xtemp_in_data? This should give you an idea of what is happening..
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?