Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

DE2 board SRAM interface

Hello there,

I'm trying to implement a simple system in DE2 board and I want to use external SRAM for my application. I have followed the following steps but still it doesn't work.

I looked many similar old posts but can't figure out my problem. Any help/ suggestion is appreciated.

1. Added a SRAM component IDT71V416 SRAM 512KB (256K x 16 bit). The SRAM in DE2 board is IS61LV25616AL. Guess it is a 256K x 16-bit SRAM.

2. Added a Avalon MM Tristate bridge.

3. Connected SRAM to Avalon Tristate Master.

4. I'm using only one external 50MHz clock which is common for both CPU and Tristate bridge.

5. Generated the nios_system and added top level where I weld the component connections to the FPGA pins.

address_to_the_sram_0 (18 downto 1) => SRAM_ADDR(17 downto 0),

be_n_to_the_sram_0(0) => SRAM_LB_N,

be_n_to_the_sram_0(1) => SRAM_UB_N,

data_to_and_from_the_sram_0 (15 downto 0) => SRAM_DQ,

read_n_to_the_sram_0=> SRAM_OE_N,

select_n_to_the_sram_0 =>SRAM_CE_N,

write_n_to_the_sram_0 => SRAM_WE_N

Now, when try to run I'm getting the following error:

Downloading 00080000 ( 0%)

Downloaded 53KB in 0.9s (58.8KB/s)

Verifying 00080000 ( 0%)

Verify failed between address 0x80000 and 0x8D2FF

Leaving target processor paused

My questions:

1. I find from previous posts where people have suggested to an interface between bridge and external SRAM using components editor. But I have simply fused the bridge connections to the external SRAM believing it is suffice. Is my understanding right? Is it really required to have an interface between the tristate bridge and the external SRAM pins?

2. Am I missing anything related to timing?

Thanks!

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The interface between tristate bridge and external SRAM will mainly define the correct timing for accessing the device. Since SRAMs usually can't run as fast as your sopc does, you need to apply waitstates on rd/wr accesses. With the interface component you can define different waitstates for every device connected to the same tristate bus.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I tried adding a new tristate component. But I have the following questions?

    1. Do I need to have a clock associated with the new tristate slave component?

    2. Am I supposed to write any HDL for the new component? Currently I'm just fusing the connections in the HDL for the new tristate slave component.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I was surprised to see the export done by SOPC builder itself and the clock association is also very good.

    Thanks for the info Cris!