Golf scores on ASAP7, a predictive 7 nm library: never fabricated, and like sky130's score it counts no wires. sky130, a real 130 nm process, is the default. How ASAP7 is scored, and its quirks.

Tasks / _example / reference

Reference band_tactics

proved referenceproved reference scored at N = 16

A proved reference of _example, written or adapted by the maintainers and shipped with the task: its design and its proof band_tactics.lean (38 code lines). The same design, byte for byte, proved with the sv_comb tactics (sv_structure, sv_interface, sv_equations) in a quarter of the code lines: the proof the walk-through starts from. It is shown with parshown with par, never a player's entry (proved references).

Area, time and score

No ranked numbers to show: no sky130 weighing at the scoring point.

Area

1.400µm²

1.39968 µm² exactly

vs par
±0% equalband · 1.400 µm²
on this page
1st of 3 designs (tied with 2)
cells
16
flops
0
repair
0 buffers, 0 tie cells
GE
21.328 extra

Performance · time

56ps

the delay: the latest output arrival

vs par
±0% equalband · 56 ps
on this page
1st of 3 designs (tied with 2)
Fmax-eq.
17857.1 MHz derived
unit depth
1 extra

Score · area × time

0.0784µm²·ns

1.39968 µm² × 56 ps

vs par
±0% equalband · 0.0784 µm²·ns
on this page
1st of 3 designs (tied with 2)
board
a proved reference, shown with par: never ranked
Pareto
on the front

No other player has a ranked record on _example yet: the beats and matches lines come with the first one.

how these numbers are measured and compared

Area: ASAP7 A0′ (asap7_a0_v1), the same scored netlist, each gate its least-area ASAP7 build, repaired by buffering. Time: NLDM, inputs driven by BUFx8, 2.5 fF per output bit, no wires; a table read below its grid is read at its floor. ASAP7: a predictive 7 nm library, never fabricated; no wires, like sky130's score (how ASAP7 is scored, and its quirks).

Area, time and score order this view's board (by the score); the records' ranked score is sky130's, the default view; a number tagged extra, derived or research is shown, never ranked. Fmax-equivalent = 10⁶ / time in ps, for comparison with sites that quote Fmax.

The field is the ranked records of _example's other players at this revision (0 players, 0 records), never the references, the baselines or a rejected design; advisory, recomputed at every build, never stored in a record and never used by the ranking.

“On this page” and “Pareto” compare with the 3 designs of the area-time plot (3 references): not a ranking.

The sources

band_tactics.svdownload
// svGolf task `_example` -- reference solution: N two-input AND gates.
module band #(parameter int N = 4) (
  input  logic [N-1:0] a,
  input  logic [N-1:0] b,
  output logic [N-1:0] y
);
  assign y = a & b;
endmodule
band_tactics.lean (38 code lines)
import Submission.Design
import SvGolf.Comb
import LeanModels.Sv.CombEqTactic

/-!
# Reference solution for task `_example`, proved with the `sv_comb` tactics

This is a submission file like any player's `Solution.lean`. The checker generates the module
`Submission.Design` (`Submission.design`, `Submission.Goal`); this file proves

    theorem Submission.solution : Submission.Goal

for EVERY `N ≥ 1`. The design is `reference/band_tactics.sv`, byte for byte `reference/band.sv`
(`assign y = a & b;`); `reference/band.lean` proves the same statement with no tactic, in about four
times as many code lines. The route is the one of the first real task's proof
(`tasks/add/reference/add_n.lean`):

1. **Structure** (`band_struct`): `sv_structure` proves `CombDesign` and `Acyclic` of `design.sem N`
   and returns small arithmetic goals, each closed by `intros; omega`. The rank is 0 for every site:
   the one assign reads only the inputs.
2. **Ports** (`band_interface`): `sv_interface` proves the port names, order and widths.
3. **Equations** (in `solution`): `CombTask.satisfiedAt_of_comb` reduces the statement to one
   settled state; `sv_equations` states the assign as an equation over `Bool`, bit by bit
   (`eq_y_1 k`: bit `k` of `y` is the AND of bit `k` of `a` and of `b`), the knownness of `y`
   (`known_y_1`) and the obligations it does not discharge, closed by the same `first` list as in
   `add_n.lean`. The arithmetic is the first bullet: `y` is the vector of its known bits
   (`SvState.lookup_eq_ofBitVec_bv`), and bit `k` of that vector is the AND of the inputs' bits.
