Forum Discussion

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

compile the same project several times get several different timing results, why?

In my project, the original files are top.vhd, Niosii_cpu.sopcinfo, Niosii_CPU.sopc, create-quartus-project.tcl , board.tcl file (which includes setting configuration), board.sdc (which include timing constraint file), all other project files are created by make files based on original files. I use quatus 11.1 (builder 173 ) to compile, place route. After a try, I get a timing report, then I revert the whole project to original files, also delete all temperary files. I compile again, I would get different timing result. I have tried 5 times, the worst setup slack is 0.247, 0.124, -0.973, -0.074, -0.346 ns. I'm confused by the compilation. Why does the timing result varies so much? I'm trying to increase some slack by setting fitter, it is hard to see my modification effect if the timing varies so much at the first place. Does anybody have any sugguestion?

8 Replies

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

    Compiling from a given set of files with a given seed on a given platform is supposed to give the same results each time. Are you sure nothing is changed on each compile?

    Do you re-generate the Sopc system at each compile? Do you have a system id component? If yes it may produce a slightly different result on each generation, as the timestamp will be different.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Compiling from a given set of files with a given seed on a given platform is supposed to give the same results each time.

    --- Quote End ---

    I have also noticed random results starting in Quartus 11.1sp1 or so. In the Qsys PCIe tests in this thread:

    http://www.alteraforum.com/forum/showthread.php?t=35678

    Quartus 11.0 gives the same number of resources each synthesis run, whereas 11.1sp1 and 11.1sp2 give different results. Synthesis scripts in the project zip file can be used to regenerate the designs.

    I agree that this is an annoying feature. The whole point of having the seed is so that the user can choose when to randomize the synthesis.

    Cheers,

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

    Yes, it regenerate sopc system each compilation, and there is system id component in the sopc system.

    I run a make file which generate project file, generate sopc system and compile. Each time I run the make file (before next compilation, all generated files are deleted), it gives different timing result.

    In order to check it is the matter of regeneration of sopc system or not.

    I open the generated project file in Quatus (all generated files are kept), I recompiled by double click compilation design in Quatus GUI. The timing result is still different with previous result which is compiled by make script. But if I recompile in Quatus GUI again, it will stay the same. I do not understand, are there any difference between Quatus GUI and script command?

    By the way, I installed quatus 11.1, I do not install service pack 1, but the builder is 173.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Another variable I noted is that if you generate timestamp then it changes timing results while nothing else has been changed. It is all to do with the huge fitting space available to the fitter.

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

    --- Quote Start ---

    Another variable I noted is that if you generate timestamp then it changes timing results while nothing else has been changed. It is all to do with the huge fitting space available to the fitter.

    --- Quote End ---

    In my example, there are no changes whatsoever to any design files. Quartus 11.0 consistently produces identical resource results, whereas 11.1sp1 and 11.1sp2 produce different resource results (and timing).

    Something in the router logic definitely changed in the latest versions. The change was for the worse in my case, as the Qsys PCIe designs no longer meet timing, whereas they did in 11.0.

    Cheers,

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

    I think it is better to make my question clear here:

    In order to check it is the matter of regeneration of sopc system or not.

    I open the generated project file in Quatus (all generated files are kept, and the worst setup slack is -0.597ns), I recompiled by double click compilation design in Quatus GUI. The timing result (0.173) is still different with previous result(-0.597) which is compiled by make script. But if I recompile the same project file in Quatus GUI again, it will stay the same (0.173). I do not understand, are there any difference between Quatus GUI and script command?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am not familiar with scripting but I assume it will call project settings from qsf. When you click on GUI the qsf will be updated by whatever setting are there (default or otherwise).

    However, I will address your problem differently. When timing is marginal then you get get violations migrating from place to place depending on many many variables in the project or code. The change of seed is one of them and is only practical at final sign off. The remedy during development is to see if there is any pattern of timing violations i.e. a bottleneck that can be improved.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If I remove systemID component, and recompile with regenerating sopc system, there would be no variations for timing result any more.

    Also I have tired not generate sopc system every time I recompile, the variations are gone too.

    So I'm sure it is the matter of system ID component now.

    Also I found that quartus 64 and quartus 32 give different synthesis result, and therefore timing. That's why I have different results from script compiling (64bit) and GUI compiling (32bit).

    I agree the practical try is to find out the critical path and improve it.