Xilinx BRAMs question - help needed ..

Hi all, My problem is as follows, I need to use a BRAM to create a true dual port memory (6x512). My memory should be written to/read from simultaneously. But !!! my problem is that I need to fill the memory with bit at a time i.e. whenever I get a bit in my input I also get two signals - address and bit field (0-5) and that bit should be written to that address correct bit location. Now if another bit arrives to the same address but to a different bit field it should be also written to it (like a bit-wise OR between current value and new value).

I thought to implement it with Xilinx's BRAM by Or'ing the RAM output with the new written input but I noticed (too late..) that the BRAM output comes out one cycle after the address. This makes it a problem for me because now I need 2 clock cycles for every one of these "bit-enabled write" operations.

I hope that my post is not too long and exhausting and I would appreciate any ideas from you guys...

Thanks, Mordehay.

p.s - I'm using V4 (lx).

Reply to
me_2003
Loading thread data ...

Reply to
Peter Alfke

You could have both sides write to their own BRAM and define the output of the whole thing as the OR of the outputs of the BRAMs.

--
Ben Jackson AD7GD

http://www.ben.com/
Reply to
Ben Jackson

Yes, that is what I was going to do but i thought that maybe someone will come out with a nicer idea, or that maybe there is a way to make Xilinx BRAMs to work as I needed them to (data out in the same cycle). the clock rate is not the issue beacuse I dont want to give two cycles for each write (not very elegant).

That's an interesting idea, If I define portA to be 1 bit wide and portB 6 bits wide, when reading from portB (address 0) would I get the

6 values written to portA (address 0 to 5) ?

Thanks, Mordehay.

Reply to
me_2003

Yes but I need a 6 bit wide vector - so that means that I would have to use 6 BRAMs. while utilizing a very small precentage of each (I need only 512 entries). Thanks, Mordehay.

Reply to
me_2003

I don't think 6 bits wide is an option, I'd expect only powers of 2 are allowed. Could you make port B 8 bits and just throw away 2 bits? So port A bit # = addr*8 + bit [0-5]

-Dave

--
David Ashley                http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
Reply to
David Ashley

As others suggested, you can ultilize 1 Bram, the writing port is 4k x1, the reading port is 512x8. No reason why it doesn't work..

Cheers,

Reply to
Marlboro

To hell with elegance. Just make it work at the speed, and the cost, and the amount off effort that is acceptable... Peter Alfke

Reply to
Peter Alfke

Gaaahhh. Always choose an elegant solution over the other kind. Part of elegance is that it includes those 3 things you require anyway, otherwise it wouldn't be elegant. Everyone's got a ton of stories about elegant solutions they've come up with.

-Dave

--
David Ashley                http://www.xdr.com/dash
Embedded linux, device drivers, system architecture
Reply to
David Ashley

Hi u guys, I've decided to go with the different port width approach. Thanks alot for your answers. Mordeahy.

Reply to
me_2003

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.