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.

Procedural Assignments<br />

Verilog Language Support<br />

Procedural assignments are used to assign values to variables<br />

declared as regs and are introduced by always blocks, tasks, and<br />

functions. Procedural assignments are usually used to model<br />

registers and FSMs.<br />

XST includes support for combinatorial functions, combinatorial and<br />

sequential tasks, and combinatorial and sequential always blocks.<br />

Combinatorial Always Blocks<br />

Combinatorial logic can be modeled efficiently using two forms of<br />

time control, the # and @ Verilog time control statements. The # time<br />

control is ignored for synthesis and hence this section describes<br />

modeling combinatorial logic with the @ statement.<br />

A combinatorial always block has a sensitivity list appearing within<br />

parentheses after the word "always @". An always block is activated if<br />

an event (value change or edge) appears on one of the sensitivity list<br />

signals. This sensitivity list can contain any signal that appears in<br />

conditions (If, Case, for example), and any signal appearing on the<br />

right hand side of an assignment. By substituting a * without<br />

parentheses, for a list of signals, the always block is activated for an<br />

event in any of the always block’s signals as described above.<br />

Note In combinatorial processes, if a signal is not explicitly assigned<br />

in all branches of "If" or "Case" statements, XST will generate a latch<br />

to hold the last value. To avoid latch creation, be sure that all assigned<br />

signals in a combinatorial process are always explicitly assigned in all<br />

paths of the process statements.<br />

Different statements can be used in a process:<br />

• Variable and signal assignment<br />

• If... else statement<br />

• Case statement<br />

• For and while loop statement<br />

• Function and task call<br />

The following sections provide examples of each of these statements.<br />

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

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

Saved successfully!

Ooh no, something went wrong!