line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VIC::PIC::P16F648A; |
2
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.31'; |
5
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
6
|
1
|
|
|
1
|
|
3
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
extends 'VIC::PIC::P16F627A'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# role CodeGen |
10
|
|
|
|
|
|
|
has type => (is => 'ro', default => 'p16f648a'); |
11
|
|
|
|
|
|
|
has include => (is => 'ro', default => 'p16f648a.inc'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has memory => (is => 'ro', default => sub { |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
flash => 4096, # words |
16
|
|
|
|
|
|
|
SRAM => 256, |
17
|
|
|
|
|
|
|
EEPROM => 256, |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
}); |
20
|
|
|
|
|
|
|
has address => (is => 'ro', default => sub { |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
isr => [ 0x0004 ], |
23
|
|
|
|
|
|
|
reset => [ 0x0000 ], |
24
|
|
|
|
|
|
|
range => [ 0x0000, 0x0FFF ], |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
}); |
27
|
|
|
|
|
|
|
has banks => (is => 'ro', default => sub { |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
count => 4, |
30
|
|
|
|
|
|
|
size => 0x80, |
31
|
|
|
|
|
|
|
gpr => { |
32
|
|
|
|
|
|
|
0 => [ 0x020, 0x07F], |
33
|
|
|
|
|
|
|
1 => [ 0x0A0, 0x0EF], |
34
|
|
|
|
|
|
|
2 => [ 0x120, 0x16F], |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
# remapping of these addresses automatically done by chip |
37
|
|
|
|
|
|
|
common => [0x070, 0x07F], |
38
|
|
|
|
|
|
|
remap => [ |
39
|
|
|
|
|
|
|
[0x0F0, 0x0FF], |
40
|
|
|
|
|
|
|
[0x170, 0x17F], |
41
|
|
|
|
|
|
|
[0x1F0, 0x1FF], |
42
|
|
|
|
|
|
|
], |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
}); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
__END__ |