05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

XST <strong>User</strong> <strong>Guide</strong><br />

If there is more than a single blocking/non blocking error, only the<br />

first one will be reported.<br />

In some cases, the line number for the error might be incorrect (as<br />

there might be multiple lines where the signal has been assigned).<br />

Integer Handling<br />

There are several cases where XST handles integers differently from<br />

other synthesis tools, and so they must be coded in a particular way.<br />

In case statements, do not use unsized integers in case item<br />

expressions, as this will cause unpredictable results. In the following<br />

example, the case item expression “4” is an unsized integer that will<br />

cause unpredictable results. To avoid problems, size the “4” to 3 bits<br />

as shown below.<br />

reg [2:0] condition1;<br />

always @(condition1)<br />

begin<br />

case(condition1)<br />

4 : data_out = 2; // < will generate bad logic<br />

3'd4 : data_out = 2; // < will work<br />

endcase<br />

end<br />

In concatenations, do not use unsized integers, as this will cause<br />

unpredictable results. If you must use an expression that results in an<br />

unsized integer, assign the expression to a temporary signal, and use<br />

the temporary signal in the concatenation as shown below.<br />

reg [31:0] temp;<br />

assign temp = 4’b1111 % 2;<br />

assign dout = {12/3,temp,din};<br />

7-34 <strong>Xilinx</strong> Development System

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!