Ben1152000 / sootty

A command-line tool for displaying vcd waveforms.
BSD 3-Clause "New" or "Revised" License
46 stars 12 forks source link

WireGroup's get_names for different scopes #64

Open yihuajack opened 2 years ago

yihuajack commented 2 years ago

Previously get_name will regard all wires with the same name as the same wires, which is an oversimplification. Now, wire names are associated with their wire groups.

yihuajack commented 2 years ago

Can you check that the modified implementation of get_names works when __main__.py:169 is run? It seems to return a dict tree when it should return a flat list of names.

It is designed to return a dict because we want to construct a dict whose keys are scopes and values are sub-scopes or wire names.

I modified this function because a dict is needed for print_breakpoints, so get_wires returns a dict. To be consistent, get_names also returns a dict. The only reference of get_names currently is at Line 169 of __main__.py to raise an exception.

Therefore, currently the behavior of get_names does not make a difference. However, as mentioned In my report, if a better formatting of print_breakpoints is expected, get_names have to return a dict to distinguish different wires with the same names in different scopes.