-1

I am trying to implement a 32-bit divider in Verilog and I am having issues. A and B are the numbers to be divided. Here is my code so far. The output of the testbench is: enter image description here

What am I doing wrong? Also, what does it mean when the output is both Hi and Low at the same time? This is being implemented in EDAPlayground:

Design and Testbench

Dimitris S
  • 135
  • 1
  • 13

1 Answers1

1

Unsure if this is your only problem, but you are casing on nextstate in your combinational logic block in the control path. You should be casing on state (ie, it should not be case (nextstate) but case (state))

You should also not be setting load, run, err and ok in both the always @(posedge clk or negedge reset) register block and the always @(*) combinational block in the control path, they should only be assigned from the combinational block.

Unn
  • 4,775
  • 18
  • 30