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 />

Structural Verilog Features<br />

Structural Verilog descriptions assemble several blocks of code and<br />

allow the introduction of hierarchy in a design. The basic concepts of<br />

hardware structure are the module, the port and the signal. The<br />

component is the building or basic block. A port is a component I/O<br />

connector. A signal corresponds to a wire between components.<br />

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

module declaration provides the "external" view of the component; it<br />

describes what can be seen from the outside, including the<br />

component ports. The module body provides an "internal" view; it<br />

describes the behavior or the structure of the component.<br />

The connections between components are specified within<br />

component instantiation statements. These statements specify an<br />

instance of a component occurring within another component or the<br />

circuit. Each component instantiation statement is labeled with an<br />

identifier. Besides naming a component declared in a local<br />

component declaration, a component instantiation statement<br />

contains an association list (the parenthesized list) that specifies<br />

which actual signals or ports are associated with which local ports of<br />

the component declaration.<br />

The Verilog language provides a large set of built-in logic gates which<br />

can be instantiated to build larger logic circuits. The set of logical<br />

functions described by the built-in gates include AND, OR, XOR,<br />

NAND, NOR and NOT.<br />

Here is an example of building a basic XOR function of two single bit<br />

inputs a and b.<br />

module build_xor (a, b, c);<br />

input a, b;<br />

output c;<br />

wire c, a_not, b_not;<br />

not a_inv (a_not, a);<br />

not b_inv (b_not, b);<br />

and a1 (x, a_not, b);<br />

and a2 (y, b_not, a);<br />

or out (c, x, y);<br />

endmodule<br />

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

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

Saved successfully!

Ooh no, something went wrong!