VIC/PIC/P18F452.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 27 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« VIC/PIC/P18F252.pm ↑ Summary VIC/PIC/P18LF13K50.pm »
1 package VIC::PIC::P18F452;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 our $VERSION = '0.32';
5 1 $VERSION = eval $VERSION;
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 extends 'VIC::PIC::P18F442';
8  
9 # role CodeGen
10 1 has type => (is => 'ro', default => 'p18f452');
11 1 has include => (is => 'ro', default => 'p18f452.inc');
12  
13 # all memory is in bytes
14 1 ▶has memory => (is => 'ro', default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
15 {
16 1 flash => 16384, # words
17 SRAM => 1536,
18 EEPROM => 256,
19 }
20 1 });
21  
22 1 ▶has address => (is => 'ro', default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
23 {
24 # high # low
25 1 isr => [ 0x0008, 0x0018 ],
26 reset => [ 0x0000 ],
27 range => [ 0x0000, 0x7FFF ],
28 }
29 1 });
30  
31 1 ▶has banks => (is => 'ro', default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
32 {
33 1 count => 16,
34 size => 0x100,
35 gpr => {
36 0 => [ 0x000, 0x0FF],
37 1 => [ 0x100, 0x1FF],
38 2 => [ 0x200, 0x2FF],
39 3 => [ 0x300, 0x3FF],
40 4 => [ 0x400, 0x4FF],
41 5 => [ 0x500, 0x5FF],
42 },
43 # remapping of these addresses automatically done by chip
44 common => [ [0x000, 0x07F], [0xF80, 0xFFF] ],
45 remap => [],
46 }
47 1 });
48  
49 1 1;
50  
51 =encoding utf8
52  
53 =head1 NAME
54  
55 VIC::PIC::P18F452
56  
57 =head1 SYNOPSIS
58  
59 A class that describes the code to be generated for each specific
60 microcontroller that maps the VIC syntax back into assembly. This is the
61 back-end to VIC's front-end.
62  
63 =head1 DESCRIPTION
64  
65 INTERNAL CLASS.
66  
67 =head1 AUTHOR
68  
69 Vikas N Kumar <vikas@cpan.org>
70  
71 =head1 COPYRIGHT
72  
73 Copyright (c) 2014. Vikas N Kumar
74  
75 This program is free software; you can redistribute it and/or modify it
76 under the same terms as Perl itself.
77  
78 See http://www.perl.com/perl/misc/Artistic.html
79  
80 =cut
« VIC/PIC/P18F252.pm ↑ Summary VIC/PIC/P18LF13K50.pm »