15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

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.

Because synthesis tools do not support every language feature, models used for synthesis must use a<br />

subset of the HDL’s features. In VHDL, signals should be used for synthesis models instead of variables.<br />

HDL models intended for synthesis should not include propagation delay times. After logic synthesis,<br />

actual delay times will be automatically calculated by the FPGA CAD tools for use in simulation. Initial<br />

values for variables or signals are not supported in HDL synthesis tools. This means that most HDL<br />

models originally written only for simulation use will not synthesize.<br />

Using HDLs for Design Entry and Synthesis<br />

To illustrate and compare the features of the two most widely used HDLs, VHDL and Verilog, two example<br />

synthesis models will be examined. As seen in Table 12.1, VHDL and Verilog have a similar set of synthesis<br />

operators with VHDL operators based on PASCAL and Verilog operators based on C. Some shift operators<br />

are missing in Verilog, but they can be implemented in a single line of code with a few additional characters.<br />

In VHDL processes, concurrent statements and entities execute in parallel. Inside a process, statements execute<br />

in sequential order. In Verilog, modules and always blocks execute in parallel and statements inside an<br />

always block execute sequentially just like processes in VHDL. Processes and always blocks have sensitivity<br />

lists that specify when they should be reevaluated. Any signal that can change the output of a block must<br />

be listed in the sensitivity list. VHDL processes and Verilog always blocks with a clock signal sensitivity<br />

will generate flip-flops when synthesized.<br />

© 2002 by CRC Press LLC<br />

TABLE 12.1<br />

HDL Operators Used for Synthesis<br />

Synthesis Operation VHDL Operator Verilog Operator<br />

Addition<br />

+ +<br />

Subtraction<br />

− −<br />

∗<br />

Multiplication<br />

∗ ∗<br />

∗<br />

Division<br />

/ /<br />

∗<br />

Modulus<br />

MOD %<br />

∗<br />

Remainder<br />

REM<br />

Concatenation—used to<br />

combine bits<br />

& { }<br />

Logical shift left<br />

∗∗<br />

SLL<br />

><br />

Arithmetic shift left<br />

∗∗<br />

SLA<br />

Arithmetic shift right<br />

∗∗<br />

SRA<br />

Rotate left<br />

∗∗<br />

ROL<br />

Rotate right<br />

∗∗<br />

ROR<br />

Equality<br />

= ==<br />

Inequality<br />

/=<br />

! =<br />

Less than<br />

< <<br />

Less than or equal<br />

<br />

Greater than or equal<br />

>=<br />

> =<br />

Logical NOT NOT !<br />

Logical AND AND &&<br />

Logical OR OR ||<br />

Bitwise NOT NOT ~<br />

Bitwise AND AND &<br />

Bitwise OR OR |<br />

Bitwise XOR XOR ^<br />

∗<br />

Not supported in many HDL synthesis tools. In some synthesis<br />

tools, only multiply and divide by powers of two (shifts) are supported.<br />

Efficient implementation of multiply or divide hardware<br />

frequently requires the user to specify the arithmetic algorithm and<br />

design details in the HDL or call a FPGA vendor supplied function.<br />

∗∗<br />

Supported only in IEEE 1076–1993 VHDL.

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

Saved successfully!

Ooh no, something went wrong!