Connecting SRAM to FlexBus

Discussion to talk about hardware related topics only.
Post Reply
SeeCwriter
Posts: 606
Joined: Mon May 12, 2008 10:55 am

Connecting SRAM to FlexBus

Post 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.
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: Connecting SRAM to FlexBus

Post 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?
SeeCwriter
Posts: 606
Joined: Mon May 12, 2008 10:55 am

Re: Connecting SRAM to FlexBus

Post 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.
User avatar
pbreed
Posts: 1080
Joined: Thu Apr 24, 2008 3:58 pm

Re: Connecting SRAM to FlexBus

Post by pbreed »

I believe BE0 goes to the LSB and BE1 goes to the MSB on the SRAM...
SeeCwriter
Posts: 606
Joined: Mon May 12, 2008 10:55 am

Re: Connecting SRAM to FlexBus

Post by SeeCwriter »

Thanks. That confirms what I was thinking.
SeeCwriter
Posts: 606
Joined: Mon May 12, 2008 10:55 am

Re: Connecting SRAM to FlexBus

Post by SeeCwriter »

Probably a dumb question, but will I be able to use memcpy to copy data in and out of the SRAM?
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Connecting SRAM to FlexBus

Post 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.
Post Reply