NAME
SystemC::Netlist - SystemC Netlist
SYNOPSIS
use SystemC::Netlist;
my $nl = new SystemC::Netlist ();
foreach my $file ('testnetlist.sp') {
$nl->read_file (filename=>$file,
strip_autos=>1);
}
$nl->link();
$nl->autos();
$nl->lint();
$nl->exit_if_error();
foreach my $mod ($nl->modules_sorted) {
show_hier ($mod, " ");
}
sub show_hier {
my $mod = shift;
my $indent = shift;
print $indent,"Module ",$mod->name,"\n";
foreach my $cell ($mod->cells_sorted) {
show_hier ($cell->submod, $indent." ".$cell->name." ");
}
}
DESCRIPTION
SystemC::Netlist contains interconnect information about a whole design database.
The database is composed of files, which contain the text read from each file.
A file may contain modules, which are individual blocks that can be instantiated (designs, in Synopsys terminology.)
Modules have ports, which are the interconnection between nets in that module and the outside world. Modules also have nets, (aka signals), which interconnect the logic inside that module.
Modules can also instantiate other modules. The instantiation of a module is a Cell. Cells have pins that interconnect the referenced module's pin to a net in the module doing the instantiation.
Each of these types, files, modules, ports, nets, cells and pins have a class. For example SystemC::Netlist::Cell has the list of SystemC::Netlist::Pin (s) that interconnect that cell.
FUNCTIONS
- $netlist->autos
-
Updates /*AUTO*/ comments in the internal database. Normally called before lint.
- $netlist->error
-
Prints an error in a standard way, and increments $Errors.
- $netlist->lint
-
Error checks the entire netlist structure.
- $netlist->link
-
Resolves references between the different modules.
- $netlist->dump
-
Prints debugging information for the entire netlist structure.
- $netlist->warn
-
Prints a warning in a standard way, and increments $Warnings.
MODULE FUNCTIONS
- $netlist->find_module($name)
-
Returns SystemC::Netlist::Module matching given name.
- $netlist->modules_sorted
-
Returns list of all SystemC::Netlist::Module.
- $netlist->new_module
-
Creates a new SystemC::Netlist::Module.
FILE FUNCTIONS
- $netlist->find_file($name)
-
Returns SystemC::Netlist::File matching given name.
- $netlist->read_file( filename=>$name)
-
Reads the given SystemC file, and returns a SystemC::Netlist::File reference.
- $netlist->files
-
Returns list of all files.
Generally called as $netlist->read_file. Pass a hash of parameters. Reads the filename=> parameter, parsing all instantiations, ports, and signals, and creating SystemC::Netlist::Module structures. The optional preserve_autos=> parameter prevents default ripping of /*AUTOS*/ out for later recomputation.
- $netlist->dependancy_write($name)
-
Writes a dependancy file for make, listing all input and output files.
SEE ALSO
SystemC::Cell, SystemC::File, SystemC::Module, SystemC::Net, SystemC::Pin, SystemC::Port, SystemC::Subclass
DISTRIBUTION
The latest version is available from CPAN and from http://veripool.com/
.
AUTHORS
Wilson Snyder <wsnyder@wsnyder.org>