Results 1 to 8 of 8

Thread: How to find problem in design after compiliation / fitter failure

  1. #1
    Join Date
    May 2018
    Posts
    5
    Rep Power
    1

    Default How to find problem in design after compiliation / fitter failure

    Hello everyone.

    I have created a project that according to the HTML report has the following estimates:

    Kernel Name ALUTs FFs RAMs DSPs
    Total 61485 (56%) 72984 (33%) 322 (63%) 94 (84%)
    Available 109572 219144 514 112

    In the file top.fit.rpt I can see the following summary after compilation:

    Code:
    ; Fitter Summary                                                                    ;
    +---------------------------------+-------------------------------------------------+
    ; Fitter Status                   ; Failed - Wed Apr 25 23:51:32 2018               ;
    ; Quartus Prime Version           ; 17.1.0 Build 590 10/25/2017 SJ Standard Edition ;
    ; Revision Name                   ; top                                             ;
    ; Top-level Entity Name           ; top                                             ;
    ; Family                          ; Cyclone V                                       ;
    ; Device                          ; 5CSEMA5F31C6                                    ;
    ; Timing Models                   ; Final                                           ;
    ; Logic utilization (in ALMs)     ; 32,070 / 32,070 ( 100 % )                       ;
    ; Total registers                 ; 65218                                           ;
    ; Total pins                      ; 115 / 457 ( 25 % )                              ;
    ; Total virtual pins              ; 0                                               ;
    ; Total block memory bits         ; 1,389,980 / 4,065,280 ( 34 % )                  ;
    ; Total RAM Blocks                ; 0 / 397 ( 0 % )                                 ;
    ; Total DSP Blocks                ; 87 / 87 ( 100 % )                               ;
    ; Total HSSI RX PCSs              ; 0                                               ;
    ; Total HSSI PMA RX Deserializers ; 0                                               ;
    ; Total HSSI TX PCSs              ; 0                                               ;
    ; Total HSSI PMA TX Serializers   ; 0                                               ;
    ; Total PLLs                      ; 2 / 6 ( 33 % )                                  ;
    ; Total DLLs                      ; 1 / 4 ( 25 % )                                  ;
    +---------------------------------+-------------------------------------------------+
    However, the process fails with the following message in the same file:

    Code:
    Error (170012): Fitter requires 3213 LABs to implement the design, but the device contains only 3207 LABs
    I can't find the reason for this and in contrast to the HTML report there is no link to which lines of the source code are causing what resource usage. Is there any way to get a more accurate HTML report based on the actual compilation to find the reason for the increased resource usage? It seems there is quite a discrepancy between the estimate and the actual usage so I wonder how this can be traced / understood and fixed in the code. Any ideas are much appreciated.

    Board: Cyclone V, 5CSXFC6D6F31C8ES, de1soc:de1soc_sharedonly

  2. #2
    Join Date
    Dec 2007
    Location
    Bochum Germany
    Posts
    6,319
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    As a first, quite obvious answer, the estimation has been done for a different device. The final implementation is running short of DSP blocks, apparently consumes many ALMs to replace it.

  3. #3
    Join Date
    May 2018
    Posts
    5
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    Thanks for your reply. I doubt this is the case because the report is being created at the same time with the full flow compilation for the device (Terasic DE1-SoC). This is the device line from the report:
    Code:
    Target Family, Device, Board: Cyclone V, 5CSXFC6D6F31C8ES, de1soc:de1soc_sharedonly
    This is the device info from the top.fit.rpt file:
    Code:
    ; Family                          ; Cyclone V                                       ;
    ; Device                          ; 5CSEMA5F31C6                                    ;
    For me they look like they are for the same device. Are they not?

    EDIT: Taking a closer look at the device codes it seems that 5CSXFC6D6F31C8ES does not match the DE1-SoC board. How can this be? Looking at the Cyclone V product table this would be a Cyclone V SX SoC instead of a Cyclone V SE SoC. Any ideas?

    It makes sense the DSPs are the bottleneck, I will look into it and see if I can somehow reduce the DSP usage further. If you have any further ideas regarding how to make the HTML report more accurate (after the full flow compilation i mean) it would be awesome! Thanks again.
    Last edited by ersheim; May 14th, 2018 at 04:08 AM.

  4. #4
    Join Date
    Dec 2007
    Location
    Bochum Germany
    Posts
    6,319
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    Isn't it possible to make the report for the same device that is used in the compilation?

  5. #5
    Join Date
    May 2018
    Posts
    5
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    I wish it was, but how? I am not doing anything to change the board myself, so how can I make it for the same device? This is the command I use for compilation:
    Code:
    aoc -o t_device -v -I/x/inc -I/x/bin2 -I/y/intelFPGA/17.1/hld/include/kernel_headers -board=de1soc_sharedonly -profile -high-effort -fp-relaxed -fpc -seed=3 /x/device/device.cl
    I suspect the Terasic board support package might be incomplete because the board_spec.xml file does not contain a line containing 5CSEMA5F31C6, only this one: <device device_model="5csxfc6d6f31c8es_dm.xml">.

    File board_spec.xml:
    Code:
    <?xml version="1.0"?>
    <board version="14.1" name="de1soc_sharedonly">
    
      <compile project="top" revision="top" qsys_file="system.qsys" generic_kernel="0">
        <generate cmd="ip-generate --component-file=system.qsys --file-set=QUARTUS_SYNTH --output-directory=system/synthesis --report-file=qip:system/synthesis/system.qip --jvm-max-heap-size=3G"/>
        <synthesize cmd="quartus_sh --flow compile top -c top"/>
        <auto_migrate platform_type="c5soc" >
          <include fixes=""/>
          <exclude fixes=""/>
        </auto_migrate>
      </compile>
      
      <device device_model="5csxfc6d6f31c8es_dm.xml">
        <used_resources>
          <alms num="1080"/><!-- ALMs used for LUT logic + ALMs used for LUT logic and registers-->
          <ffs num="1908"/>
          <dsps num="0"/>
          <rams num="20"/>
        </used_resources>
      </device>
    
      <!-- One DDR3-800 DIMM, 256-bit data -->
    	<global_mem max_bandwidth="6400">
    		<interface name="acl_iface" port="kernel_mem0" type="slave" width="256" maxburst="16" latency="240" address="0x00000000" size="0x40000000"/>
    	</global_mem>
    	<host>
    		<kernel_config start="0x00000000" size="0x0100000"/>
      </host>
      <interfaces>
    		<interface name="acl_iface" port="kernel_cra" type="master" width="64" misc="0"/>
    		<interface name="acl_iface" port="kernel_irq" type="irq" width="1"/>
    		<kernel_clk_reset clk="acl_iface.kernel_clk" clk2x="acl_iface.kernel_clk2x" reset="acl_iface.kernel_reset"/>
    	</interfaces>
    </board>

  6. #6
    Join Date
    Jan 2017
    Posts
    692
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    Hmm, this seems very strange. Many people new to OpenCL on FPGAs use Terasic's low-cost Cyclone boards, someone should have seen this by now. I recommend bringing up the matter with Terasic's support.

  7. #7
    Join Date
    May 2018
    Posts
    5
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    Thanks, I will contact them and report back. If any ideas come up meanwhile, let me know.

  8. #8
    Join Date
    May 2018
    Posts
    5
    Rep Power
    1

    Default Re: How to find problem in design after compiliation / fitter failure

    It turns out that Terasic does not use the board_spec.xml file for generating their BSP, hence the wrong values. They instead modify the .dts file directly to generate the device tree / .dtb file. Unfortunately I could not get a reply on how to correctly set the parameters for the board_spec.xml file to make the HTML report more accurate. I am now using these values:

    File hld/share/models/dm/5csema5f31c6_dm.xml:
    Code:
    <!-- Device model for: 5CSEMA5F31C6 -->
    <device_model version="0.9" target_model="cyclonev_tm.xml">
      <fmax expected="200" min="100" high="175"/>
      <resources>
        <alms num="32070"/>
        <ffs num="128280"/>
        <dsps num="87"/><!-- variable precision DSP blocks -->
        <rams num="3970"/><!-- M10Ks -->
      </resources>
    </device_model>
    For the number of FFs I guessed it should be four times the number of ALMs. The values for fmax-{expected, min, high} are from the reference kit and I have no idea if these are close-enough values... The resource estimate is much closer to reality now.

    To use the file above, I had to replace
    Code:
      <device device_model="5csxfc6d6f31c8es_dm.xml">
    with
    Code:
      <device device_model="5csema5f31c6_dm.xml">
    in the board_spec.xml file.

Similar Threads

  1. Replies: 0
    Last Post: March 8th, 2018, 12:37 AM
  2. Cyclone III Dev board fitter failure when using SRAM
    By cward in forum General Altera Discussion
    Replies: 0
    Last Post: February 2nd, 2012, 01:11 PM
  3. NIOS II EDS compiliation program size
    By paddy325 in forum General Discussion Forum
    Replies: 2
    Last Post: September 19th, 2010, 10:49 PM
  4. Fitter and TimeQuest can't find my clock nets
    By culleyd in forum Quartus II and EDA Tools Discussion
    Replies: 1
    Last Post: November 2nd, 2009, 08:10 AM
  5. Verilog Compiliation Error
    By mitchwxy in forum General Altera Discussion
    Replies: 8
    Last Post: August 24th, 2009, 04:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •