Closed cswmeta closed 2 weeks ago
Thanks for the good test, easy fix. You'll need to manually add/remove "," before that attribute if the input list changes to non-empty or empty.
I'm not sure that workaround is OK. If I manually remove the comma before the attribute then the SystemVerilog syntax for attributes is violated. The attribute needs to come immediate before the port declaration so the comma would cause a syntax problem.
I have another workaround... manually declare the first port that follows the attribute. Then expand AUTOs won't insert the comma.
Would be nice if verilog-mode would recognize this and handle the comma correctly. Though I have no LISP experience, I imagine it may be complex to update the code, so I'm OK with the workaround.
It's already fixed, see link above.
That was fast! Thanks!
We have recently adopted SystemVerilog attributes as a way of annotating RTL with additional information.
If the attributes are placed inside the module header then Verilog mode adds a comma after each attribute. Here is an example:
See below for what top looks like after expanding the AUTOs. Notice the comma that appears after ( attribute1="hello" ). This comma is NOT removed if I remove the AUTOs with verilog-delete-auto.
Is there anything I can do to prevent the comma from being inserted?