line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Verilog - Verilog Perl Interface |
2
|
|
|
|
|
|
|
# See copyright, etc in below POD section. |
3
|
|
|
|
|
|
|
###################################################################### |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Verilog::Netlist::Defparam; |
6
|
|
|
|
|
|
|
|
7
|
8
|
|
|
8
|
|
49
|
use Verilog::Netlist; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
232
|
|
8
|
8
|
|
|
8
|
|
39
|
use Verilog::Netlist::Subclass; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
446
|
|
9
|
8
|
|
|
8
|
|
44
|
use vars qw($VERSION @ISA); |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
356
|
|
10
|
8
|
|
|
8
|
|
43
|
use strict; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
2671
|
|
11
|
|
|
|
|
|
|
@ISA = qw(Verilog::Netlist::Defparam::Struct |
12
|
|
|
|
|
|
|
Verilog::Netlist::Subclass); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$VERSION = '3.476'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
structs('new', |
17
|
|
|
|
|
|
|
'Verilog::Netlist::Defparam::Struct' |
18
|
|
|
|
|
|
|
=>[name => '$', #' # Unique ID |
19
|
|
|
|
|
|
|
keyword => '$', #' # Keyword name |
20
|
|
|
|
|
|
|
filename => '$', #' # Filename this came from |
21
|
|
|
|
|
|
|
lineno => '$', #' # Linenumber this came from |
22
|
|
|
|
|
|
|
userdata => '%', # User information |
23
|
|
|
|
|
|
|
attributes => '%', #' # Misc attributes for systemperl or other processors |
24
|
|
|
|
|
|
|
# |
25
|
|
|
|
|
|
|
lhs => '$', #' # Left hand side of assignment |
26
|
|
|
|
|
|
|
rhs => '$', #' # Right hand side of assignment |
27
|
|
|
|
|
|
|
module => '$', #' # Module reference |
28
|
|
|
|
|
|
|
]); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub delete { |
31
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
32
|
0
|
|
|
|
|
0
|
my $h = $self->module->_statements; |
33
|
0
|
|
|
|
|
0
|
delete $h->{$self->name}; |
34
|
0
|
|
|
|
|
0
|
return undef; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
###################################################################### |
38
|
|
|
|
|
|
|
#### Methods |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub logger { |
41
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
42
|
0
|
|
|
|
|
0
|
return $self->netlist->logger; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
sub netlist { |
45
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
46
|
0
|
|
|
|
|
0
|
return $self->module->netlist; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
3
|
0
|
|
sub lint {} |
50
|
|
|
|
0
|
0
|
|
sub link {} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub verilog_text { |
53
|
2
|
|
|
2
|
0
|
6
|
my $self = shift; |
54
|
2
|
|
|
|
|
28
|
my @out = ($self->keyword," ",$self->lhs," = ",$self->rhs,";"); |
55
|
2
|
50
|
|
|
|
12
|
return (wantarray ? @out : join('',@out)); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub dump { |
59
|
3
|
|
|
3
|
1
|
10
|
my $self = shift; |
60
|
3
|
|
50
|
|
|
12
|
my $indent = shift||0; |
61
|
3
|
|
|
|
|
95
|
print " "x$indent,"Defparam:",$self->keyword," lhs:",$self->lhs," rhs:",$self->rhs; |
62
|
3
|
|
|
|
|
31
|
print "\n"; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
###################################################################### |
66
|
|
|
|
|
|
|
#### Package return |
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
__END__ |