| SystemPerl documentation | Contained in the SystemPerl distribution. |
SystemC::Netlist::Method - Methods in a file
use SystemC::Netlist;
SystemC::Netlist::Method contains information on a method added with SP_AUTO_METHOD.
The method name.
The sensitivity list of the method.
Prints debugging information for this file.
SystemPerl is part of the http://www.veripool.org/ free SystemC software tool suite. The latest version is available from CPAN and from http://www.veripool.org/systemperl.
Copyright 2005-2010 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
Wilson Snyder <wsnyder@wsnyder.org>
| SystemPerl documentation | Contained in the SystemPerl distribution. |
# SystemC - SystemC Perl Interface # See copyright, etc in below POD section. ###################################################################### package SystemC::Netlist::Method; use Class::Struct; use Carp; use SystemC::Netlist; use SystemC::Netlist::Net; use SystemC::Template; use Verilog::Netlist::Subclass; @ISA = qw(SystemC::Netlist::Method::Struct Verilog::Netlist::Subclass); $VERSION = '1.336'; use strict; structs('new', 'SystemC::Netlist::Method::Struct' =>[name => '$', #' # Name of the module filename => '$', #' # Filename this came from lineno => '$', #' # Linenumber this came from userdata => '%', # User information # module => '$', #' # Module method is in sensitive => '$', #' # Sensitivity information ]); ###################################################################### ###################################################################### #### Accessors sub logger { return $_[0]->module->logger; } ###################################################################### #### Linking sub _link {} ###################################################################### #### Methods sub verilog_sensitive { my $self = shift; return undef if !$self->sensitive; my $sense = $self->sensitive; $sense =~ s/^\s+//; $sense =~ s/\s+$//; if ($sense =~ /^([a-zA-Z_0-9]+)\.(pos|neg)\(\)$/) { return $2."edge $1"; } else { $self->error("Can't understand SP_AUTO_METHOD sensitivity to convert to verilog: $sense"); return undef; } } ###################################################################### #### Debug sub dump { my $self = shift; my $indent = shift||0; my $norecurse = shift; print " "x$indent,"Method:",$self->name()," File:",$self->filename(),"\n"; } ###################################################################### #### Package return 1; __END__