Forum Discussion

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

sopc builder dual port on_chip_memory

in quartus5.0 sopc builder ,

Avalon Compoments-> Memory-> on_chip Memory ,

if i select the "dual-port access ",how can i ues them in my program.

my Email site wkongwkong@163.com

thank you very much!

3 Replies

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

    --- Quote Start ---

    originally posted by wkongwkong@Jun 20 2006, 02:55 AM

    in quartus5.0 sopc builder ,

    avalon compoments-> memory-> on_chip memory ,

    if i select the "dual-port access ",how can i ues them in my program.

    my email site wkongwkong@163.com

    thank you very much!

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

    --- quote end ---

    --- Quote End ---

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

    In 5.0 it&#39;s a bit tricky since the linker is going to see two memory ports with the same address span. In 6.0 this is easier and you can use configurations like .text in port s1 and all the other sections go in port s2 (system library properties). You would then connect the instruction master to port s1 and the data master to port s2. If nothing else needs to access this memory then you might as well use tightly coupled masters to access this memory (low latency). The nice thing about this setup is .text shouldn&#39;t overlap any other section (so no read-write to the same location is possible), and Nios II will be able to access the instruction and data memory in parallel. Just make sure you don&#39;t connect a single master (of any kind, not just Nios II) to both ports of a memory.

    If you want to try this out I recommend modifying the &#39;fast&#39; example design hardware (dual port the memory, and connect one of the masters to the other port). Also there is nothing special to implement in software since all instruction (read) accesses use the instruction master and all data accesses (read/write) use the data master. So making good use of dual port memory is up to how you design the system.