YosysHQ / nextpnr

nextpnr portable FPGA place and route tool
ISC License
1.32k stars 244 forks source link

terminate called after throwing an instance of 'std::out_of_range' during nextpnr_ice40::log_crit_paths #1379

Closed Barabas5532 closed 1 month ago

Barabas5532 commented 1 month ago

nextpnr crashes with the following message:

<previous output removed>
Info: Critical path report for cross-domain path 'posedge CLK$SB_IO_IN' -> 'posedge CLK$SB_IO_IN_$glb_clk':
Info:       type curr  total name
Info: clk-to-clk  1.59  1.59 Net  (25,0) -> (21,9)
Info:                          Sink dut.read_data_SB_DFFE_Q_8_DFFLC.CLK
terminate called after throwing an instance of 'std::out_of_range'
  what():  dict::at()

To reproduce, check out my repo and run command.sh: https://github.com/Barabas5532/crush/commit/59d3a06fb4c04f1fbbbd76f77e432f0439987abc

I can also explain how to generate the JSON file from the verilog source if required. This command uses a pre-generated JSON file.

The JSON file was produced by yosys version:

Yosys 0.43 (git sha1 ead4718e5, g++ 14.2.1 -march=x86-64 -mtune=generic -O2 -fno-plt -fexceptions -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/yosys/src=/usr/src/debug/yosys -fPIC -Os)

My nextpnr version:

"nextpnr-ice40" -- Next Generation Place and Route (Version nextpnr-0.7-123-g75d2ce6a)
Backtrace ``` usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:81 #1 0x0000555555653ad2 in nextpnr_ice40::dict >, nextpnr_ice40::hash_ops >::at ( this=0x555563677400, key=...) at /usr/src/debug/nextpnr-git/nextpnr/common/kernel/hashlib.h:607 #2 operator() (__closure=__closure@entry=0x7fffffffc3d0, path=...) at /usr/src/debug/nextpnr-git/nextpnr/common/kernel/timing_log.cc:109 #3 0x00005555557500f6 in nextpnr_ice40::log_crit_paths (ctx=0x5555636766d0, result=...) at /usr/src/debug/nextpnr-git/nextpnr/common/kernel/timing_log.cc:166 #4 0x0000555555751265 in nextpnr_ice40::Context::log_timing_results (this=this@entry=0x5555636766d0, result=..., print_histogram=print_histogram@entry=true, print_fmax=print_fmax@entry=true, print_path=print_path@entry=true, warn_on_failure=warn_on_failure@entry=true) at /usr/src/debug/nextpnr-git/nextpnr/common/kernel/timing_log.cc:407 #5 0x0000555555743533 in nextpnr_ice40::timing_analysis (ctx=ctx@entry=0x5555636766d0, print_slack_histogram=print_slack_histogram@entry=true, print_fmax=print_fmax@entry=true, print_path=print_path@entry=true, warn_on_failure=warn_on_failure@entry=true, update_results=update_results@entry=true) at /usr/src/debug/nextpnr-git/nextpnr/common/kernel/timing.cc:1338 #6 0x00005555557d2da7 in nextpnr_ice40::router1 (ctx=0x5555636766d0, cfg=...) at /usr/src/debug/nextpnr-git/nextpnr/common/route/router1.cc:1291 #7 0x000055555581f3ad in nextpnr_ice40::Arch::route (this=0x5555636766d0) at /usr/src/debug/nextpnr-git/nextpnr/common/kernel/basectx.h:167 #8 0x00005555556a13ca in nextpnr_ice40::CommandHandler::executeMain (this=this@entry=0x7fffffffd7a0, ctx=std::unique_ptr = {...}) at /usr/include/c++/14.2.1/bits/unique_ptr.h:193 #9 0x00005555556a19c7 in nextpnr_ice40::CommandHandler::exec (this=this@entry=0x7fffffffd7a0) at /usr/include/c++/14.2.1/bits/unique_ptr.h:191 #10 0x0000555555680644 in main (argc=, argv=) at /usr/src/debug/nextpnr-git/nextpnr/ice40/main.cc:281 ```
rowanG077 commented 1 month ago

Will take a look at this tommorow morning since it's late here. It might be worth a try to try current master.

gatecat commented 1 month ago

FYI https://github.com/YosysHQ/nextpnr/pull/1380