Forum Discussion

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

QSYS fails to generate SS_n export correctly for SPI interface?

I have been tearing my hair out over this and have concluded that the SOPC generation of an SPI peripheral is broken somehow in QSYS (yet worked fine with SOPC Builder).

I have an SPI master in my SOPC design and specify the number of slaves to be 3.

The SOPC module generated by QSYS declares the SS_n signal as:

output wire spi_0_SS_n

yet it connects it to an SPI instance where .SS_n is declared as

output [2:0] SS_n

so only a single one of my chip-selects ever gets asserted and thus I can only communicate with one of the SPI devices now instead of all three.

Anyone else seen this? Any work-around suggestions?

I have tried removing the SPI device and re-adding it in QSYS but (predictably) it is consistently wrong.

Thanks,

-dave

14 Replies

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

    I have the same problem: QSYS fails to generate SS_n export.

    The ss_n port on the symbol block in my .bdf file has only 1 dimension instead of 2.

    How can fix it? I have to modify the HDL file as you said previously?

    After editing the file i just compile again my project?

    Thank you.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You would have to edit the HDL and the symbol file since it is getting generated with a single bit ss_n signal. I have never modified a symbol file directly but it's probably possible with a text editor.

    If you used Quartus II to generate a new symbol based on the edited HDL you'll end up with a symbol that doesn't look anything like what Qsys is generating (but that's an alternative to hacking up a symbol directly).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Have you tried this with Quartus 11.1 SP1? (I think that is the latest).

    IIRC when I tried this with the latest version of QSYS it seemed to work now.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yes I spoke to an Altera support representative and he confirmed that this problem has been fixed in Quartus 11.1