Path Trace
Hello, I am posting an old program here that was written by me to trace different paths in a circuit. It is written in Perl and works for verilog (.v) files. The program recursively iterates through every path in the circuit and it prints out the gates encountered en-route. It is useful if you are calculating a metric for each gate/wire This is a way to NOT write a program. The program, as I found out later, is very slow because It does not build the data structure for gates that makes traversing easier It works with gate names instead of numeric abstractions which are easier to deal with. The better way to traverse through a circuit is to build a data structure for each gate encountered. Each gate should be assigned a number and there must be arrays in the data structure that holds information on the gates at its input and output. This makes traversing in both directions easier. Sample data structure struct gate{ char name[]; int num_in; int num_out; int i...