Forum Discussion

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

Qsys - Base Address Problem

Hello everyone,

i have created a qsys-system with a state machine working as an avalon memory mapped master and a pio working as an avalon memory mapped slave. The Master uses 32bit for addresses and 16bit data. The slave uses a 2 bit address and 8bit data. The pio slave is connected to leds.

Now the problem: If i use a base address for the slave like 00000000hex or 02000000hex than it seems to function as aspected but if i use a base address like 02000008hex nothing happen.

If i try to set the base address to an address like 02000001, i get an error that the base address cannot be at 02000001 (02000000 or 02000008 are acceptable).

Why can't i use base addresses like 02000008hex?

thanks and regards,

schlittk

19 Replies

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

    You really want the data widths to match, otherwise a 'bus width adapter' is added that will convert a single master access into multiple slave ones.

    In many cases an adapted that just padded out the data bus would work fine - but that isn't what you get.

    These adapters (and clock crossing bridges) are added 'by magic' and their presence isn't easy to determine.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    So it has a 32 bit wide databus on the Avalon fabric. and then an offset of 8 isn't possible as the PIO has 4 - 32bit words address space. That may explain why setting the address to 0x02000010 in your Avalon master works.

    I do not have a 16 bit Avalon MM Master at hand, and none seem to be available from the Qsys Library panel.

    Maybe Qsys errs by allowing you to set the address to 0x020000008.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You really want the data widths to match, otherwise a 'bus width adapter' is added that will convert a single master access into multiple slave ones.

    In many cases an adapted that just padded out the data bus would work fine - but that isn't what you get.

    These adapters (and clock crossing bridges) are added 'by magic' and their presence isn't easy to determine.

    --- Quote End ---

    I can't get the data widths to match. I want to use the sdram controller. When i look in qsys system inspector for the s1 signals i see that readdata and writedate uses 16 bit. Thats why i use 16 bit data bus for the master. The pio i use used only 8bit for writedata and readdata. Both of them are created by qsys.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    So it has a 32 bit wide databus on the Avalon fabric. and then an offset of 8 isn't possible as the PIO has 4 - 32bit words address space. That may explain why setting the address to 0x02000010 in your Avalon master works.

    I do not have a 16 bit Avalon MM Master at hand, and none seem to be available from the Qsys Library panel.

    Maybe Qsys errs by allowing you to set the address to 0x020000008.

    --- Quote End ---

    How can i see that the altera_avalon_pio uses 32bit databus? If i look in qsys system inspector for the s1 signals of the pio i see that readdata and writedate uses only 8 bit.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If you doubleclick on the PIO in the System Contents and then check the show signals in the Block Diagram you will see that the databus width is 32 and cannot be altered.

    Funny, I see 32 bits in the system inspector.

    What version of Qsys/Quartus II are you using? In fact that should have been the first question to ask ...

    I am using Qsys 13.1 Build 173
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Then you shall have no pie :)

    Any particular reason to stick to 10.1?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Now I have tried a newer version. In 13.1 the pio uses 32 bit and the problem with the base address are resolved.

    Thank you.