LiamSkirrow / verilogtree

Print out the modular hierarchy of a Verilog design
MIT License
0 stars 0 forks source link

Interactive mode #49

Open LiamSkirrow opened 1 year ago

LiamSkirrow commented 1 year ago

Include an interactive mode (-i/--interactive) that doesn't exit, and instead gives a prompt to the user to dynamically collapse or minimise hierarchy points. For example:

top
├── mod0
│   ├── mod3
│   │   └── mod4
│   └── mod1
│       └── mod3
│           └── mod4
├── mod1
│   └── mod3
│       └── mod4
└── mod2
    └── mod1
        └── mod3
            └── mod4
> minimise mod3

The minimise mod3 command would result in the following hierarchy

top
├── mod0
│   ├── mod3
│   └── mod1
│       └── mod3
├── mod1
│   └── mod3
└── mod2
    └── mod1
        └── mod3
> 

Could also include expand all and minimise all commands and a whole host of interactive commands to make verilogtree responsive.

This mode would result in the same view as given by less where j/k are used to scroll up and down the console, could maybe even use ncurses if you wanted to go completely over the top.