cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sharan_1234
Newbie
Newbie
284 Views
Registered: ‎06-20-2021

Error about parameter

I am getting errors like this. kindly solve my problem.

verilog 2000 parameter used in incorrect context

 

WhatsApp Image 2021-06-21 at 11.44.59 AM.jpeg
0 Kudos
4 Replies
watari
Professor
Professor
275 Views
Registered: ‎06-16-2013

Hi @sharan_1234 

 

Would you move declaration of localparam into module ?

 

Best regards,

0 Kudos
sharan_1234
Newbie
Newbie
263 Views
Registered: ‎06-20-2021

yes. How to remove that error

If I am including #(PARAMETER)(IO PORTS) getting some error like parameter not declared.

0 Kudos
sharan_1234
Newbie
Newbie
261 Views
Registered: ‎06-20-2021

Yes, I tried but not working.

sharan_1234_0-1624257625197.png

Same message coming.

sharan_1234_1-1624257694830.png

How to rectify this

0 Kudos
markcurry
Scholar
Scholar
193 Views
Registered: ‎09-16-2009

Please post code instead of snapshots of your screen - it make it easier for others to help you - by cut/pasting your code.  Without, I need to type from your picture..

localparams are fine within module header as you originally had.

Your problem is a simple syntax error:

module apb_reg_if #(
  parameter ...,
  localparam ...,
) (
  /* portlist here */
);

You're missing the '#' to start the parameter declaration.

(Darned forums software won't let me bold inline code...)

Regards,

Mark

0 Kudos