Forum Discussion

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

Creating an Avalon Master - Please Help

Hi

I want to use the sdram controller but it requires an avalon master. I have been trying to create one with SOPC builder in verions 7.2 quartus. Could someone perhaps just give a list of points indicating how one does this and gets the master to link to the controller?

19 Replies

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

    --- Quote Start ---

    You cannot directly connect an external device with the Avalon Master. You need to create a Tri-state bridge before you can connect the device to the bus.

    --- Quote End ---

    I dont quite follow this. According to the SOPC docs I need a master if I use the SDRAM IP. If this is the only slave why do I need a bridge? I thought that the bridge was to allow for multiple slaves? The docs imply that I can create my own master which is what I have done. The system compiles in SOPC without warning or errors. I have not tested it yet.

    So are you saying that I need the bridge component between the external micro and my master device?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Is the Avalon bridge a free IP core?

    --- Quote End ---

    Tri-state Avalon bridge is freely available with SOPC Builder. It is a part of the bus fabric.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I dont quite follow this. According to the SOPC docs I need a master if I use the SDRAM IP. If this is the only slave why do I need a bridge? I thought that the bridge was to allow for multiple slaves? The docs imply that I can create my own master which is what I have done. The system compiles in SOPC without warning or errors. I have not tested it yet.

    So are you saying that I need the bridge component between the external micro and my master device?

    --- Quote End ---

    The bridge is required when you want to connect an external (i.e. off-chip) peripheral. If you have an on-chip peripheral, then you don't need the tri-state bridge. In your specific case, if your SDRAM is an *external* chip which would communicate with the SOPC/NIOS system on the FPGA, then you certainly need a bridge. If the SDRAM is an on-chip component, say an IP core or an HDL design, then you don't have to use the bridge.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Tri-state Avalon bridge is freely available with SOPC Builder. It is a part of the bus fabric.

    --- Quote End ---

    Does "freely available" = cost nothing and is not time limited and works with free web edition?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    The bridge is required when you want to connect an external (i.e. off-chip) peripheral

    --- Quote End ---

    In this case is the DRAM controller not an on chip peripheral? My system is as follows:

    I have an external AVR micro which I want to connect to the DRAM. I also have an external video decoder chip which I want to connect to DRAM. I use the SOPC DRAM controller and link it to an Avalon master that I created. The master has external address,data and control lines. I now want to use some FPGA logic to connect decoder and micro to this Avalon master. Is this where the bridge comes in? I looked at the bridge component but did not see any option to add non avalon lines?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Does "freely available" = cost nothing and is not time limited and works with free web edition?

    --- Quote End ---

    Yes. Please understand Tri-state bridge is not an IP core. It is an essential part of Avalon fabric.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    In this case is the DRAM controller not an on chip peripheral? My system is as follows:

    I have an external AVR micro which I want to connect to the DRAM. I also have an external video decoder chip which I want to connect to DRAM. I use the SOPC DRAM controller and link it to an Avalon master that I created. The master has external address,data and control lines. I now want to use some FPGA logic to connect decoder and micro to this Avalon master. Is this where the bridge comes in? I looked at the bridge component but did not see any option to add non avalon lines?

    --- Quote End ---

    So as I understand, you have "a DRAM controller in the SOPC system" and your external devices will be communicating with this *DRAM controller only* rather than the cpu, or so to say Avalon bus, itself. You don't need a Tri-state bridge in this case (as your external devices are not communicating with the Avalon bus directly).