YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.49k stars 890 forks source link

ABC9 performs worse than ABC for iCE40 #1792

Open Ravenslofty opened 4 years ago

Ravenslofty commented 4 years ago

This has been an issue I've discussed with @eddiehung for a while, but I want to file it publicly so people can submit testcases for us to work through.

Essentially, the problem is that ABC9 - which does perform much better for ECP5 - performs notably worse for iCE40, producing larger solutions with lower maximum frequency.

What would be nice would be if people could submit testbenches, along with the Yosys version they used for comparison, stat output and if willing, put the results of 50 nextpnr-ice40 --randomize-seed runs.

daveshah1 commented 4 years ago

From previous experience, performance on iCE40 was somewhat sensitive to "wire delay". It is quite possible that this could be fuzzed to find a value that improves QoR.

eddiehung commented 4 years ago

Thanks for keeping at this @ZirconiumX. Can we post the testcase we were investigating together? I have some commentary I'd like to share about that particular case.

Ravenslofty commented 4 years ago

Sure, it's only picorv32_large.v. Nothing secret about it.

On Fri, 20 Mar 2020, 22:35 Eddie Hung, notifications@github.com wrote:

Thanks for keeping at this @ZirconiumX https://github.com/ZirconiumX. Can we post the testcase we were investigating together? I have some commentary I'd like to share about that particular case.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/YosysHQ/yosys/issues/1792#issuecomment-601939143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPDWYKJBFJAYDIJPAGMT3RIPVTDANCNFSM4LQTUQLA .

Ravenslofty commented 4 years ago

For the record I should mention that I have a statistical comparison tester for this, but I feel it needs a bunch of improvement...

eddiehung commented 4 years ago

@ZirconiumX and I looked at this a while back. What I found was that from Yosys' (and ABC9's) point of view, the critical-path delay (logic only, assuming net delays are zero) of the circuit (as computed by #1732) were the same:

Done with 3e46faa58:

synth_ice40 -top top_large on picorv32's synth_area_top.v; critical-path delay 8794 ps ``` Latest arrival time in 'top_large' is 8794: 8794 picorv32.count_instr_SB_DFFESR_Q (SB_DFFESR.D) \picorv32.count_instr_SB_DFFESR_Q_D [63] 8773 picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_4 (SB_LUT4.I3->O) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [63] 8457 picorv32.count_instr_SB_CARRY_I1_4 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [62] 8331 picorv32.count_instr_SB_CARRY_I1_5 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [61] 8205 picorv32.count_instr_SB_CARRY_I1_6 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [60] 8079 picorv32.count_instr_SB_CARRY_I1_8 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [59] 7953 picorv32.count_instr_SB_CARRY_I1_9 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [58] 7827 picorv32.count_instr_SB_CARRY_I1_10 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [57] 7701 picorv32.count_instr_SB_CARRY_I1_11 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [56] 7575 picorv32.count_instr_SB_CARRY_I1_12 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [55] 7449 picorv32.count_instr_SB_CARRY_I1_13 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [54] 7323 picorv32.count_instr_SB_CARRY_I1_14 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [53] 7197 picorv32.count_instr_SB_CARRY_I1_15 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [52] 7071 picorv32.count_instr_SB_CARRY_I1_16 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [51] 6945 picorv32.count_instr_SB_CARRY_I1_17 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [50] 6819 picorv32.count_instr_SB_CARRY_I1_19 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [49] 6693 picorv32.count_instr_SB_CARRY_I1_20 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [48] 6567 picorv32.count_instr_SB_CARRY_I1_21 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [47] 6441 picorv32.count_instr_SB_CARRY_I1_22 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [46] 6315 picorv32.count_instr_SB_CARRY_I1_23 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [45] 6189 picorv32.count_instr_SB_CARRY_I1_24 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [44] 6063 picorv32.count_instr_SB_CARRY_I1_25 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [43] 5937 picorv32.count_instr_SB_CARRY_I1_26 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [42] 5811 picorv32.count_instr_SB_CARRY_I1_27 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [41] 5685 picorv32.count_instr_SB_CARRY_I1_28 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [40] 5559 picorv32.count_instr_SB_CARRY_I1_30 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [39] 5433 picorv32.count_instr_SB_CARRY_I1_31 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [38] 5307 picorv32.count_instr_SB_CARRY_I1_32 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [37] 5181 picorv32.count_instr_SB_CARRY_I1_33 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [36] 5055 picorv32.count_instr_SB_CARRY_I1_34 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [35] 4929 picorv32.count_instr_SB_CARRY_I1_35 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [34] 4803 picorv32.count_instr_SB_CARRY_I1_36 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [33] 4677 picorv32.count_instr_SB_CARRY_I1_37 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [32] 4551 picorv32.count_instr_SB_CARRY_I1_38 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [31] 4425 picorv32.count_instr_SB_CARRY_I1_39 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [30] 4299 picorv32.count_instr_SB_CARRY_I1_41 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [29] 4173 picorv32.count_instr_SB_CARRY_I1_42 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [28] 4047 picorv32.count_instr_SB_CARRY_I1_43 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [27] 3921 picorv32.count_instr_SB_CARRY_I1_44 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [26] 3795 picorv32.count_instr_SB_CARRY_I1_45 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [25] 3669 picorv32.count_instr_SB_CARRY_I1_46 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [24] 3543 picorv32.count_instr_SB_CARRY_I1_47 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [23] 3417 picorv32.count_instr_SB_CARRY_I1_48 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [22] 3291 picorv32.count_instr_SB_CARRY_I1_49 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [21] 3165 picorv32.count_instr_SB_CARRY_I1_50 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [20] 3039 picorv32.count_instr_SB_CARRY_I1_51 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [19] 2913 picorv32.count_instr_SB_CARRY_I1_52 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [18] 2787 picorv32.count_instr_SB_CARRY_I1_53 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [17] 2661 picorv32.count_instr_SB_CARRY_I1_54 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [16] 2535 picorv32.count_instr_SB_CARRY_I1_55 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [15] 2409 picorv32.count_instr_SB_CARRY_I1_56 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [14] 2283 picorv32.count_instr_SB_CARRY_I1_57 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [13] 2157 picorv32.count_instr_SB_CARRY_I1_58 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [12] 2031 picorv32.count_instr_SB_CARRY_I1_59 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [11] 1905 picorv32.count_instr_SB_CARRY_I1_60 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [10] 1779 picorv32.count_instr_SB_CARRY_I1 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [9] 1653 picorv32.count_instr_SB_CARRY_I1_1 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [8] 1527 picorv32.count_instr_SB_CARRY_I1_2 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [7] 1401 picorv32.count_instr_SB_CARRY_I1_3 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [6] 1275 picorv32.count_instr_SB_CARRY_I1_7 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [5] 1149 picorv32.count_instr_SB_CARRY_I1_18 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [4] 1023 picorv32.count_instr_SB_CARRY_I1_29 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [3] 897 picorv32.count_instr_SB_CARRY_I1_40 (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 [2] 771 picorv32.count_instr_SB_CARRY_CI (SB_CARRY.I1->CO) \picorv32.count_instr [1] 540 picorv32.count_instr_SB_DFFESR_Q_62 (SB_DFFESR.C->Q) 0 \clk () Arrival histogram: legend: * represents 4 endpoint(s) + represents [1,4) endpoint(s) ( 8800, 8360] |*+ ( 8360, 7920] |*+ ( 7920, 7480] |*+ ( 7480, 7040] |*+ ( 7040, 6600] |**+ ( 6600, 6160] |***+ ( 6160, 5720] |****+ ( 5720, 5280] |*******+ ( 5280, 4840] |*******************+ ( 4840, 4400] |***************+ ( 4400, 3960] |***********+ ( 3960, 3520] |***********+ ( 3520, 3080] |***********+ ( 3080, 2640] |***************+ ( 2640, 2200] |*****************+ ( 2200, 1760] |*********+ ( 1760, 1320] |**********************************************************+ ( 1320, 880] |***************************************************+ ( 880, 440] |************************************************************ ( 440, 0] |****+ ```
synth_ice40 -top top_large -abc9 on picorv32's synth_area_top.v; critical-path delay 8794 ps ``` Latest arrival time in 'top_large' is 8794: 8794 picorv32.count_instr_SB_DFFESR_Q (SB_DFFESR.D) \picorv32.count_instr_SB_DFFESR_Q_D 8773 picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O (SB_LUT4.I3->O) \picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3 8457 picorv32.count_instr_SB_DFFESR_Q_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_1_D_SB_LUT4_O_I3 8331 picorv32.count_instr_SB_DFFESR_Q_1_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_2_D_SB_LUT4_O_I3 8205 picorv32.count_instr_SB_DFFESR_Q_2_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_3_D_SB_LUT4_O_I3 8079 picorv32.count_instr_SB_DFFESR_Q_3_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_4_D_SB_LUT4_O_I3 7953 picorv32.count_instr_SB_DFFESR_Q_4_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_5_D_SB_LUT4_O_I3 7827 picorv32.count_instr_SB_DFFESR_Q_5_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_6_D_SB_LUT4_O_I3 7701 picorv32.count_instr_SB_DFFESR_Q_6_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_7_D_SB_LUT4_O_I3 7575 picorv32.count_instr_SB_DFFESR_Q_7_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_8_D_SB_LUT4_O_I3 7449 picorv32.count_instr_SB_DFFESR_Q_8_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_9_D_SB_LUT4_O_I3 7323 picorv32.count_instr_SB_DFFESR_Q_9_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_10_D_SB_LUT4_O_I3 7197 picorv32.count_instr_SB_DFFESR_Q_10_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_11_D_SB_LUT4_O_I3 7071 picorv32.count_instr_SB_DFFESR_Q_11_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_12_D_SB_LUT4_O_I3 6945 picorv32.count_instr_SB_DFFESR_Q_12_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_13_D_SB_LUT4_O_I3 6819 picorv32.count_instr_SB_DFFESR_Q_13_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_14_D_SB_LUT4_O_I3 6693 picorv32.count_instr_SB_DFFESR_Q_14_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_15_D_SB_LUT4_O_I3 6567 picorv32.count_instr_SB_DFFESR_Q_15_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_16_D_SB_LUT4_O_I3 6441 picorv32.count_instr_SB_DFFESR_Q_16_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_17_D_SB_LUT4_O_I3 6315 picorv32.count_instr_SB_DFFESR_Q_17_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_18_D_SB_LUT4_O_I3 6189 picorv32.count_instr_SB_DFFESR_Q_18_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_19_D_SB_LUT4_O_I3 6063 picorv32.count_instr_SB_DFFESR_Q_19_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_20_D_SB_LUT4_O_I3 5937 picorv32.count_instr_SB_DFFESR_Q_20_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_21_D_SB_LUT4_O_I3 5811 picorv32.count_instr_SB_DFFESR_Q_21_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_22_D_SB_LUT4_O_I3 5685 picorv32.count_instr_SB_DFFESR_Q_22_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_23_D_SB_LUT4_O_I3 5559 picorv32.count_instr_SB_DFFESR_Q_23_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_24_D_SB_LUT4_O_I3 5433 picorv32.count_instr_SB_DFFESR_Q_24_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_25_D_SB_LUT4_O_I3 5307 picorv32.count_instr_SB_DFFESR_Q_25_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_26_D_SB_LUT4_O_I3 5181 picorv32.count_instr_SB_DFFESR_Q_26_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_27_D_SB_LUT4_O_I3 5055 picorv32.count_instr_SB_DFFESR_Q_27_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_28_D_SB_LUT4_O_I3 4929 picorv32.count_instr_SB_DFFESR_Q_28_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_29_D_SB_LUT4_O_I3 4803 picorv32.count_instr_SB_DFFESR_Q_29_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_30_D_SB_LUT4_O_I3 4677 picorv32.count_instr_SB_DFFESR_Q_30_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_31_D_SB_LUT4_O_I3 4551 picorv32.count_instr_SB_DFFESR_Q_31_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_32_D_SB_LUT4_O_I3 4425 picorv32.count_instr_SB_DFFESR_Q_32_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_33_D_SB_LUT4_O_I3 4299 picorv32.count_instr_SB_DFFESR_Q_33_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_34_D_SB_LUT4_O_I3 4173 picorv32.count_instr_SB_DFFESR_Q_34_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_35_D_SB_LUT4_O_I3 4047 picorv32.count_instr_SB_DFFESR_Q_35_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_36_D_SB_LUT4_O_I3 3921 picorv32.count_instr_SB_DFFESR_Q_36_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_37_D_SB_LUT4_O_I3 3795 picorv32.count_instr_SB_DFFESR_Q_37_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_38_D_SB_LUT4_O_I3 3669 picorv32.count_instr_SB_DFFESR_Q_38_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_39_D_SB_LUT4_O_I3 3543 picorv32.count_instr_SB_DFFESR_Q_39_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_40_D_SB_LUT4_O_I3 3417 picorv32.count_instr_SB_DFFESR_Q_40_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_41_D_SB_LUT4_O_I3 3291 picorv32.count_instr_SB_DFFESR_Q_41_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_42_D_SB_LUT4_O_I3 3165 picorv32.count_instr_SB_DFFESR_Q_42_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_43_D_SB_LUT4_O_I3 3039 picorv32.count_instr_SB_DFFESR_Q_43_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_44_D_SB_LUT4_O_I3 2913 picorv32.count_instr_SB_DFFESR_Q_44_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_45_D_SB_LUT4_O_I3 2787 picorv32.count_instr_SB_DFFESR_Q_45_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_46_D_SB_LUT4_O_I3 2661 picorv32.count_instr_SB_DFFESR_Q_46_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_47_D_SB_LUT4_O_I3 2535 picorv32.count_instr_SB_DFFESR_Q_47_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_48_D_SB_LUT4_O_I3 2409 picorv32.count_instr_SB_DFFESR_Q_48_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_49_D_SB_LUT4_O_I3 2283 picorv32.count_instr_SB_DFFESR_Q_49_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_50_D_SB_LUT4_O_I3 2157 picorv32.count_instr_SB_DFFESR_Q_50_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_51_D_SB_LUT4_O_I3 2031 picorv32.count_instr_SB_DFFESR_Q_51_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_52_D_SB_LUT4_O_I3 1905 picorv32.count_instr_SB_DFFESR_Q_52_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_53_D_SB_LUT4_O_I3 1779 picorv32.count_instr_SB_DFFESR_Q_53_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_54_D_SB_LUT4_O_I3 1653 picorv32.count_instr_SB_DFFESR_Q_54_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_55_D_SB_LUT4_O_I3 1527 picorv32.count_instr_SB_DFFESR_Q_55_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_56_D_SB_LUT4_O_I3 1401 picorv32.count_instr_SB_DFFESR_Q_56_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_57_D_SB_LUT4_O_I3 1275 picorv32.count_instr_SB_DFFESR_Q_57_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_58_D_SB_LUT4_O_I3 1149 picorv32.count_instr_SB_DFFESR_Q_58_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_59_D_SB_LUT4_O_I3 1023 picorv32.count_instr_SB_DFFESR_Q_59_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_60_D_SB_LUT4_O_I3 897 picorv32.count_instr_SB_DFFESR_Q_60_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.CI->CO) \picorv32.count_instr_SB_DFFESR_Q_61_D_SB_LUT4_O_I3 771 picorv32.count_instr_SB_DFFESR_Q_61_D_SB_LUT4_O_I3_SB_CARRY_CO (SB_CARRY.I1->CO) \picorv32.count_instr [1] 540 picorv32.count_instr_SB_DFFESR_Q_62 (SB_DFFESR.C->Q) 0 \clk () Arrival histogram: legend: * represents 4 endpoint(s) + represents [1,4) endpoint(s) ( 8800, 8360] |*+ ( 8360, 7920] |*+ ( 7920, 7480] |*+ ( 7480, 7040] |*+ ( 7040, 6600] |**+ ( 6600, 6160] |***+ ( 6160, 5720] |*****+ ( 5720, 5280] |****+ ( 5280, 4840] |***************+ ( 4840, 4400] |**************** ( 4400, 3960] |*************+ ( 3960, 3520] |**********+ ( 3520, 3080] |************+ ( 3080, 2640] |********************+ ( 2640, 2200] |************ ( 2200, 1760] |***************+ ( 1760, 1320] |********************************************+ ( 1320, 880] |************************************************************ ( 880, 440] |************************************************************ ( 440, 0] |**** ```

However, @ZirconiumX found that the ABC9 result here has a consistently worse post P+R timing, and to this day I don't think we have a good reason why.

From Yosys' point of view, I'm going to posit that Yosys+ABC9 is doing everything right in that it is optimising for this single long carry chain that is the critical path across both solutions (even if ABC doesn't really know it), and is free to implement non-critical logic however it wishes as long as it doesn't increase this critical delay....

Ravenslofty commented 4 years ago

I think if we had a way of diffing two designs, that might be a helpful tool to have.