Parameter location in a Verilog Module

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Hello,

Code:
I noticed that in Verilog both of the constracts below compile correctly.
// some_parameter is used after some_input
module some_module 
#(
    parameter some_parameter 
)
(
    input some_input [ some_parameter : 0 ]                       
) ;
endmodule

// some_parameter is used before some_input
module some_module 
#(
    parameter some_parameter 
)
(
    input [ some_parameter : 0 ] some_input                        
) ;
endmodule
Are they equivalent ?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…