SystemC::Netlist::Net 1.261 review
Download
|
|
SystemC::Netlist::Net is a Perl module which provides Net for a SystemC Module.
This is a superclass of Verilog::Netlist::Net, derived for a SystemC netlist pin.
Parsing example:
@example
package Trialparser;
@@ISA = qw(SystemC::Parser);
sub module @{
my $self = shift;
my $module = shift;
print $self->filename.":".$self->lineno().": ";
print "Contains the module declaration for $modulen";
@}
package main;
my $sp = Trialparser->new();
$sp->read ("test.sp");
@end example
Netlist example:
@example
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." ");
@}
@}
@end example
Requirements:
Perl
SystemC::Netlist::Net 1.261 keywords