05.07.2013 Views

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

Xilinx Synthesis Technology User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Data Types<br />

you cannot select more than one element of an array at one time. You<br />

cannot pass multi-dimensional arrays to system tasks or functions, or<br />

regular tasks or functions.<br />

An example of a declaration is shown below:<br />

wire [7:0] array2 [0:255][0:15];<br />

The above describes an array of 256 x 16 wire elements each 8 bits<br />

wide, which can only be assigned via structural Verilog code.<br />

reg [63:0] regarray2 [255:0][7:0];<br />

The above describes an array of 256 x 8 register elements, each 64 bits<br />

wide, which can be assigned via behavioral verilog code.<br />

The Verilog representation of the bit data type contains the following<br />

four values:<br />

• 0: logic zero<br />

• 1: logic one<br />

• x: unknown logic value<br />

• z: high impedance<br />

XST includes support for the following Verilog data types:<br />

• Net: wire, tri, triand/wand, trior/wor<br />

• Registers: reg, integer<br />

• Supply nets: supply0, supply1<br />

• Constants: parameter<br />

• Multi-Dimensional Arrays (Memories)<br />

Net and registers can be either single bit (scalar) or multiple bit<br />

(vectors).<br />

The following example gives some examples of Verilog data types (as<br />

found in the declaration section of a Verilog module).<br />

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

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

Saved successfully!

Ooh no, something went wrong!