YosysHQ / nextpnr

nextpnr portable FPGA place and route tool
ISC License
1.28k stars 242 forks source link

Segfault/exception on combinatorial looping design #1194

Closed tommythorn closed 1 year ago

tommythorn commented 1 year ago

The design below crashed both my old, self-built, nextpnr-ecp5 and the current version from https://yowasp.org/ (I apologize for my contorted attempt at forcing yosys to keep my ring oscillator -- improvements welcome).

I've attached the relevant files:

module top(input clk_25mhz,
           input [6:0] btn,
           output reg [7:0] led,
           output wifi_gpio0);

   // Tie GPIO0, keep ULX3S board from rebooting                                                                                                               
   assign wifi_gpio0    = 1;

   parameter      W = 3; // Must be odd > 2                                                                                                                    
   reg [W-1:0] lfsr = 1;
   always @(posedge btn[6])
     if (btn[5] != btn[4])
       lfsr <= 0;
     else
       lfsr <= {lfsr[W-2:0],lfsr[W-1]^lfsr[W-2]};

   wire [999:0] q;
   genvar      i;
   for (i = 0; i < W; i = i + 1)
     assign q[i] = q[(i + 1) % W] ^ lfsr[i];

   always @(posedge q[0]) led[0] <= !led[0];
   always @(posedge clk_25mhz) led[1] <= btn[1];
endmodule

files.zip

tommythorn commented 1 year ago

(Ah, I spot a typo; it should have been q[i] = !q[(i + 1) % W] ^ lfsr[i]; but that doesn't change the fact that it shouldn't crash)

tommythorn commented 1 year ago

Ha, it seems it's the wire [999:0] q; that is the issue.

rowanG077 commented 1 year ago

I cannot duplicate this crash on current nextpnr master branch state.

Thinking it may be a hidden issue which WASM triggers I ran PnR of this design under valgrind. Except for some python interpreter invalid memory accesses it comes back clean. This might be an issue with the WASM version itself.

tommythorn commented 1 year ago

Sorry, it took me a good while to sort out how to build nextpnr-ecp5, again.

Indeed, it doesn't crash with a native build. Note, I was using a different test case that also crashed yowasp-nextpnr_ecp5:

module top(input [6:0] btn,
           output wire [7:0] led);

   wire   ro1;
   wire   ro2;
   wire   ro3;

   (* keep *) LUT4 #(.INIT(16'd1)) i_inv1 (.Z(ro2), .A(ro1), .B(1'b0), .C(1'b0), .D(1'b0));
   (* keep *) LUT4 #(.INIT(16'd1)) i_inv2 (.Z(ro3), .A(ro2), .B(1'b0), .C(1'b0), .D(1'b0));
   (* keep *) LUT4 #(.INIT(16'd1)) i_inv3 (.Z(ro1), .A(ro3), .B(1'b0), .C(1'b0), .D(1'b0));

   reg    flop;

   wire dclk_o = flop;

   always @(posedge ro3) begin
      flop <= ~flop;
   end

   reg [26:0] cntr = 0;
   always @(posedge flop) cntr <= cntr + 1;
   assign led = btn[0] ? cntr[26:26-7] : cntr[26-8:26-7-8];
endmodule
rowanG077 commented 1 year ago

The wasm version is not maintained here. I guess you'd best ask the maintainers of that version. I'm not convinced this is an actual nextpnr issue.

whitequark commented 1 year ago

@rowanG077 I am the maintainer of the Wasm version and I am also a YosysHQ member, so it is effectively maintained here.

The only way to crash the Wasm runtime, besides an explicit abort, is a write to unallocated memory. If this is not an abort then this is a bug in nextpnr.

@tommythorn Please attach a script that reproduces this issue, or at least a nextpnr command line.

whitequark commented 1 year ago

@tommythorn Nevermind, I reproduced this. The backtrace is:

