Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: AUTOINSERTPERL does not work #297

Closed
veripoolbot opened this issue Nov 5, 2010 · 3 comments
Closed

Question: AUTOINSERTPERL does not work #297

veripoolbot opened this issue Nov 5, 2010 · 3 comments
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: P Jay
Original Redmine Message: 393 from https://www.veripool.org


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.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-11-05T01:53:09Z


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.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: P Jay
Original Date: 2010-11-05T21:27:38Z


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";

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-11-05T22:17:00Z


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant