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: Auto-indent inside macros systemverilog #1486

Closed
veripoolbot opened this issue Aug 15, 2019 · 4 comments
Closed

Question: Auto-indent inside macros systemverilog #1486

veripoolbot opened this issue Aug 15, 2019 · 4 comments
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: j briquet
Original Redmine Message: 3048 from https://www.veripool.org


Hi all,

Does anyone know if it’s possible to keep auto-indent working, within custom macros that would delimit the beginning and end of a block in system verilog.

‘test_begin(mytest)
$display(“myexample”);
‘test_end

Where :

‘define test_begin(test) module ‘’test; initial begin
‘define test_end end endmodule

Sorry for the back tick, i was using my smartphone when typing this post.

Jean-Pierre

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-08-20T23:41:03Z


There us no current way to do this. The UVM begin/end are similar and so indent properly but are hardcoded in the source. You could make a local veraion with edits if need be.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: j briquet
Original Date: 2019-08-20T23:56:49Z


Hi Wilson,

Thanks for your answer, could you just guide me through the source code, so I can give it a try.
Or is it pretty straightforward ?

Regards,
Jean-Pierre

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-08-27T17:29:13Z


Look for e.g. uvm_field_utils_begin/end and add your own macro similarly.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: j briquet
Original Date: 2019-08-28T22:46:20Z


Thanks Wilson,

I think it should be ok, i was able to locate where I can include my changes.

Regards,
Jean-Pierre

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