Is it possible to simulate external memory with a DBW of 16-bit? My external memory is setup so that 2 chips with 8-bit memory are sharing the same memory location. I would like to be able to simulate this with the uVision debugger. I enabled the memory region for the debugger with the statement
MAP 0x10000000,0x1000FFFF READ WRITE // allow R/W access to external
Which device are you simulating? Reinhard
Sorry, I'm simulating an ADuC7026. I configure it in the following manner.
GP2CON = 0x02222000; // WS, RS, AE, MS0 GP3CON = 0x22222222; // AD0 - AD7 GP4CON = 0x22222222; // AD8 - AD15 XMCFG = 1; // Enable external memory access XM0CON = 3; // 16-bit DBW, Enable memory region 0 XM0PAR = 0xA722; // Enable byte write strobe
data bus width has no impact to 'float' size. Maybe you can be a little more precise in describing your problem. Reinhard
Just one more side note. The Keil uVision Simulator fully simulates all the external bus timings like bus width and wait states. Reinhard
I have 2 32k x 8 EEPROM chips. One is connected to AD0 - AD7 and the other is connected to AD8 - AD15. Both are mapped to the same memory location. ADuC7026 maps the external memory selection 0 to 0x10000000 to 0x1000FFFF. Say I were execute the following function :
void writeMem (void) { float *ptr = 0x10000000; *ptr++ = 32.65; *ptr = 45.76; }
The memory windows shows addresses. Each address correspons to a single byte. Maybe you take a look to ARM hardware manuals to see how this is mapped to physcial memory. However these basics are really hard to explain in words. The memory width does not change the physicall address behaviour at all. Reinhard
Okay, thanks. I was beginning to suspect that my concept of the data bus width was not correct.
Ok, forgetting data bus width, I don't think data bus width is my problem. I have 32k worth of addresses (0x000 - 0x7FFF) and each addresses can hold 2 bytes (16 bits) worth of data. That's 64kBytes worth of data from 0x1000000 to 0x10007FFF. How can I get the simulator to reflect that?