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: Defining a Sorting order for AUTOINPUTS/AUTOOUTPUTS based on regex of verilog port names . #1393

Closed
veripoolbot opened this issue Feb 7, 2019 · 1 comment
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Engr vns
Original Redmine Message: 2842 from https://www.veripool.org


Hi Veripool team,

Question about defining a sorting order for AUTOINPUTS and OUTPUTS.

The current sorting order for AUTOINPUTS and OUTPUTS is -

  1. Direction, numerical sorting of portwidths, lexicographical sorting of port name.

Is there a way a user can customize this sorting order.
The motivation is cluster the signals that being to a a bus together.
Here's an example -
Assume that you several AXI buses which are named as - AxiBus1, AxiBus2, AxiBus3.

The individual signals of these buses get auto-sorted by default as -
ARREADY_AxiBus1;
ARREADY_AxiBus2;
ARREADY_AxiBus3;

AWREADY_AxiBus1;
AWREADY_AxiBus2;
AWREADY_AxiBus3;

Instead it would be more meaningful to group them by buses as -
ARREADY_AxiBus1;
AWREADY_AxiBus1;

ARREADY_AxiBus2;
AWREADY_AxiBus2;

ARREADY_AxiBus3;
AWREADY_AxiBus3;

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.

Thanks,
-VS

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-02-10T22:04:50Z


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.)

AxiBus1_ARREADT;
AxiBus1_AWREADT;
AxiBus2_ARREADT;
AxiBus2_AWREADT;
AxiBus3_ARREADT;
AxiBus3_AWREADT;

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