-/

namespace Submission

open LeanModels.Sv LeanModels.Sv.CombView LeanModels.Sv.CombEq SvGolf

/-! ## 1. Structure: `sv_structure` -/

theorem band_struct (N : Nat) (hN : 1 ≤ N) :
    CombDesign (design.sem N) ∧ Acyclic (design.sem N) ∧ SharedObl design.pdesign [N] := by
  sv_structure (rank := rippleRank (fun _ => 0) (fun _ _ _ => 0))
  all_goals (intros; omega)

/-! ## 2. The ports (the task's `Interface`) -/

theorem band_interface (N : Nat) (hN : 1 ≤ N) (hc : CombDesign (design.sem N)) :
    SvGolf.Tasks.Example.task.Interface N (design.sem N) := by
  sv_interface

/-! ## 3. The statement -/

/-- **The reference solution**: the `_example` statement, for every `N ≥ 1`. -/
theorem solution : Goal := by
  intro N hN
  have hN' : 1 ≤ N := hN.1
  obtain ⟨hc, ha, hso⟩ := band_struct N hN'
  refine CombTask.satisfiedAt_of_comb (band_interface N hN' hc) hc ha ?_
  intro st heqs hs v hv
  obtain ⟨x, z, ⟨⟩⟩ := v
  simp only [SvGolf.Tasks.Example.task, HoldAll_cons, HoldAll_nil, and_true] at hv ⊢
  obtain ⟨hA, hB⟩ := hv
  sv_equations
  · obtain ⟨⟨vy, hvy, hvyw⟩, -⟩ := known_y_1 0 (by omega)
    rw [hvy, SvState.lookup_eq_ofBitVec_bv hvy (W := N) (by omega)
      (fun k hk => (known_y_1 k (by omega)).2)]
    congr 2
    apply BitVec.eq_of_getLsbD_eq
    intro k hk
    rw [XF.getLsbD_bv hk, eq_y_1 k (by omega)]
    simp [SvState.boolAt_ofBitVec hA, SvState.boolAt_ofBitVec hB, hk]
  all_goals first
    | (intros; omega)
    | sv_cover
    | (refine inKnown_ofBitVec hA ?_; omega)
    | (refine inKnown_ofBitVec hB ?_; omega)

/--
info: 'Submission.solution' depends on axioms: [propext, Classical.choice, Quot.sound]
-/
#guard_msgs (whitespace := lax) in
#print axioms solution

end Submission

The netlist

The netlist card shows the sky130 weighing (its cells, its critical path): the ASAP7 view changes the overview above, not this card.

Schematic

drawn at N = 4

Drawn at N = 4, a display instance; scored at N = 16. Only this drawing and the notes under it are at the smaller size: the critical path, the cells and every other number on this page are the scored netlist's.

_0_ · sky130_fd_sc_hd__and2_1 and2_1 _1_ · sky130_fd_sc_hd__and2_1 and2_1 _2_ · sky130_fd_sc_hd__and2_1 and2_1 _3_ · sky130_fd_sc_hd__and2_1 and2_1 a b y 0 1 2 3 0 1 2 3 0 1 2 3

It is the same design through the same pinned flow at a smaller size (ppa.py --param), so that what it does can be seen: 4 cells here, 16 at the scoring point. The critical path at N = 4 (1 cell, ending at y[0] falling, 280 ps there) is in the accent colour. Drawn by netlistsvg with svGolf's sky130 skin (derived from netlistsvg's default skin, as the drawing is: MIT licence, Copyright (c) 2016 Neil Turley, the notice): one symbol per cell function, the cell above it, the instance on hover; nor2b and nand2b are drawn with the bubble on their inverted input. The cells of the path are listed under Critical path, each a link to the cell here.

The netlist at N = 4: 4 cells, 4 and2_1. There (measured, not ranked): 25.02 µm², 280 ps. Open the drawing on its own (SVG, 5.0 KB) to pan and zoom it with the browser's own controls.

Critical path

at N = 16 · scored

The path the ranked delay ends on, at the scoring point N = 16: 2 nets, 1 cell, to y[0] falling at 280 ps. Each row is a net of the repaired netlist with the arrival and the transition the STA computed there (NLDM tables, the larger transition carried; no wires). The first row is an input: its arrival is the input driver's own delay (buf_8 fed by a 50 ps ramp). From ppa.py --path (critical_path_timing); the instance names are the scored netlist's, not the schematic's (drawn at a smaller size).

