[Virgil] Atmega32 ?

Andreas KäŠnner andreas at kaenner.de
Tue May 29 00:10:25 PDT 2007


Hi Benjamin
>
> thank you. I will try to modify the ATMega128 device description. I 
> understand the interrupt part and the IORegister part but can you 
> elaborate on the first statements:
>
>>    space data[16]: 8;
>>    space flash[24]: 8;
>>    space eeprom[16]: 8;
>
> These describe the address spaces of the device. The first number is 
> the number of bits required to represent a pointer, the second number 
> is the size of the addressable units. This information is parsed by 
> the compiler, but currently unused, because VPC generates C code.
>

Why is the number of bits to represent a pointer to the flash memory 24 
bits wide? The ATMega128 documentation says that the Program Counter is 
16 bits wide (and 14 bits for ATMega32).

>>    region regs   = data[0...31];
>>    region ioregs = data[32...255];
>>    region sram   = data[255...4351];
>
> These describe regions of memory within address spaces. They also are 
> currently unused.
>
>>    region itable = flash[0...139];
The ATMega128 contains 128K bytes of Flash memory. The highest number in 
your itable is 139. Please explain how to derive this value.

Thank you,

Andreas Känner


More information about the Virgil mailing list