Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Question: Defining a Sorting order for AUTOINPUTS/AUTOOUTPUTS based on regex of verilog port names . #1393
Author Name: Engr vns
Hi Veripool team,
Question about defining a sorting order for AUTOINPUTS and OUTPUTS.
The current sorting order for AUTOINPUTS and OUTPUTS is -
Is there a way a user can customize this sorting order.
The individual signals of these buses get auto-sorted by default as -
Instead it would be more meaningful to group them by buses as -
If you assume that the user has no flexibility to modify the names, is there a way to modify the sorting order using regex for verilog portnames.
Original Redmine Comment
AUTOINPUT and AUTOOUTPUT are separate commands, so each will and must do inputs and outputs separately. Then it sorts by name. Width is not part of the sort.
Anyhow, there's presently no option to change this. I'm reluctant to add one as there's so many variations it's unlikely to satisfy everyone. I would suggest that rather than fight it use one of the two common practices, either 1. put the container of the bus first in the signal name, or 2. use structs. Both are much cleaner to read generally. (Also note while we could fix the sort order for verilog-mode, most waveform tools would still resort them, so you're still better off putting buses lexicographical ajacent.)