Forums » Using AUTOs »
AUTOINSERTPERL does not work
Added by P Jay over 1 year ago
Could anyone help me to get /*AUTOPERL ...*/ to work with emacs. AUTOINSERTLISP works fine. But I could not insert a text based on the perl script. Do I need to have any include files or what is the command line I should use to expand AUTOPERL. My code: /*AUTOPERL for($i=0;$i<5;$i++) print "assign signal_A[$i] = signal_B[$i];\n"; */
It does not expand if I use command line emacs --batch tb.v -f verilog-batch-auto
Please help me.
Replies (3)
RE: AUTOINSERTPERL does not work - Added by Wilson Snyder over 1 year ago
There isn't an AUTOPERL, sorry if something mentions one. Use:
/*AUTOINSERTLISP(insert (shell-command-to-string \"perl ....\"))*/
I could be convinced to make AUTOINSERTSHELL, but don't want to get language specific after that.
RE: AUTOINSERTPERL does not work - Added by P Jay over 1 year ago
Thank you Wilson. That is great, it works fine for a simple print. I am still not able to get my example working. Can you help me to get following perl to get executed. Thanks. for($i=0;$i<5;$i++) print "assign signal_A[$i] = signal_B[$i];\n";
RE: AUTOINSERTPERL does not work - Added by Wilson Snyder over 1 year ago
Put it into a script file, then call the script. Otherwise quoting is a mess.
BTW if your output code will really look anything like that you should just be using a Verilog "generate for" and/or "generate if" instead.
(1-3/3)
![[logo]](/img/veripool_small.png)