Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Generate mamping for verilog HDL

Status
Not open for further replies.

rajavel.rv

Member level 3
Member level 3
Joined
Dec 1, 2010
Messages
66
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Pondichéry, Puducherry, India, India
Activity points
1,685
Generic mamping for verilog HDL

Hi, how can am a passing a separate constant value to my verilog module in my top level of coding; if am using VHDL means i can use this syntax;

VHDL;
example;

entity entity_name is
generic (
K_CONSTANT : integer := 6
);
port (
);

if am port mapping this code means am using this syntax;

c1 : entity_name
generic map( K_CONSTANT => 5)
port map (

);

how can am use this type of syntax in verilog hdl; please send the syntax of verilog hdl;;;;

Regards
rajavel.rv
 

In verilog you can pass parameters in this way...
Code:
module module_name #( parameter k_constant=6)
           ( input ,
              output ports);

module_name #(.k_constant(5)) c1
              (.in(in_port),
               .out(out_port...);
 
Last edited:
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top