24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

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.

The generic type is determined by the parameter's initial value as follows:<br />

Parameter value Generic type<br />

integer integer<br />

real real<br />

string literal string<br />

The default value of the generic is the same as the parameter's initial value.<br />

Examples<br />

Verilog parameter VHDL generic<br />

parameter p1 = 1 - 3; p1 : integer := -2;<br />

parameter p2 = 3.0; p2 : real := 3.000000;<br />

parameter p3 = "Hello"; p3 : string := "Hello";<br />

VHDL: instantiating Verilog UM-205<br />

Port clause<br />

A port clause is generated if the module has ports. A corresponding VHDL port is defined<br />

for each named Verilog port.<br />

You can set the VHDL port type to bit, std_logic, or vl_logic. If the Verilog port has a<br />

range, then the VHDL port type is bit_vector, std_logic_vector, or vl_logic_vector. If the<br />

range does not depend on parameters, then the vector type will be constrained accordingly,<br />

otherwise it will be unconstrained.<br />

Examples<br />

Verilog port VHDL port<br />

input p1; p1 : in std_logic;<br />

output [7:0] p2; p2 : out std_logic_vector(7 downto 0);<br />

output [4:7] p3; p3 : out std_logic_vector(4 to 7);<br />

inout [width-1:0] p4; p4 : inout std_logic_vector;<br />

Configuration declarations are allowed to reference Verilog modules in the entity aspects<br />

of component configurations. However, the configuration declaration cannot extend into a<br />

Verilog instance to configure the instantiations within the Verilog module.<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong>

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

Saved successfully!

Ooh no, something went wrong!