wasmtime._trap.Trap: error while executing at wasm backtrace:
    0: 0x97cd3 - <unknown>!<wasm function 2312>
    1: 0x8f09a - <unknown>!<wasm function 2187>
    2: 0x8f0c7 - <unknown>!<wasm function 2188>
    3: 0xa4713 - <unknown>!<wasm function 2495>
    4: 0xed1a0 - <unknown>!<wasm function 2811>
    5: 0xa621a - <unknown>!<wasm function 2508>
    6: 0xb5c55 - <unknown>!<wasm function 2609>
    7: 0xb09cc - <unknown>!<wasm function 2590>
    8: 0x327fb5 - <unknown>!<wasm function 3959>
    9: 0x97ad5 - <unknown>!<wasm function 2291>
   10: 0x2024 - <unknown>!<wasm function 23>

Caused by:
    wasm trap: wasm `unreachable` instruction executed

This is an explicit abort I've referred to earlier, which can have many different causes. I'll take a look.

tommythorn commented 1 year ago

the attached zip has a Makefile, isn’t that sufficient?TommyOn Aug 18, 2023, at 20:55, Catherine @.***> wrote: @rowanG077 I am the maintainer of the Wasm version and I am also a YosysHQ member, so it is effectively maintained here. The only way to crash the Wasm runtime, besides an explicit abort, is a write to an unallocated memory. If this is not an abort then this is a bug in nextpnr. @tommythorn Please attach a script that reproduces this issue, or at least a nextpnr command line.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rowanG077 commented 1 year ago

@whitequark I see. I thought the WASM was an unofficial/unaffiliated project I guess I was wrong. Of course if nextpnr itself is really the issue it will be fixed here.

tommythorn commented 1 year ago

The YOWASP binaries are actually pretty awesome for me as I frequently switch between many hosts and platforms (I would love it if they supported the Artix/Kintex 7 work too).

whitequark commented 1 year ago

I see. I thought the WASM was an unofficial/unaffiliated project I guess I was wrong. Of course if nextpnr itself is really the issue it will be fixed here.

It is unofficial in the sense that it is not released by the YosysHQ organization. However it is maintained by someone who is a part of the Yosys project, so it is maintained here even if it is unofficial. Which is a little confusing, but such is life!

whitequark commented 1 year ago

I would love it if they supported the Artix/Kintex 7 work too

I am only building upstream nextpnr so as soon as that ends up in upstream nextpnr I am happy to build it.

whitequark commented 1 year ago

@tommythorn Okay, I've triaged this. yowasp-nextpnr-ecp5 version 0.6 crashes with a stack overflow:

``` $ yowasp-nextpnr-ecp5 --ignore-loops --json ~/x/x.json --package CABGA381 --speed 6 --85k --lpf ulx3s_v20.lpf Warning: net 'clk_25mhz' does not exist in design, ignoring clock constraint Info: Logic utilisation before packing: Info: Total LUT4s: 40/83640 0% Info: logic LUTs: 12/83640 0% Info: carry LUTs: 28/83640 0% Info: RAM LUTs: 0/10455 0% Info: RAMW LUTs: 0/20910 0% Info: Total DFFs: 28/83640 0% Info: Packing IOs.. Info: pin 'led[7]$tr_io' constrained to Bel 'X0/Y41/PIOD'. Info: pin 'led[6]$tr_io' constrained to Bel 'X0/Y38/PIOD'. Info: pin 'led[5]$tr_io' constrained to Bel 'X0/Y44/PIOD'. Info: pin 'led[4]$tr_io' constrained to Bel 'X0/Y38/PIOB'. Info: pin 'led[3]$tr_io' constrained to Bel 'X0/Y38/PIOC'. Info: pin 'led[2]$tr_io' constrained to Bel 'X0/Y38/PIOA'. Info: pin 'led[1]$tr_io' constrained to Bel 'X0/Y35/PIOD'. Info: pin 'led[0]$tr_io' constrained to Bel 'X0/Y35/PIOC'. Info: pin 'btn[6]$tr_io' constrained to Bel 'X126/Y17/PIOD'. Info: pin 'btn[5]$tr_io' constrained to Bel 'X6/Y95/PIOA'. Info: pin 'btn[4]$tr_io' constrained to Bel 'X6/Y95/PIOB'. Info: pin 'btn[3]$tr_io' constrained to Bel 'X126/Y89/PIOB'. Info: pin 'btn[2]$tr_io' constrained to Bel 'X4/Y95/PIOB'. Info: pin 'btn[1]$tr_io' constrained to Bel 'X4/Y95/PIOA'. Info: pin 'btn[0]$tr_io' constrained to Bel 'X6/Y0/PIOB'. Info: Packing constants.. Info: Packing carries... Info: Packing LUTs... Info: Packing LUT5-7s... Info: Packing FFs... Info: 28 FFs paired with LUTs. Info: Generating derived timing constraints... Info: Promoting globals... Info: promoting clock net dclk_o to global network Info: Checksum: 0x3bf1a9b7 Info: Annotating ports with timing budgets for target frequency 12.00 MHz Info: Checksum: 0x5ff7ccf1 Info: Device utilisation: Info: TRELLIS_IO: 15/ 365 4% Info: DCCA: 1/ 56 1% Info: DP16KD: 0/ 208 0% Info: MULT18X18D: 0/ 156 0% Info: ALU54B: 0/ 78 0% Info: EHXPLLL: 0/ 4 0% Info: EXTREFB: 0/ 2 0% Info: DCUA: 0/ 2 0% Info: PCSCLKDIV: 0/ 2 0% Info: IOLOGIC: 0/ 224 0% Info: SIOLOGIC: 0/ 141 0% Info: GSR: 0/ 1 0% Info: JTAGG: 0/ 1 0% Info: OSCG: 0/ 1 0% Info: SEDGA: 0/ 1 0% Info: DTR: 0/ 1 0% Info: USRMCLK: 0/ 1 0% Info: CLKDIVF: 0/ 4 0% Info: ECLKSYNCB: 0/ 10 0% Info: DLLDELD: 0/ 8 0% Info: DDRDLL: 0/ 4 0% Info: DQSBUFM: 0/ 14 0% Info: TRELLIS_ECLKBUF: 0/ 8 0% Info: ECLKBRIDGECS: 0/ 2 0% Info: DCSC: 0/ 2 0% Info: TRELLIS_FF: 28/83640 0% Info: TRELLIS_COMB: 46/83640 0% Info: TRELLIS_RAMW: 0/10455 0% Traceback (most recent call last): File "/home/whitequark/.local/bin/yowasp-nextpnr-ecp5", line 8, in sys.exit(_run_nextpnr_ecp5_argv()) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/whitequark/.local/pipx/venvs/yowasp-nextpnr-ecp5/lib/python3.11/site-packages/yowasp_nextpnr_ecp5/__init__.py", line 56, in _run_nextpnr_ecp5_argv sys.exit(run_nextpnr_ecp5(sys.argv[1:])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/whitequark/.local/pipx/venvs/yowasp-nextpnr-ecp5/lib/python3.11/site-packages/yowasp_nextpnr_ecp5/__init__.py", line 51, in run_nextpnr_ecp5 return yowasp_runtime.run_wasm(__package__, "nextpnr-ecp5.wasm", resources=["share"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/whitequark/.local/pipx/venvs/yowasp-nextpnr-ecp5/lib/python3.11/site-packages/yowasp_runtime/__init__.py", line 113, in run_wasm app.exports(store)["_start"](store) File "/home/whitequark/.local/pipx/venvs/yowasp-nextpnr-ecp5/lib/python3.11/site-packages/wasmtime/_func.py", line 91, in __call__ with enter_wasm(store) as trap: File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__ next(self.gen) File "/home/whitequark/.local/pipx/venvs/yowasp-nextpnr-ecp5/lib/python3.11/site-packages/wasmtime/_func.py", line 264, in enter_wasm raise trap_obj wasmtime._trap.Trap: error while executing at wasm backtrace: 0: 0xfd797 - ! 1: 0xfd872 - ! 2: 0xfd872 - ! (several thousand frames elided) 2376: 0xfd872 - ! 2377: 0xf6f10 - ! 2378: 0x19bfa7 - ! 2379: 0xc7f3f - ! 2380: 0x328b5f - ! 2381: 0x97ad5 - ! 2382: 0x2024 - ! Caused by: wasm trap: indirect call type mismatch ```

(Wasm does not provide stack overflow protection.) I would consider this a nextpnr bug.

However, commit 053dfc98 that I built with more debug information locally does not:

``` $ wasmtime nextpnr-build/nextpnr-ecp5.wasm --mapdir /share::pypi-ecp5/yowasp_nextpnr_ecp5/share --dir . -- --ignore-loops --json loop.json --package CABGA381 --speed 6 --85k --lpf ulx3s_v20.lpf Warning: net 'clk_25mhz' does not exist in design, ignoring clock constraint Info: Logic utilisation before packing: Info: Total LUT4s: 40/83640 0% Info: logic LUTs: 12/83640 0% Info: carry LUTs: 28/83640 0% Info: RAM LUTs: 0/10455 0% Info: RAMW LUTs: 0/20910 0% Info: Total DFFs: 28/83640 0% Info: Packing IOs.. Info: pin 'led[7]$tr_io' constrained to Bel 'X0/Y41/PIOD'. Info: pin 'led[6]$tr_io' constrained to Bel 'X0/Y38/PIOD'. Info: pin 'led[5]$tr_io' constrained to Bel 'X0/Y44/PIOD'. Info: pin 'led[4]$tr_io' constrained to Bel 'X0/Y38/PIOB'. Info: pin 'led[3]$tr_io' constrained to Bel 'X0/Y38/PIOC'. Info: pin 'led[2]$tr_io' constrained to Bel 'X0/Y38/PIOA'. Info: pin 'led[1]$tr_io' constrained to Bel 'X0/Y35/PIOD'. Info: pin 'led[0]$tr_io' constrained to Bel 'X0/Y35/PIOC'. Info: pin 'btn[6]$tr_io' constrained to Bel 'X126/Y17/PIOD'. Info: pin 'btn[5]$tr_io' constrained to Bel 'X6/Y95/PIOA'. Info: pin 'btn[4]$tr_io' constrained to Bel 'X6/Y95/PIOB'. Info: pin 'btn[3]$tr_io' constrained to Bel 'X126/Y89/PIOB'. Info: pin 'btn[2]$tr_io' constrained to Bel 'X4/Y95/PIOB'. Info: pin 'btn[1]$tr_io' constrained to Bel 'X4/Y95/PIOA'. Info: pin 'btn[0]$tr_io' constrained to Bel 'X6/Y0/PIOB'. Info: Packing constants.. Info: Packing carries... Info: Packing LUTs... Info: Packing LUT5-7s... Info: Packing FFs... Info: 28 FFs paired with LUTs. Info: Generating derived timing constraints... Info: Promoting globals... Info: promoting clock net dclk_o to global network Info: Checksum: 0xb413369e Info: Device utilisation: Info: TRELLIS_IO: 15/ 365 4% Info: DCCA: 1/ 56 1% Info: DP16KD: 0/ 208 0% Info: MULT18X18D: 0/ 156 0% Info: ALU54B: 0/ 78 0% Info: EHXPLLL: 0/ 4 0% Info: EXTREFB: 0/ 2 0% Info: DCUA: 0/ 2 0% Info: PCSCLKDIV: 0/ 2 0% Info: IOLOGIC: 0/ 224 0% Info: SIOLOGIC: 0/ 141 0% Info: GSR: 0/ 1 0% Info: JTAGG: 0/ 1 0% Info: OSCG: 0/ 1 0% Info: SEDGA: 0/ 1 0% Info: DTR: 0/ 1 0% Info: USRMCLK: 0/ 1 0% Info: CLKDIVF: 0/ 4 0% Info: ECLKSYNCB: 0/ 10 0% Info: DLLDELD: 0/ 8 0% Info: DDRDLL: 0/ 4 0% Info: DQSBUFM: 0/ 14 0% Info: TRELLIS_ECLKBUF: 0/ 8 0% Info: ECLKBRIDGECS: 0/ 2 0% Info: DCSC: 0/ 2 0% Info: TRELLIS_FF: 28/83640 0% Info: TRELLIS_COMB: 46/83640 0% Info: TRELLIS_RAMW: 0/10455 0% Info: Placed 15 cells based on constraints. Info: Creating initial analytic placement for 14 cells, random placement wirelen = 2531. Info: at initial placer iter 0, wirelen = 114 Info: at initial placer iter 1, wirelen = 101 Info: at initial placer iter 2, wirelen = 101 Info: at initial placer iter 3, wirelen = 101 Info: Running main analytical placer, max placement attempts per cell = 10000. Info: at iteration #1, type TRELLIS_COMB: wirelen solved = 101, spread = 122, legal = 144; time = 0.07s Info: at iteration #2, type TRELLIS_COMB: wirelen solved = 102, spread = 116, legal = 135; time = 0.00s Info: at iteration #3, type TRELLIS_COMB: wirelen solved = 103, spread = 116, legal = 178; time = 0.00s Info: at iteration #4, type TRELLIS_COMB: wirelen solved = 112, spread = 117, legal = 137; time = 0.00s Info: HeAP Placer Time: 0.33s Info: of which solving equations: 0.01s Info: of which spreading cells: 0.01s Info: of which strict legalisation: 0.00s Info: Running simulated annealing placer for refinement. Info: at iteration #1: temp = 0.000000, timing cost = 0, wirelen = 135 Info: at iteration #5: temp = 0.000000, timing cost = 0, wirelen = 118 Info: at iteration #7: temp = 0.000000, timing cost = 0, wirelen = 117 Info: SA placement time 0.02s Info: Max frequency for clock '$glbnet$dclk_o': 441.11 MHz (PASS at 12.00 MHz) Info: Max frequency for clock 'ro3': 1314.06 MHz (PASS at 12.00 MHz) Info: Max delay -> : 8.88 ns Info: Max delay posedge $glbnet$dclk_o -> : 4.36 ns Info: Checksum: 0xc253bf36 Info: Routing globals... Info: routing clock net $glbnet$dclk_o using global 0 Info: Routing.. Info: Setting up routing queue. Info: Routing 125 arcs. Info: | (re-)routed arcs | delta | remaining| time spent | Info: IterCnt | w/ripup wo/ripup | w/r wo/r | arcs| batch(sec) total(sec)| Info: 129 | 4 109 | 4 109 | 0| 0.08 0.08| Info: Routing complete. Info: Router1 time 0.08s Info: Checksum: 0xeea3188e Info: Critical path report for clock '$glbnet$dclk_o' (posedge -> posedge): Info: curr total Info: 0.5 0.5 Source cntr_TRELLIS_FF_Q_26.Q Info: 0.8 1.4 Net cntr[0] (2,36) -> (2,36) Info: Sink cntr_CCU2C_B0_13$CCU2_COMB0.B Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.4 1.8 Source cntr_CCU2C_B0_13$CCU2_COMB0.FCO Info: 0.0 1.8 Net cntr_CCU2C_B0_13$CCU2_FCI_INT (2,36) -> (2,36) Info: Sink cntr_CCU2C_B0_13$CCU2_COMB1.FCI Info: 0.0 1.8 Source cntr_CCU2C_B0_13$CCU2_COMB1.FCO Info: 0.0 1.8 Net cntr_CCU2C_B0_4_COUT[0] (2,36) -> (2,36) Info: Sink cntr_CCU2C_B0_3$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 1.9 Source cntr_CCU2C_B0_3$CCU2_COMB0.FCO Info: 0.0 1.9 Net cntr_CCU2C_B0_3$CCU2_FCI_INT (2,36) -> (2,36) Info: Sink cntr_CCU2C_B0_3$CCU2_COMB1.FCI Info: 0.0 1.9 Source cntr_CCU2C_B0_3$CCU2_COMB1.FCO Info: 0.0 1.9 Net cntr_CCU2C_B0_4_COUT[2] (2,36) -> (2,36) Info: Sink cntr_CCU2C_B0_2$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 1.9 Source cntr_CCU2C_B0_2$CCU2_COMB0.FCO Info: 0.0 1.9 Net cntr_CCU2C_B0_2$CCU2_FCI_INT (2,36) -> (2,36) Info: Sink cntr_CCU2C_B0_2$CCU2_COMB1.FCI Info: 0.0 1.9 Source cntr_CCU2C_B0_2$CCU2_COMB1.FCO Info: 0.0 1.9 Net cntr_CCU2C_B0_4_COUT[4] (2,36) -> (3,36) Info: Sink cntr_CCU2C_B0_1$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.0 Source cntr_CCU2C_B0_1$CCU2_COMB0.FCO Info: 0.0 2.0 Net cntr_CCU2C_B0_1$CCU2_FCI_INT (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0_1$CCU2_COMB1.FCI Info: 0.0 2.0 Source cntr_CCU2C_B0_1$CCU2_COMB1.FCO Info: 0.0 2.0 Net cntr_CCU2C_B0_4_COUT[6] (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.1 Source cntr_CCU2C_B0$CCU2_COMB0.FCO Info: 0.0 2.1 Net cntr_CCU2C_B0$CCU2_FCI_INT (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0$CCU2_COMB1.FCI Info: 0.0 2.1 Source cntr_CCU2C_B0$CCU2_COMB1.FCO Info: 0.0 2.1 Net cntr_CCU2C_B0_4_COUT[8] (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0_12$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.2 Source cntr_CCU2C_B0_12$CCU2_COMB0.FCO Info: 0.0 2.2 Net cntr_CCU2C_B0_12$CCU2_FCI_INT (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0_12$CCU2_COMB1.FCI Info: 0.0 2.2 Source cntr_CCU2C_B0_12$CCU2_COMB1.FCO Info: 0.0 2.2 Net cntr_CCU2C_B0_4_COUT[10] (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0_11$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.2 Source cntr_CCU2C_B0_11$CCU2_COMB0.FCO Info: 0.0 2.2 Net cntr_CCU2C_B0_11$CCU2_FCI_INT (3,36) -> (3,36) Info: Sink cntr_CCU2C_B0_11$CCU2_COMB1.FCI Info: 0.0 2.2 Source cntr_CCU2C_B0_11$CCU2_COMB1.FCO Info: 0.0 2.2 Net cntr_CCU2C_B0_4_COUT[12] (3,36) -> (4,36) Info: Sink cntr_CCU2C_B0_10$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.3 Source cntr_CCU2C_B0_10$CCU2_COMB0.FCO Info: 0.0 2.3 Net cntr_CCU2C_B0_10$CCU2_FCI_INT (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_10$CCU2_COMB1.FCI Info: 0.0 2.3 Source cntr_CCU2C_B0_10$CCU2_COMB1.FCO Info: 0.0 2.3 Net cntr_CCU2C_B0_4_COUT[14] (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_9$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.4 Source cntr_CCU2C_B0_9$CCU2_COMB0.FCO Info: 0.0 2.4 Net cntr_CCU2C_B0_9$CCU2_FCI_INT (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_9$CCU2_COMB1.FCI Info: 0.0 2.4 Source cntr_CCU2C_B0_9$CCU2_COMB1.FCO Info: 0.0 2.4 Net cntr_CCU2C_B0_4_COUT[16] (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_8$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.4 Source cntr_CCU2C_B0_8$CCU2_COMB0.FCO Info: 0.0 2.4 Net cntr_CCU2C_B0_8$CCU2_FCI_INT (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_8$CCU2_COMB1.FCI Info: 0.0 2.4 Source cntr_CCU2C_B0_8$CCU2_COMB1.FCO Info: 0.0 2.4 Net cntr_CCU2C_B0_4_COUT[18] (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_7$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.5 Source cntr_CCU2C_B0_7$CCU2_COMB0.FCO Info: 0.0 2.5 Net cntr_CCU2C_B0_7$CCU2_FCI_INT (4,36) -> (4,36) Info: Sink cntr_CCU2C_B0_7$CCU2_COMB1.FCI Info: 0.0 2.5 Source cntr_CCU2C_B0_7$CCU2_COMB1.FCO Info: 0.0 2.5 Net cntr_CCU2C_B0_4_COUT[20] (4,36) -> (5,36) Info: Sink cntr_CCU2C_B0_6$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.6 Source cntr_CCU2C_B0_6$CCU2_COMB0.FCO Info: 0.0 2.6 Net cntr_CCU2C_B0_6$CCU2_FCI_INT (5,36) -> (5,36) Info: Sink cntr_CCU2C_B0_6$CCU2_COMB1.FCI Info: 0.0 2.6 Source cntr_CCU2C_B0_6$CCU2_COMB1.FCO Info: 0.0 2.6 Net cntr_CCU2C_B0_4_COUT[22] (5,36) -> (5,36) Info: Sink cntr_CCU2C_B0_5$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.1 2.7 Source cntr_CCU2C_B0_5$CCU2_COMB0.FCO Info: 0.0 2.7 Net cntr_CCU2C_B0_5$CCU2_FCI_INT (5,36) -> (5,36) Info: Sink cntr_CCU2C_B0_5$CCU2_COMB1.FCI Info: 0.0 2.7 Source cntr_CCU2C_B0_5$CCU2_COMB1.FCO Info: 0.0 2.7 Net cntr_CCU2C_B0_4_COUT[24] (5,36) -> (5,36) Info: Sink cntr_CCU2C_B0_4$CCU2_COMB0.FCI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:63.22-63.23 Info: 0.4 3.1 Source cntr_CCU2C_B0_4$CCU2_COMB0.F Info: 0.1 3.2 Net cntr_TRELLIS_FF_Q_DI[26] (5,36) -> (5,36) Info: Sink cntr_TRELLIS_FF_Q.DI Info: Defined in: Info: x.v:21.35-21.43 Info: /share/ecp5/arith_map.v:34.26-34.27 Info: 0.0 3.2 Setup cntr_TRELLIS_FF_Q.DI Info: 2.3 ns logic, 1.0 ns routing Info: Critical path report for clock 'ro3' (posedge -> posedge): Info: curr total Info: 0.5 0.5 Source flop_TRELLIS_FF_Q.Q Info: 0.2 0.8 Net dclk_o (65,2) -> (65,2) Info: Sink flop_TRELLIS_FF_Q_DI_LUT4_Z.D Info: Defined in: Info: x.v:12.11-12.15 Info: 0.2 1.0 Source flop_TRELLIS_FF_Q_DI_LUT4_Z.F Info: 0.1 1.1 Net flop_TRELLIS_FF_Q_DI (65,2) -> (65,2) Info: Sink flop_TRELLIS_FF_Q.DI Info: Defined in: Info: x.v:16.4-18.7 Info: 0.0 1.1 Setup flop_TRELLIS_FF_Q.DI Info: 0.8 ns logic, 0.4 ns routing Info: Critical path report for cross-domain path '' -> '': Info: curr total Info: 0.0 0.0 Source btn[0]$tr_io.O Info: 3.5 3.5 Net btn[0]$TRELLIS_IO_IN (6,0) -> (4,37) Info: Sink led_LUT4_Z_2.D Info: Defined in: Info: x.v:1.24-1.27 Info: 0.2 3.7 Source led_LUT4_Z_2.F Info: 1.8 5.5 Net led[5]$TRELLIS_IO_OUT (4,37) -> (0,44) Info: Sink led[5]$tr_io.I Info: Defined in: Info: x.v:2.30-2.33 Info: 0.2 ns logic, 5.3 ns routing Info: Critical path report for cross-domain path 'posedge $glbnet$dclk_o' -> '': Info: curr total Info: 0.5 0.5 Source cntr_TRELLIS_FF_Q_2.Q Info: 0.9 1.5 Net cntr[24] (5,36) -> (4,37) Info: Sink led_LUT4_Z_2.B Info: Defined in: Info: x.v:20.15-20.19 Info: 0.2 1.7 Source led_LUT4_Z_2.F Info: 1.8 3.5 Net led[5]$TRELLIS_IO_OUT (4,37) -> (0,44) Info: Sink led[5]$tr_io.I Info: Defined in: Info: x.v:2.30-2.33 Info: 0.8 ns logic, 2.7 ns routing Info: Max frequency for clock '$glbnet$dclk_o': 309.50 MHz (PASS at 12.00 MHz) Info: Max frequency for clock 'ro3': 894.45 MHz (PASS at 12.00 MHz) Info: Max delay -> : 5.52 ns Info: Max delay posedge $glbnet$dclk_o -> : 3.51 ns 1 warning, 0 errors Info: Program finished normally. ```

So this can probably be closed.

gatecat commented 1 year ago

Thinking about it it was probably fixed in https://github.com/YosysHQ/nextpnr/pull/1160.

whitequark commented 1 year ago

@tommythorn You can install nightly builds of YoWASP tools from Test PyPI:

pip install --pre -i https://test.pypi.org/simple/ yowasp-nextpnr-ecp5
tommythorn commented 1 year ago

Sorry to keep going @whitequark -- let me know where to direct these details.

~On my MacBook Pro I got~ Fixed by installing the official yowasp-yosys first.

(pip install doesn't work directly on Ubuntu; something about externally managed environments and virtual environments -- Python is a massive headache)