Forum Discussion
Any reason that you cannot use the same db and incremental_db for compilation? Those are just files that you can copy and paste over. In the past, I added this as a criterion to the KDB, as we have had customers who also could not get the same result without retaining these two folders. So, it is natural that this is needed.
These folders store intermediate compilation data, such as placement, routing, and netlist optimizations, which influence the final bitstream. Without these directories, Quartus starts the placement and fitting process from scratch, which can introduce small variations due to non-deterministic task scheduling, fitter seed changes, or parallel compilation differences.
In any case, here are some additional things that you can try, but no guarantee since your db and incremental db is not preserved.
1. Parallel Compilation and Task Scheduling
You observed differences in the parallel compilation values in the .map.rpt and .fit.rpt reports. This suggests that task scheduling in parallel compilation could be causing the variation.
- Potential Root Cause:
- The Quartus compiler, when parallel compilation is enabled, assigns tasks to different processors dynamically, which can change the order of resource allocation and affect placement, routing, and final bitstream.
- Solution:
- Disable parallel compilation to eliminate task scheduling differences:
- In GUI:
- Go to Assignments → Settings → Compiler Settings → Parallel Compilation and uncheck the box.
- In .qsf:
- Add the following: set_global_assignment -name NUM_PARALLEL_PROCESSORS 1
- Recompile the project and check if the .pof and .rpd files match more closely.
2. File Timestamps and Environmental Differences
Some versions of Quartus may embed metadata (e.g., compile timestamps, hostname, file paths) into output files, causing bitstream differences even with functionally identical logic.
- Solution:
- Inspect the differences in the .pof or .rpd files using a hex editor:
xxd file1.pof > file1_hex.txt
xxd file2.pof > file2_hex.txt
diff file1_hex.txt file2_hex.txt
If the differences are limited to header metadata (e.g., timestamps, path strings), you may ignore them if functional verification (timing, logic) passes.