| 1 | package Verilog::VCD::Writer::Symbol; | ||
| 2 | 5 | $Verilog::VCD::Writer::Symbol::VERSION = '0.004'; | |
| 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 | 123 | ▶ | sub symbol{ |
|
Subroutine
symbol: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 18 | 123 | my $self=shift; | |
| 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__ | ||