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.

Parameters<br />

Verilog Language Support<br />

Verilog modules support defining constants known as parameters<br />

which can be passed to module instances to define circuits of<br />

arbitrary widths. Parameters form the basis of creating and using<br />

parameterized blocks in a design to achieve hierarchy and stimulate<br />

modular design techniques. The following is an example of the use of<br />

parameters. Null string parameters are not supported.<br />

Example 7-13 Using Parameters<br />

module lpm_reg (out, in, en, reset, clk);<br />

parameter SIZE = 1;<br />

input in, en, reset, clk;<br />

output out;<br />

wire [SIZE-1 : 0] in;<br />

reg [SIZE-1 : 0] out;<br />

always @(posedge clk or negedge reset)<br />

begin<br />

if (!reset) out

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

Saved successfully!

Ooh no, something went wrong!