line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Verilog::VCD::Writer::Symbol; |
2
|
|
|
|
|
|
|
$Verilog::VCD::Writer::Symbol::VERSION = '0.002'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Signal name to symbol mapper. Private class nothing to see here. |
4
|
5
|
|
|
5
|
|
64154
|
use Math::BaseCalc; |
|
5
|
|
|
|
|
4850
|
|
|
5
|
|
|
|
|
193
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
2101
|
use MooseX::Singleton; |
|
5
|
|
|
|
|
2559088
|
|
|
5
|
|
|
|
|
32
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has count => ( |
13
|
|
|
|
|
|
|
is => 'rw', |
14
|
|
|
|
|
|
|
isa => 'Int', |
15
|
|
|
|
|
|
|
default => 0, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
sub symbol{ |
18
|
123
|
|
|
123
|
0
|
19620
|
my $self=shift; |
19
|
123
|
|
|
|
|
2339
|
my $conv=new Math::BaseCalc(digits=> [ |
20
|
|
|
|
|
|
|
'!','"','#','$','%','&',"'",'(',')', |
21
|
|
|
|
|
|
|
'*','+',',','-','.','/', |
22
|
|
|
|
|
|
|
'0','1','2','3','4','5','6','7','8','9', |
23
|
|
|
|
|
|
|
':',';','<','=','>','?','@', |
24
|
|
|
|
|
|
|
'A','B','C','D','E','F','G','H','I','J','K','L','M', |
25
|
|
|
|
|
|
|
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
26
|
|
|
|
|
|
|
'[','\\',']','^','_','`', |
27
|
|
|
|
|
|
|
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
28
|
|
|
|
|
|
|
'n','o','p','q','r','s','t','u','v','w','x','y','z', |
29
|
|
|
|
|
|
|
'{','|','}','~']); |
30
|
123
|
|
|
|
|
66363
|
my $rval= $conv->to_base($self->count); |
31
|
123
|
|
|
|
|
13580
|
$self->count($self->count+1); |
32
|
123
|
|
|
|
|
18354
|
return $rval; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
1 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Verilog::VCD::Writer::Symbol - Signal name to symbol mapper. Private class nothing to see here. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.002 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SYNOPSIS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
use Verilog::VCD::Writer::Symbol; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This is a Singleton class to map the signal name to a compact symbol |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=for Pod::Coverage *EVERYTHING* |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Vijayvithal Jahagirdar<jvs@cpan.org> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Vijayvithal. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
67
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |