File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ import (
2424type CompileRequest struct {
2525 Sources map [string ]string `json:"sources"`
2626 TopModule string `json:"topModule"`
27+ Freq * int `json:"freq,omitempty"`
28+ Seed * int `json:"seed,omitempty"`
2729}
2830
2931type StreamMessage struct {
@@ -246,10 +248,19 @@ func handleCompile(w http.ResponseWriter, r *http.Request) {
246248 }
247249
248250 // Run nextpnr-ice40
251+ freq := 12
252+ if req .Freq != nil {
253+ freq = * req .Freq
254+ }
255+ seed := 42
256+ if req .Seed != nil {
257+ seed = * req .Seed
258+ }
259+
249260 nextpnrArgs := []string {
250261 "--pcf-allow-unconstrained" ,
251- "--seed" , "10" ,
252- "--freq" , "48" ,
262+ "--seed" , fmt . Sprintf ( "%d" , seed ) ,
263+ "--freq" , fmt . Sprintf ( "%d" , freq ) ,
253264 "--package" , "sg48" ,
254265 "--up5k" ,
255266 "--asc" , "output.asc" ,
You can’t perform that action at this time.
0 commit comments