-/* memRange - a structure to define a range of valid memory addresses
- *
- * The Memory of most PICs (and other micros) is a collection of
- * disjoint chunks. The memRange structure will define the start
- * and end address of one of these chunks. The memory map of a
- * particular device is a collection of memRange struct's.
- */
-
-typedef struct memRange {
- int start_address; /* first address in range */
- int end_address; /* last */
- int alias; /* bit mask defining how/if memory range is aliased
- * e.g. alias = 0x80 means start_address is identical
- * to the memory location at (0x80 | start_address) */
- int bank; /* PIC memory bank this range occupies */
-
-} memRange;
-
-/* AssignedMemory - A structure to keep track of the memory that has been used.
- *
- * When a register gets assigned an address this struct is used to
- * keep track of a few details about the register. There is one of
- * these structures for each memory location in the device.
- */
-
-typedef struct AssignedMemory {
- regs *reg; /* Pointer to the register (NULL if this is an invalid address) */
- int instance; /* the i'th byte of a multibyte register */
- int alias; /* Bit mapping of aliased addresses (see memRange) */
- int bank; /* Memory bank of this register */
- int isValid:1; /* True if the address is legal */
- int isSFR:1; /* True if the address is that of a Special Function reg */
- int isEmitted:1; /* True if the register has been written to a cBlock */
-
-} AssignedMemory;
-
-
-/*
- * pic16_finalMapping - Dynamically allocated array that records the register assignments
- */
-
-extern AssignedMemory *pic16_finalMapping;
-
-/*
- * pic16_finalMappingSize - Size of register assignments that pic16_finalMapping can hold
- */
-
-extern int pic16_finalMappingSize;
+#define CONFIGURATION_WORDS 20
+#define IDLOCATION_BYTES 20
+
+typedef struct {
+ unsigned int mask;
+ int emit;
+ unsigned int value;
+ unsigned int andmask;
+} configRegInfo_t;
+
+typedef struct {
+ int confAddrStart; /* starting address */
+ int confAddrEnd; /* ending address */
+ configRegInfo_t crInfo[ CONFIGURATION_WORDS ];
+} configWordsInfo_t;
+
+typedef struct {
+ unsigned char emit;
+ unsigned char value;
+} idRegInfo_t;
+
+typedef struct {
+ int idAddrStart; /* starting ID address */
+ int idAddrEnd; /* ending ID address */
+ idRegInfo_t irInfo[ IDLOCATION_BYTES ];
+} idBytesInfo_t;