Forum Discussion

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

SRAM interface on UP3

I am developing vhdl file to interface SRAM on UP3 kit with avalon tri state bridge. I know SLS has SRAM interface available, but I want to develop my own. I have signals address, data, write_n, outputenable_n, chipselect_n and byteenable_n on both avalon tri state side and memory side of the interface. I interconnected these signals in my vhdl file and connected byteenable to logic 0 to select 16 bit data. I created new component in altera SOPC builder and exported signals on memory side interface. I gave different read/write wait states (like 0, 1, 5). My program resides on on-chip memory and data memory on sram. I am able to see chipselect being generated. but i don't see any signal on read/write_n line or data line which i toggle using C program. I need help in figuring out what is that i am doing wrong?

hope I have given picture of what i am doing. I want to make sure interface is working right before i connect it to actual component on the board..

Thanks

1 Reply

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

    There are (or used to be) instructions on how to build your own SRAM "component" in the SOPC Builder memory chapter of the QII handbook.

    Alternately, you could take a look at either Altera's component or SLS's and reverse engineer from there. Altera's version is written in Europa (Perl-based HDL generation), but we're not talking about a complex component here, so it's not difficult to understand.

    An SRAM interface is arguably the easiest thing to design in Avalon. You're just passing these signals through to the tristate bus and then connecting them to your SRAM in the top-level design of your FPGA. No HDL (of your own) should be required. You should just be telling the switch fabric how to connect to your SRAM and what sort of wait states/cycles to apply.

    You mentioned that you tied byteenable low. This is not correct. There should be byteenable pins on your SRAM and these should be connected there. In your case, byteenable should be 2 bits wide.

    Ok...that should get you started.

    Best Regards,

    - slacker