Forum Discussion

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

How do I get SSRAM to run at 125MHz?

I have a design with two processors. One processor uses MRAM connected via a TCM interface as its instruction memory, and some M4Ks for data memory. The other processor uses SSRAM as its data and instruction memory. I have a single clock for the entire design. This design is running on the new Stratix II dev kit.

When I set that clock to be 125 Mhz (no skew) the design made timing and said my fmax was 130MHz. When I went to load the design, the software for the first processor loaded fine, but the software for the second processor gave me the "verify failed" error. I assume that's because even though the design made timing, the SSRAM wasn't happy with 125MHz. Going by the SSRAM interface document, I put a -4.8ns skew on the clock and recompiled, but then the design failed timing.

So what I'm wondering is, do I need two clocks? One for everything else, set at 125Mhz with no skew, and one for the avalon bridge that the SSRAM connects to with -4.8ns of skew? Or is it just a matter of finding the right skew for the single clock?

3 Replies

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

    For the CycloneII kit, I had the same problem.

    I adjusted the skew to -1.5ns, then the SSRAM worked on 120Mc.

    So indeed it is a matter of adjusting the skew to the correct value. Trial and error, or following the description in the SSRAM core manual.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by svhb@Sep 1 2006, 06:13 AM

    for the cycloneii kit, i had the same problem.

    i adjusted the skew to -1.5ns, then the ssram worked on 120mc.

    so indeed it is a matter of adjusting the skew to the correct value. trial and error, or following the description in the ssram core manual.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=18007)

    --- quote end ---

    --- Quote End ---

    I tried -4.8ns and it verified the code after downloading it from the IDE, but nothing happened after that. I&#39;m doing a compile with -1.5ns now.

    Has anyone successfully used SSRAM at 125 (or higher) MHz on a Stratix II development kit? If so what skew did you use for the SSRAM clock?

    Alternatively, what signals should I be looking at on a logic analyzer to determine what the ideal skew for my design is? SSRAM uses quite a few more signals than the mictor connector provides.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by bkucera+sep 6 2006, 04:13 pm--><div class='quotetop'>quote (bkucera @ sep 6 2006, 04:13 pm)</div>

    --- quote start ---

    <!--quotebegin-svhb@Sep 1 2006, 06:13 AM

    for the cycloneii kit, i had the same problem.

    i adjusted the skew to -1.5ns, then the ssram worked on 120mc.

    so indeed it is a matter of adjusting the skew to the correct value. trial and error, or following the description in the ssram core manual.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=18007)

    --- quote end ---

    --- Quote End ---

    I tried -4.8ns and it verified the code after downloading it from the IDE, but nothing happened after that. I&#39;m doing a compile with -1.5ns now.

    Has anyone successfully used SSRAM at 125 (or higher) MHz on a Stratix II development kit? If so what skew did you use for the SSRAM clock?

    Alternatively, what signals should I be looking at on a logic analyzer to determine what the ideal skew for my design is? SSRAM uses quite a few more signals than the mictor connector provides.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=18119)</div>

    [/b]

    --- Quote End ---

    On the Startix II board I ran the SSRAM at a couple of speeds sucessfully however I didn&#39;t do any math described inth the SSRAM document (so take these numbers with a grain of salt):

    (2 cycles of read latency)

    120MHz -4.8ns

    125Mhz -3.5ns

    My suggestion if you don&#39;t want to do the timing math from the report file:

    1) Minimize your design so it compiles fast containing Nios II (f), JTAG UART, Timer, SysID, Tri-state Bridge, and SSRAM component (and generate)

    2) Turn on smart compile in your Quartus II project settings

    3) Pick some frequency you want to run your SSRAM (and keep this constant between steps 4-6)

    4) Pick a reasonable amount of phase shift (look at the Cyclone II numbers to start you off in the right direction, note these are not directly applicable to Stratix II)

    5) Compile and try it out

    6) From there just slide the clock by adjusting the phase shift and find the range that works.

    Also just in case there is any confusion, when you use a skewed clock to drive the SSRAM component you still need to use a seperate clock that you set for the SSRAM in SOPC Builder. The reason for using the skewed clock is to realign the data so that it can be captured sucessfully on the Avalon clock domain. So using my 125MHz -3.5ns example above I would have sent a clock into SOPC Builder at 125MHz but with no skew.