package GOFPERL; use strict; sub RUN{ my $top = &get_top(); my $path = "Top($top)"; &print("Top design is $top\n"); my $data = {}; $data->{input} = &get_ports("input", $path); $data->{output} = &get_ports("output", $path); $data->{module} = &get_modules($path); $data->{instance} = &get_instances($path); $data->{cell} = &get_cells($path); foreach my $item (keys %{$data}){ my $collect = $data->{$item}; foreach my $unit (@$collect){ &print("$item: $unit\n"); if($item =~ m/instance|cell/){ my $ref = &get_ref($unit, $path); &print(" $ref\n"); my $hash = &get_cell_info($unit, $path); foreach my $port (keys %{$hash->{connections}}){ my $net = $hash->{connections}{$port}; my $dir = $hash->{ports}{$port}; &print(" $port connects to $net\n"); my $driver = &get_driver($net, $path); &print(" $net has driver $driver->[1] $driver->[3]\n"); if($dir eq "input"){ my $fanout = &get_fanouts($net, $path); foreach my $fan (@$fanout){ my $npath = $fan->[0]; my $inst = $fan->[1]; my $mod = $fan->[2]; my $pin = $fan->[3]; if($npath eq $path){ $npath = ""; } &print(" $net fanout to $inst/$pin $mod $npath\n"); } } } } #if($item eq "leaf"){ } } }