Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Newbie
areyes30
Posts: 1
Registered: ‎12-18-2009
0

verilog binary division

I am having a problem with binary division in Verilog. I want to get an output that contains the quotient. I will later take care of the location of the decima. The following code works perfectly, and I can display the output, which matches exactly what I am looking for.

 

assign dividend = 48'h800000000000; 

assign quotient = dividend / 24'ha00000;

 

 

However, when I try a slightly different approach, as seen below, I get the following error.

 

 

assign dividend = 48'h800000000000;  
assign quotient = dividend / {1'b1, in2[22:0]};

 

The error is:

 

ERROR:Xst:870 - "fp_arith.v" line 293: Can not simplify operator DIV.

 

I tried searching for this error online and found little information. Would someone please help me figure out why the first case works, but the second one will not. Thank you in advance.

 

Xilinx Employee
Xilinx Employee
ywu
Posts: 2,861
Registered: ‎11-28-2007
0

Re: verilog binary division

You may get faster response if you posted your question on the synthesis board.

 

The division support is very limited. In fact, XST UG states that it only supports when divisor is power of 2 (see snapshot below). You may want to use the "Divider Generator" from CoreGen. For CoreGen 11.x, you will need to apply a patch available from  http://www.xilinx.com/support/answers/33993.htm

 

 

Cheers,
Jim
ScreenHunter_07 Dec. 19 08.05.gif