In the schematic, drawn at N = 4, the critical path is 1 cell to y[0] falling (280 ps there); each cell is a link to it in the drawing:

  1. a[0]
  2. _0_ and2_1
  3. y[0]
#netedgedriven bycellarrival (ps)transition (ps)stage (ps)
0a[0]fallinput port–108.318.4
1y[0]fall_13_and2_1279.666.6171.3

Cells

at N = 16 · scored

No sky130 cell list: this design has no sky130 weighing.

the gate mix of the extra GE column (the pinned GE table, score/ge.json)
cellcountGE eachGE total
AND161.33321.328
total1621.328

The reference

task
_example
design
band_tactics.sv sha256 69299388b006f49d94180cdf29fad24c02995b1f727e5ce458910e60c09816ff
proof
band_tactics.lean, 38 code lines
tactics seen
omega, simp, sv_cover, sv_equations, sv_interface, sv_structure
same design as
band
recorded
no: the checker's run details (build time, axioms, the post-synthesis vectors) are kept for recorded designs only
downloads
band_tactics.sv band_tactics.lean

Area against time

µm² × ps · lower left is better · ASAP7
_example: this design's ASAP7 area against time, among the task's designs3 designs by ASAP7 area (µm²) (x) and time (ps) (y), this one ringed; lower left is better. The table under the chart lists the same numbers.5456581.351.41.45ASAP7 area (µm²)time (ps) · lower is betterpar's score: area × time = 0.0784 µm²·nsthe Pareto front of the entries3 designs at this point · band · band_lp · this design3 designs at this point · band · band_lp · this design3 designs at this point · band · band_lp · this designthis design · par's numbers
_example: this design's ASAP7 area against time, among the task's designs3 designs by ASAP7 area (µm²) (x) and time (ps) (y), this one ringed; lower left is better. The table under the chart lists the same numbers.5456581.351.41.45ASAP7 area (µm²)time (ps) · lower is betterpar's score: area × time = 0.0784 µm²·nsthe Pareto front of the entries3 designs at this point · band · band_lp · this design3 designs at this point · band · band_lp · this design3 designs at this point · band · band_lp · this designthis design · par's numbers
  • proved reference
  • the Pareto front of the entries
  • this design
  • par's score: area × time = 0.0784 µm²·ns
ASAP7 area (x) against the ASAP7 time (y); lower left is better on both. The step line is the Pareto front of the entries (the proved references and the players' ranked records); a design under par's score curve has a better score than par. Baselines are drawn for scale: scored, never proved. Every design is in view.
the designs as numbers, by score
designkindarea (µm²)time (ps)score (µm²·ns)
band proved reference · par1.400560.0784
band_lp proved reference1.400560.0784
band_tactics · this designproved reference1.400560.0784

Reproduce

From svgolf/, with the pinned tools (reproduce a score lists them):

shell
# the ranked numbers, at the scoring point (from svgolf/, with the pinned Yosys and liberty)
python3.12 score/ppa.py tasks/_example/reference/band_tactics.sv --task tasks/_example --path \
    --json out.json --netlist scored.v --repaired-netlist repaired.v

The schematic and the critical-path data are site/schematics/_example/69299388b006f49d.json and its .svg, written by site/gen_schematics.py (the display instance is ppa.py ... --param N=4 --repaired-netlist, drawn by netlistsvg 1.0.2; repaired netlist sha256 bbbff5e1613dcf43…).

From svgolf/, with the pinned tools (reproduce a score lists them):

shell
# the ASAP7 view's numbers, at the scoring point (from svgolf/, with the pinned Yosys; once:
# python3.12 score/ppa.py --pdk asap7 --fetch-liberty, the five pinned ASAP7 files into score/lib/asap7/)
python3.12 score/ppa.py tasks/_example/reference/band_tactics.sv --task tasks/_example --pdk asap7 --no-mapped \
    --json out.json

Expect, in out.json:

ppa.netlist_sha256
d6499297a145c23b802c40766f239336d8a15ea1462d342d3656dfc82ff0ae52
ppa.repair.netlist_sha256
38596d52847c91d7e7fd70188696e9e46d40313f3f301d368705a0864dcb4902
ppa.area_e5um2_asap7
139968
ppa.delay_ps_asap7
56

leaderboard/asap7/_example.json keeps these numbers; python3.12 leaderboard/leaderboard.py asap7 --rescore --task _example weighs every design of the task again and compares, bit for bit.