-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error(xxxxxxxxxxxxxxxxxxxxxxx) in Division output using the following testbench #24
Comments
Hi, Thanks for your comment. Please could you check that the divider is properly bound? At first glance, I would say that the component instance should be If that doesn't help, perhaps as a next step you could add the state signal from the divider to your waveform? This will help to see how far through the process the divider has got. Thanks |
I had already changed the name of the instance part. but this is not the problem. |
Ok, I tried running your testbench and I can see the problem now. These components use a synchronous reset, so there needs to be at least one rising edge of the clock while the reset is high. I changed |
I have changed that time accrding to u and ran the following divider code and the module but still it gave the same err. divider code `timescale 1ns / 1ps module divider( input clk; input [31:0] input_a; input [31:0] input_b; output [31:0] output_z; reg s_output_z_stb; reg [3:0] state; reg [31:0] a, b, z; always @(posedge clk)
end endmodule testbench module Divider_tb; reg clk, rst; wire input_a_ack; divider uut(
always #5 clk=~clk; initial begin
initial rst=1'b1; #20 rst=1'b0; #1 input_b=32'b00111110000101000000000000000000; endmodule |
Hi, I pasted your code into my sim (icarus verilog), and is seems to be working OK for me. I got this output ...
And here's a screenshot of the waveform... Please could you double check:
It might be worth monitoring state in the sim to check on progress. Thanks |
Actually i was trying it in xilinx vivado. But later i tried it in iverilog i found it working. Thank you for your help.Extremely obliged. |
Happy to help |
testbench:-
`timescale 1ns / 1ps
module Divider_tb;
reg clk, rst;
reg [31:0] input_a;
reg input_a_stb;
reg [31:0] input_b;
reg input_b_stb;
reg output_z_ack;
//reg s_input_a_ack,s_input_b_ack;
wire input_a_ack;
wire input_b_ack;
wire [31:0] output_z;
wire output_z_stb;
Flaoting_32_Divider uut(
initial
begin
initial
begin
$monitor("time=",$time,"input_a =%b,input_b=%b,output_z=%b",input_a,input_b,output_z);
end
endmodule
output:-
time= 0
input_a=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
input_b=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
output_z=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
time= 3
input_a =01000010101101101011000000000000,
input_b=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
output_z=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
time= 4
input_a=01000010101101101011000000000000,
input_b=00111110000101000000000000000000,
output_z=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The text was updated successfully, but these errors were encountered: