Question about using dual port BRAM with Spartan-II

Status
Not open for further replies.

m_kartik

Newbie level 6
Joined
Feb 7, 2006
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,358
Hi, I'm using Spartan-II FPGA and i have Dual port BRAM in my design.
i'm writing on Port B and reading from port A.
Please refer the waveform - the data 0x0E00 is available in the next clock cycle after ENA is asserted.
But i need to get the data on the same clock cycle, when ENA is high. Is it possibile to do it?
Someone plz help me....
 

Re: BRAM Spartan-II

Hi. If you are using RAMB4_S16 blockram from spartan II, you apparently cannot have the output in the same clock cycle the write enable strobe is asserted as the BRAM has a synchronous write, the ENA will get sampled on the next rising edge of clock.

Also, why do you need this? In a synchronous design, the data will get sampled on the next rising edge of clock on the other side, you simply need to delay the ENA signal for 1 clk period(provided that both sides are using the same clock speed).

I might be able to help more if you could post more about what are you trying to achieve.
 

Re: BRAM Spartan-II



Thanks for the reply. I'm using RAMB4_S16_S16 BRAM from Spartan II. The thing is i've a FIFO which is made up of BRAM. The output of the BRAM/FIFO is going to PCI Interface, which is expecting the data on the same clock cycle, the ENA is asserted. Since the ENA is generated by the PCI Core, i can't get this signal 1 cycle earlier.
 

Re: BRAM Spartan-II

Can't you tie ENA to '1' permenently in ur design??
 

Re: BRAM Spartan-II

The PCI core therefore expects to have the data ready when the ENA signal which it produces is high, to sample it on the next rising edge of clock? This seems highly unusual for a synchronous design.
If it is absolutely necessary, you could either try inverting the port A clock, or use a 180deg phase shifted clock (respective to CLKA from your example),CLKA180, to clock the port A.
In that case, the ENA will be sampled in the BRAM on the rising edge of CLKA180, which corresponds to the falling edge of CLKA, and data will be present on the DOA output for the rising edge of CLKA.
 

    m_kartik

    Points: 2
    Helpful Answer Positive Rating
Re: BRAM Spartan-II


I was also thinking of inverting the clock signal and i tried, it's working...
Thanks a lot
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…