Forum Discussion

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

Quartus 9.1 doesn't fit SCFIFO into M9K blocks, it prefers LEs. Why?!

Hi All,

I've used the project Nios II UDP Offload Example (http://www.alterawiki.com/wiki/nios_ii_udp_offload_example) on a Cyclone III dev kit, using Quartus 9.1. It seems to work well.

I tried to integrate the UDP offload into a my project. I made small changes on Offload Packet architecture, for instance use an SCFIFO (1024 depth) instead a DCFIFO. My original project took 392 M9Ks, and about 57% of LEs. The first time that I've tried to compile the full project, Quartus fails to fit into the device, give an out of LEs error. That was quite strange to me, and I saw in the Analysis & Synthesis report (Resource Utilization by Entity) that Quartus placed the SCFIFO into LEs! For sure a scfifo in LEs take a lot amount of resources. I also checked in sc_fifo generated file and the option "USE_MEMORY_BLOCKS" was set to 1.

I made another project, just a test, reducing the logic of my original project. At the end of compilation I saw that Quartus was able to fit scfifo into M9ks. Scfifo took 4 M9Ks, and the design overall 123 M9ks.

Back on the whole design, I decide to reduce the depth of scfifo to 256 and I'm able to compile correctly. However Quartus still places the scfifo into LEs (11197). In the report I can see there are 432-365 = 67 M9Ks free.

I'm wondering why Quartus does use LEs instead of M9Ks? What am I missing?

Thanks in advance.

4 Replies

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

    I'd like add only one thing, for the second project, the one with the reduced logic.

    --- Quote Start ---

    I made another project, just a test, reducing the logic of my original project. At the end of compilation I saw that Quartus was able to fit scfifo into M9ks. Scfifo took 4 M9Ks, and the design overall 123 M9ks.

    --- Quote End ---

    In this case, the report (Fitter-> Resource Section -> Ram Summary) shows scfifo memory type is AUTO and not M9K. Since scfifo is defined into the file altera_avalon_sc_fifo.v, is there a directive to force type memory to M9K to have always scfifo into this kind of blocks?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Tricky,

    thanks for your reply. As soon as possible I'll try and let you know.

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

    Hi Tricky,

    adding synthesis attributes, as you suggest, works perfectly. I modified the code (altera_avalon_sc_fifo.v) from this

     reg  mem ;  

    to this

     (* ramstyle = "M9K" *) reg  mem ; 

    Thanks again for your help!

    Best regards.