I have an SRAM that has a 16-bit data bus and I want to connect it to the FlexBus. Do I ground address line A0 on the memory and connect A0 on FlexBus to A1 on the memory?
This for the MOD54415 module.
Connecting SRAM to FlexBus
Re: Connecting SRAM to FlexBus
A1 from CPU goes to A0 on memory
16 and 32 bit reads and writes will work as expected.
8 bits reads will work.
BUT 8 bit writes will not work unless you also use the BE0 and BE1 byte strobes to gate the half wide writes...
Does you 16 bit SRAM support writing just one half ie 8 bits?
16 and 32 bit reads and writes will work as expected.
8 bits reads will work.
BUT 8 bit writes will not work unless you also use the BE0 and BE1 byte strobes to gate the half wide writes...
Does you 16 bit SRAM support writing just one half ie 8 bits?
-
- Posts: 624
- Joined: Mon May 12, 2008 10:55 am
Re: Connecting SRAM to FlexBus
Yes, the SRAM supports reading and writing bytes. It has a Byte_Low and Byte_High enables to instruct the SRAM which byte is valid on a single byte transfer or misaligned data.
Re: Connecting SRAM to FlexBus
I believe BE0 goes to the LSB and BE1 goes to the MSB on the SRAM...
-
- Posts: 624
- Joined: Mon May 12, 2008 10:55 am
Re: Connecting SRAM to FlexBus
Thanks. That confirms what I was thinking.
-
- Posts: 624
- Joined: Mon May 12, 2008 10:55 am
Re: Connecting SRAM to FlexBus
Probably a dumb question, but will I be able to use memcpy to copy data in and out of the SRAM?
Re: Connecting SRAM to FlexBus
memcpy() copies from one memory location/pointer to another. So, yes. Be sure to look at the platform memory map so you know where you are locating your sram. You will need to do this for the chip select anyway.