Comments (6)
There are a few things at play here:
- Simulated Annealing (SA) is an inherently deterministically-random process, such that making small changes in the design or the constraints can lead to wildly different solutions
- The algorithms used in nextpnr are currently pretty basic, and there is definitely room for improvement (e.g. see #27)
- There is a difference between icetime results and nextpnr because they use different timing models
Even in our internal testing, and even with 30 seeds, we've seen that higher Fmax target does not necessarily equate to higher final Fmax. This is definitely a problem, but it's unclear what the fix would be.
from nextpnr.
Actually, I've learned that there may be some issues with timing for LUT permutations. Stay tuned...
from nextpnr.
@eddiehung wanna take a look at this?
from nextpnr.
This behaviour is not surprising at all, the pseudorandom nature of SA means that small changes such as target frequency (or more directly seed) can have a significant impact on the quality of results. A scientific test would need to average 10-20 runs.
from nextpnr.
@daveshah1 yes you are correct. By running nextpnr with different seed values it does result in different fmax. I ran a few seeds:
Seed fmax
1 10.57MHz
2 11.38MHz
3 11.60MHz
4 12.56MHz
5 12.51MHz
6 11.76MHz
7 10.79MHz
8 11.61MHz
9 11.67MHz
10 11.67MHz
11 11.08MHz
12 11.48MHz
I am aware that this issue might not be possible to resolve. In that case I think there should be a mechanism to allow for a "search" run. This means running a defined amount of times using random seeds and find one with the best result. Maybe this could even be parallelized to allow for faster search? Of course I can just use a shell or python script to build such a thing but if this is an issue that people will run into on a regular basis it might be more practical to be provided through the command line parameters of nextpnr.
@eddiehung thank you for looking into this. Let me know if you want me to test something or need additional data.
from nextpnr.
Yes, such a feature would be good for internal testing as well as a good for end-users. The embarrassingly-parallel way would be to launch nextpnr as different processes or forking, but I wonder how much data/code can be shared with a multithreaded approach, and whether it would be worth taking this approach...!
Regarding the randomness of placement seeds, this is no different from vendor tools. It's often up to the user (or to pay a cloud service) to do sweeps to find the best timing...
from nextpnr.
Related Issues (20)
- Cut a release with Gowin Himbaechel uarch HOT 3
- getting stuck at unpacking tools-oss-cad-suite-windows_amd64-0.0.8.tar.gz ,and uptime is too abnormal HOT 2
- Installation on Ubuntu 22.04 HOT 4
- Make fail HOT 3
- undefined symbol: _ZNK5boost10filesystem4path7stem_v3Ev HOT 3
- Add NetBSD support HOT 2
- nextpnr-ecp5 build failed during chipdb generation HOT 9
- On iCE40, use SB_IO PIN_TYPE to avoid unnecessary placement constraint on buffers HOT 4
- Symbol not found: __ZNK5boost10filesystem4path7stem_v3Ev HOT 5
- DSP Primitives not working on GOWIN or Himbaechel HOT 13
- Histogram should probably show slack 0 to improve clarity
- I can't find the arch file chipdb-5k.bin, where is it ? HOT 2
- Routing fails on Crosslink Nexus: "Failed to route arc 0.0 of net 'clk'" HOT 4
- ecp5: trouble using IO_TYPE=LVDS HOT 8
- Does anyone know how to get this working in Void Linux? HOT 2
- Himbaechel Example fail
- Matching Bel type shows as not matching HOT 2
- Problem with ALU54D, "Unable to find legal placement" HOT 5
- PIN "U3" unavailabel in ECP5's CABGA381 package HOT 1
- Could not use nextpnr-gowin with --family GW2A-18C HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextpnr.