jameshanlon / netlist-paths

A library and command-line tool for querying a Verilog netlist.
https://jameshanlon.github.io/netlist-paths
Apache License 2.0
26 stars 3 forks source link

Self paths #11

Open jameshanlon opened 2 years ago

jameshanlon commented 2 years ago

Eg.

$ ./install/bin/netlist-paths --compile ../tests/verilog/registered_output_path.sv --from out                         

Path 0
Name                       Type DType        Statement Location
-------------------------- ---- ------------ --------- --------
out                        REG  [31:0] logic                   
registered_output_path.out VAR  [31:0] logic                   
out                        REG  [31:0] logic                   

Path 1
Name                       Type DType        Statement Location
-------------------------- ---- ------------ --------- --------
out                        REG  [31:0] logic                   
registered_output_path.out VAR  [31:0] logic                   

Path 2
Name Type DType        Statement Location
---- ---- ------------ --------- --------
out  REG  [31:0] logic   

There should be no first path out -> out reported.

Related to #10

jameshanlon commented 2 years ago

Without register splitting:

Screenshot 2022-02-20 at 10 27 55

With splitting:

Screenshot 2022-02-20 at 10 28 15

Issue is that the three variables are all aliases of the same entity.

jameshanlon commented 2 years ago

This is improved with 9dedf78bb36dc234647fdfb816528db87a873f59, removing the last two paths in the above fan-out path list.