Page 1 of 1

Connecting SRAM to FlexBus

Posted: Tue May 17, 2016 7:41 am
by SeeCwriter
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.

Re: Connecting SRAM to FlexBus

Posted: Tue May 17, 2016 8:33 am
by pbreed
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?

Re: Connecting SRAM to FlexBus

Posted: Tue May 17, 2016 8:54 am
by SeeCwriter
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

Posted: Tue May 17, 2016 9:11 am
by pbreed
I believe BE0 goes to the LSB and BE1 goes to the MSB on the SRAM...

Re: Connecting SRAM to FlexBus

Posted: Tue May 17, 2016 9:17 am
by SeeCwriter
Thanks. That confirms what I was thinking.

Re: Connecting SRAM to FlexBus

Posted: Fri Jul 08, 2016 1:38 pm
by SeeCwriter
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

Posted: Fri Jul 08, 2016 1:56 pm
by rnixon
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.