| Compare Files Script
Go To Script Pool |
|
This script is intended for Undertow_Batch: Save this script to a file called compare_files.script. # Subroutine to iteratively compare all variables in a module between # 2 files, and then descend into the submodules. # Subroutine argument is the complete hierarchical name of the module. sub CompareModule { my $module_name = shift(@_); my @variables; my @submodules; my $variable_name; my $submodule_name; my $len; my $i; # Iterate through the variables in the module and compare against the # other file. @variables = ModuleGetVariables("/1" . $module_name); foreach $variable_name (@variables) { @results = CompareLogicSignals("/1" . $module_name . "/" . $vari able_name, "/2" . $module_name . "/" . $variable_name); $len = scalar(@results); if ($len > 0) { print "\n/1", $module_name, "/", $variable_name, ":\n"; } $i = 0; while ($i < $len) { print "\t", @results[$i], " to "; $i++; if ($i < $len) { print @results[$i], "\n"; } else { print "END\n"; } $i++; } } # Iterate through the submodules. @submodules = ModuleGetModules("/1" . $module_name); foreach $submodule_name (@submodules) { CompareModule($module_name . "/" . $submodule_name); } } print "\n\nComparing ", @UTBATCH_ARGV[1], " with ", @UTBATCH_ARGV[2], ":\n\n"; # Open the 2 files. Make sure they are the first and second files open. CloseAllFilesAndOpen(@UTBATCH_ARGV[1]); OpenDumpFile(@UTBATCH_ARGV[2]); # Compare the files, starting with the top level module. CompareModule(""); |
Other Scripts: Batch
Simulation
Products: Undertow Suite
|
| Company
Products News
Assistance Download Contact Us Sales Veritools, Inc. |