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
Compare Files
Convert
Def2Verilog
Gen XOR Tree
GetValue
IHEX2VHEX
nand tree
Name Instance
OnesCompSum
Preprocessor
Verilog Tag

Verilog Tag2
Verilog2DEF
VHDL2HTML
VRename
XNF2VHDL

 

Products:

Undertow Suite
Undertow
Interactive_tool
Optimizing_tool
VeriPower
Power_tool
Toggle_tool
Express_VCT
Personal_VCT
VBIT«
verilog2vhdl™
vhdl2verilogmkt
Script Pool


 

 Company    Products     News    Assistance     Download     Contact Us    Sales

Veritools, Inc.
459 Hamilton Avenue, Suite 200, Palo Alto, California 94301
(650) 462 - 5590 Main    (650) 462 - 5593 Fax
inquiry@veritools.com

For Web site information please email Webmaster