May 8, 2014 #1 R rajavel.rv 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
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
May 8, 2014 #2 K kommu4946 Member level 4 Joined Feb 21, 2014 Messages 71 Helped 13 Reputation 26 Reaction score 11 Trophy points 1,288 Location India Activity points 1,846 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: May 8, 2014
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...);