| 1 | package Verilog::VCD::Writer::Symbol; | ||
| 2 | 5 | $Verilog::VCD::Writer::Symbol::VERSION = '0.002'; | |
| 3 | # ABSTRACT: Signal name to symbol mapper. Private class nothing to see here. | ||
| 4 | 5 | ▶ | use Math::BaseCalc; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 5 | ▶ | use MooseX::Singleton; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | |||
| 11 | |||
| 12 | 5 | has count => ( | |
| 13 | is => 'rw', | ||
| 14 | isa => 'Int', | ||
| 15 | default => 0, | ||
| 16 | ); | ||
| 17 | sub symbol{ | ||
| 18 | 123 | ▶ | my $self=shift; |
|
Subroutine
symbol: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 19 | 123 | 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 | my $rval= $conv->to_base($self->count); | |
| 31 | 123 | $self->count($self->count+1); | |
| 32 | 123 | return $rval; | |
| 33 | } | ||
| 34 | 5 | 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 | ||