Comparing Simulation Results
This chapter describes the steps for comparing simulation results between the different simulators.
Viewing Your Results in a Data Display
Simulation results are stored in datasets (*.ds) and citifiles (*.cti). To view your results in an ADS Data Display:
- Launch ADS and create a new project <adsproject> if necessary.
- Copy all of your datasets to your ADS project's data directory ( <adsproject> /data).
- Launch the ADS Data Display server from your ADS window. From the ADS Main window, choose Window > New Data Display.
- Create a template to view your results. For more information, refer to "Using a Template in Your Display" in the ADS "Data Display" documentation.
- Select the dataset to view the results. If your parameters have been defined correctly, you should be able to use the <dataset> . <simulator>. <parameter> to access the different results for the different simulators, with <simulator> equal to ads_sim, spectre_sim or hspice_sim.
For more information on datasets (*.ds) and citifiles (*.cti), refer to Working with Data Files in Using Circuit Simulators.
Script Based Comparisons
The design kit model verification tool also contains some functionality to do script based comparisons of the simulation data. The following operations are needed:
If you want to do the comparison from within a different script other than the one used to run the simulation, the circuit debug level needs to be set to 1 (see debug facility of Circuit Module (dKitCircuit.pm)), in order not to delete the usable simulation results upon completion.
If you want to save the comparison results or view them using the ADS Data Display server, the functionality described in the following sections is also needed.
For a description of these functions, refer to Results Module (dKitResults.pm).
Example Script
This script is used to compare the simulation results between Spectre, Hspice and ADS for a circuit called test_diode.
The script starts as usual with the default header. When running this script, three sets of data will be created with the differences between the output data of two simulators: the point-to-point relative difference will be put in a citifile, and the statistics of these differences are saved in text files.
#!/usr/bin/perl
BEGIN {
if ($ENV{DKITVERIFICATION} eq "")
{
if ($ENV{HPEESOF_DIR} eq "")
{
print "\nPlease set environment variable DKITVERIFICATION\nto point to the design kit
verification installation directory\n\n";
exit 1;
} else
{
$ENV{DKITVERIFICATION} = "$ENV{HPEESOF_DIR}/design_kit/verification";
}
}
$myLibPath = "$ENV{DKITVERIFICATION}/perl/lib";
if ( ! -d $myLibPath)
{
if ($ENV{DKITVERIFICATION} eq "$ENV{HPEESOF_DIR}/design_kit/verification")
{
if ( ! -d "$ENV{HPEESOF_DIR}/design_kit/verification")
{
print "\nERROR: Unable to find verification module directory\nVerification tool not
installed at default\nlocation \$HPEESOF_DIR/design_kit/verification\n";
print "Please set environment variable DKITVERIFICATION to point\nto the design kit
verification installation directory\n\n";
} else
{
print "\nERROR: Unable to find verification module directory at\ndefault location
\$HPEESOF_DIR/design_kit/verification/perl/lib\n";
print "Please set environment variable DKITVERIFICATION\nto point to the installation
directory\n\n";
}
} else
{
print "\nERROR : Unable to find verification module directory
\$DKITVERIFICATION/perl/lib\n\n";
print "Please set environment variable DKITVERIFICATION\nto point to the design kit
verification installation directory\n\n";
}
exit 1;
}
# To find the standard supplied libraries in the local path
use Cwd;
$curDir = cwd;
}
use lib "$myLibPath";
use lib "$curDir";
use dKitResults;
$testName = "test_diode";
$adsDataP = dKitResults->getResults($testName, "ads");
$spectreDataP = dKitResults->getResults($testName, "spectre");
$hspiceDataP = dKitResults->getResults($testName, "hspice");
$diff = dKitResults->compareDataRelative($adsDataP, $spectreDataP);
$diff->writeCitifile("$testName" . "_asdiff.cti", "diffAdsSpectre");
print $diff->calculateStatistics("$testName" . "_asstat.dat");
$diff = dKitResults->compareDataRelative($adsDataP, $hspiceDataP);
$diff->writeCitifile("$testName" . "_ahdiff.cti", "diffAdsHspice");
print $diff->calculateStatistics("$testName" . "_ahstat.dat");
$diff = dKitResults->compareDataRelative($hspiceDataP, $spectreDataP);
$diff->writeCitifile("$testName" . "_hsdiff.cti", "diffHspiceSpectre");
print $diff->calculateStatistics("$testName" . "_hsstat.dat");
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()