veripool / verilog-mode

Verilog-Mode for Emacs with Indentation, Hightlighting and AUTOs. Master repository for pushing to GNU, verilog.com and veripool.org.
http://veripool.org/verilog-mode
GNU General Public License v3.0
247 stars 90 forks source link

How to use defined "parameter FOR_NUMS = 8;" in @for loop #1756

Closed thfirst closed 2 years ago

thfirst commented 2 years ago

Thanks for taking the time to report this.

Can you attach an example that shows the issue? (You may want to attach output from 'M-x verilog-submit-bug-report')

Can you please check your github name is set to your real name (click on your avatar icon in upper right, then "settings" then "Name")?

I hope to use the defined "parameter" as the loop constant in the RTL as following:

module Test (/AUTOARGS/); parameter FOR_NUMS = 8; @for i = 0 to FOR_NUMS //it is illegal for now input [31:0] P@i@ ; @endfor

Is there any work-around solution ?

thfirst commented 2 years ago

Fixed some typo: module Test (/AUTOARGS/); parameter FOR_NUMS = 8; @for i = 0 to FOR_NUMS // it is illegal for now__ input [31:0] P@i@ ; @endfor

Is there any work-around solution ?

wsnyder commented 2 years ago

There's intentionally no "for" loops in verilog-mode.

Although note you could use AUTOINSERTLISP to write your own for loop or otherwise do anything that generates code.

thfirst commented 2 years ago

I see. Thanks a lot.