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.

Modules<br />

Verilog Language Support<br />

In Verilog a design component is represented by a module. The<br />

connections between components are specified within module<br />

instantiation statements. Such a statement specifies an instance of a<br />

module. Each module instantiation statement must be given a name<br />

(instance name). In addition to the name, a module instantiation<br />

statement contains an association list that specifies which actual nets<br />

or ports are associated with which local ports (formals) of the module<br />

declaration.<br />

All procedural statements occur in blocks that are defined inside<br />

modules. There are two kinds of procedural blocks: the initial block<br />

and the always block. Within each block, Verilog uses a begin and end<br />

to enclose the statements. Since initial blocks are ignored during<br />

synthesis, only always blocks are discussed. Always blocks usually<br />

take the following format:<br />

always<br />

begin<br />

statement<br />

…...<br />

end<br />

where each statement is a procedural assignment line terminated by a<br />

semicolon.<br />

Module Declaration<br />

In the module declaration, the I/O ports of the circuit are declared.<br />

Each port has a name and a mode (in, out, and inout) as shown in the<br />

example below.<br />

module EXAMPLE (A, B, C, D, E);<br />

input A, B, C;<br />

output D;<br />

inout E;<br />

wire D, E;<br />

...<br />

assign E = oe ? A : 1’bz;<br />

assign D = B & E;<br />

...<br />

endmodule<br />

XST <strong>User</strong> <strong>Guide</strong> 7-9

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

Saved successfully!

Ooh no, something went wrong!