16 bit RAM on 68K system.

David Williams davidwilliams@ozemail.com.au
Tue Aug 17 17:12:00 GMT 1999


Hi all,

I have been examining the use of 16bit wide SRAM for more embedded system. 
I am using 68EZ328 (68K core) and GNU C (ECGS 1.1.1). To support 16bit wide 
SRAM I have two options in hardware. I can connect directly to the 
processor and only allow 16 bit writes or use some glue logic to allow 8 
bit writes. I was wondering about the implication of forcing 16bit writes. 
The stack is allways 16 bit - no problem. All 16bit and larger variables 
are forced to 16 bit boundaries (or 32 bit boundaries if use 'align-int' 
option) - again no problem. The problem is 8 bit variables. It may be 
possible to force an 8 bit variable to a 16 bit boundary (i'm not sure how) 
and force the other eight bits of the word to not be used (wasted) so 
writes to an 8 bit variable will actually write 16 bits (8 of which are 
unused). However I don't see a solution to 8 bit character arrays, commonly 
used for buffer etc. A 16 bit write would corrupt adjacent character. 
Unless can read back value of adjacent character and write back value just 
read and part of the 16 bit write - I dont think this could be done easily.

Has anyone considered this before and found any solutions or weird ways of 
dealing with this. Or have I lost the plot and trying to consider an option 
that was always doomed to failure.

TIA
David Williams.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list