From c29f1d02ef1316b69ec5168cb7dafc2d85dced09 Mon Sep 17 00:00:00 2001 From: TinyTapeoutBot <139130078+TinyTapeoutBot@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:53:35 +0300 Subject: [PATCH] feat: update project tt_um_jleightcap from jleightcap/tt07 Commit: 8ed48304f74f94360a5ea46cd2ba23a3c9e08ae6 Workflow: https://github.com/jleightcap/tt07/actions/runs/9332763685 --- projects/tt_um_jleightcap/LICENSE | 1 + projects/tt_um_jleightcap/commit_id.json | 4 +- projects/tt_um_jleightcap/docs/info.md | 74 ++++++++++++++---- projects/tt_um_jleightcap/info.yaml | 3 +- projects/tt_um_jleightcap/stats/metrics.csv | 2 +- .../tt_um_jleightcap/tt_um_jleightcap.gds | Bin 1377430 -> 1377430 bytes .../tt_um_jleightcap/tt_um_jleightcap.spef | 2 +- 7 files changed, 66 insertions(+), 20 deletions(-) diff --git a/projects/tt_um_jleightcap/LICENSE b/projects/tt_um_jleightcap/LICENSE index 261eeb9..d645695 100644 --- a/projects/tt_um_jleightcap/LICENSE +++ b/projects/tt_um_jleightcap/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/projects/tt_um_jleightcap/commit_id.json b/projects/tt_um_jleightcap/commit_id.json index d1763cd..2a7b987 100644 --- a/projects/tt_um_jleightcap/commit_id.json +++ b/projects/tt_um_jleightcap/commit_id.json @@ -1,8 +1,8 @@ { "app": "Tiny Tapeout tt07 11b2d371", "repo": "https://github.com/jleightcap/tt07", - "commit": "4ca64608e28143b638283243d8fd8d42203dda68", - "workflow_url": "https://github.com/jleightcap/tt07/actions/runs/9332458377", + "commit": "8ed48304f74f94360a5ea46cd2ba23a3c9e08ae6", + "workflow_url": "https://github.com/jleightcap/tt07/actions/runs/9332763685", "sort_id": 1717268031187, "openlane_version": "OpenLane 337ffbf4749b8bc6e8d8742ed9a595934142198b", "pdk_version": "open_pdks cd1748bb197f9b7af62a54507de6624e30363943" diff --git a/projects/tt_um_jleightcap/docs/info.md b/projects/tt_um_jleightcap/docs/info.md index 7a8bb0f..a93a280 100644 --- a/projects/tt_um_jleightcap/docs/info.md +++ b/projects/tt_um_jleightcap/docs/info.md @@ -1,27 +1,73 @@ - +Fractran programs are lists of positive fractions: e.g., -## How it works +$$ +\frac{17}{91}, +\frac{78}{85}, +\frac{19}{51}, +\frac{23}{38}, +\frac{29}{33}, +\frac{77}{29}, +\cdots +$$ + +Execution follows 3 rules: + +1. The program is given an initial input integer $n \in \mathbb{N}$. This is the "accumulator" value. +2. To compute the next state, $n \leftarrow qn$ where $q \in \mathbb{Q}$ is the first fraction in the program where $qn \in \mathbb{N}$. +3. Repeat (2) until no such $q$ exists, then halt with output $n$. + +Depending on how terms are represented, (2) is a very simple operating to implement in hardware. +The "cheat" is to operate on pre-factored values: for example, the first few fractions of the above example: + +$$ +2^0 3^0 5^0 7^{-1} 11^0 13^{-1} 17^1, +2^1 3^1 5^{-1} 7^0 11^0 13^1 17^{-1}, +2^0 3^{-1} 5^0 7^0 11^0 13^0 17^{-1} 19^1, +2^{-1} 3^0 5^0 7^0 11^0 13^0 17^0 19^{-1} 23^1, +2^0 3^{-1} 5^0 7^0 11^{-1} 13^0 17^0 19^0 23^0 29^1, +\cdots +$$ -An ASIC Fractran interpreter. +For $n = 825 = 3^1 5^2 11^1$, $nq \in \mathbb{N}$ if all pairwise added prime factor degrees are positive: testing $825 \times \frac{17}{91}$: -TODO: explain prime stream representation, factorization as stream addition, etc. +$$ +3^1 5^2 11^1 \times 7^{-1} 13^{-1} = 3^1 5^2 7^{-1} 11^1 13^{-1} +$$ + +The negative degrees are not cancelled by the terms of $n$: testing $825 \times \frac{29}{33}$, + +$$ +3^1 5^2 11^1 \times 3^{-1} 11^{-1} 29^1 = 5^2 29^1 +$$ + +All negative degrees cancel, and the result is written as the new accumulator. ## How to test -Automated test suite is ran via GitHub actions per the tinytapeout HDL template. +See port mapping in [info.yaml](../info.yaml). + +Encodings: +- accumulator: 8-bit unsigned integer degrees. Value `0b11111111` reserved as sentinel "STOP" value. +- fraction: 8-bit signed (one's complement) degrees. Value `0b11111111` (the "second zero") reserved as sentinel "STOP" value. + +Apply to these two inputs pair of streams of prime factor degrees. +When the each stream is exhausted, apply the "STOP" value. -TODO: explain test architecture +For each input, there is output: +- resultant degree, or "STOP" when both input streams exhausted, indicating a positive result and accumulator writeback. +- HALT, when a negative degree is calculuated, indicating the start of the next fraction. ## External hardware -TODO: +The logic implemented internally is quite small, requiring support circuitry. +This might include: -- 32KiB RAM -- 32KiB ROM +1. fraction counter: program counter +2. degree pointer: counter for current prime term +3. fraction ROM: storing prime degrees, punctuaed by "STOP"s +4. banked accumulator RAM: two banks of memory to store current accumulator, and calculated value. + on an integral result, the 'scratch' bank is switched to accumulator, old accumulator becomes 'scratch'. diff --git a/projects/tt_um_jleightcap/info.yaml b/projects/tt_um_jleightcap/info.yaml index acb91ac..e240723 100644 --- a/projects/tt_um_jleightcap/info.yaml +++ b/projects/tt_um_jleightcap/info.yaml @@ -4,7 +4,7 @@ project: author: "Jack Leightcap" description: "Hardware implementation of John Conway's estoeric turing-complete lanugage Fractran" language: "Clash" - clock_hz: 1 # TODO: how to determine max clock rate? or just leave as reasonable minimum? + clock_hz: 1 # How many tiles your design occupies? A single tile is about 167x108 uM. tiles: "1x1" # Valid values: 1x1, 1x2, 2x2, 3x2, 4x2, 6x2 or 8x2 @@ -36,7 +36,6 @@ pinout: uo[6]: "factorized stream [6]" uo[7]: "factorized stream [7]" - # Bidirectional pins, all configured as inputs uio[0]: "fraction stream [0]" uio[1]: "fraction stream [1]" uio[2]: "fraction stream [2]" diff --git a/projects/tt_um_jleightcap/stats/metrics.csv b/projects/tt_um_jleightcap/stats/metrics.csv index 83b9c5b..3fe3c9a 100644 --- a/projects/tt_um_jleightcap/stats/metrics.csv +++ b/projects/tt_um_jleightcap/stats/metrics.csv @@ -1,2 +1,2 @@ design,design_name,config,flow_status,total_runtime,routed_runtime,(Cell/mm^2)/Core_Util,DIEAREA_mm^2,CellPer_mm^2,OpenDP_Util,Final_Util,Peak_Memory_Usage_MB,synth_cell_count,tritonRoute_violations,Short_violations,MetSpc_violations,OffGrid_violations,MinHole_violations,Other_violations,Magic_violations,pin_antenna_violations,net_antenna_violations,lvs_total_errors,cvc_total_errors,klayout_violations,wire_length,vias,wns,pl_wns,optimized_wns,fastroute_wns,spef_wns,tns,pl_tns,optimized_tns,fastroute_tns,spef_tns,HPWL,routing_layer1_pct,routing_layer2_pct,routing_layer3_pct,routing_layer4_pct,routing_layer5_pct,routing_layer6_pct,wires_count,wire_bits,public_wires_count,public_wire_bits,memories_count,memory_bits,processes_count,cells_pre_abc,AND,DFF,NAND,NOR,OR,XOR,XNOR,MUX,inputs,outputs,level,DecapCells,WelltapCells,DiodeCells,FillCells,NonPhysCells,TotalCells,CoreArea_um^2,power_slowest_internal_uW,power_slowest_switching_uW,power_slowest_leakage_uW,power_typical_internal_uW,power_typical_switching_uW,power_typical_leakage_uW,power_fastest_internal_uW,power_fastest_switching_uW,power_fastest_leakage_uW,critical_path_ns,suggested_clock_period,suggested_clock_frequency,CLOCK_PERIOD,FP_ASPECT_RATIO,FP_CORE_UTIL,FP_PDN_HPITCH,FP_PDN_VPITCH,GRT_ADJUSTMENT,GRT_REPAIR_ANTENNAS,MAX_FANOUT_CONSTRAINT,PL_TARGET_DENSITY,RUN_HEURISTIC_DIODE_INSERTION,STD_CELL_LIBRARY,SYNTH_STRATEGY -/work/src,tt_um_jleightcap,wokwi,flow completed,0h1m14s0ms,0h0m55s0ms,35533.8317723696,0.01795472,17766.9158861848,16.62,17.227999999999998,517.82,281,0,0,0,0,0,0,0,0,0,0,-1,-1,6427,2171,0.0,-1,-1,-1,-1,0.0,-1,-1,-1,-1,5157828.0,0.0,15.06,8.41,1.76,1.82,-1,331,503,31,193,0,0,0,341,13,0,9,16,33,54,7,37,35,43,15,1097,225,0,298,319,1939,16493.3184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21.0,47.61904761904762,20,1,50,26.520,38.870,0.3,1,10,0.6,0,sky130_fd_sc_hd,AREA 0 +/work/src,tt_um_jleightcap,wokwi,flow completed,0h1m12s0ms,0h0m53s0ms,35533.8317723696,0.01795472,17766.9158861848,16.62,17.227999999999998,511.09,281,0,0,0,0,0,0,0,0,0,0,-1,-1,6427,2171,0.0,-1,-1,-1,-1,0.0,-1,-1,-1,-1,5157828.0,0.0,15.06,8.41,1.76,1.82,-1,331,503,31,193,0,0,0,341,13,0,9,16,33,54,7,37,35,43,15,1097,225,0,298,319,1939,16493.3184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21.0,47.61904761904762,20,1,50,26.520,38.870,0.3,1,10,0.6,0,sky130_fd_sc_hd,AREA 0 diff --git a/projects/tt_um_jleightcap/tt_um_jleightcap.gds b/projects/tt_um_jleightcap/tt_um_jleightcap.gds index b276a825e6f8d078e946a907493389fdb50a4490..f68071e3e029d267e70134eb90fc041d1b498790 100644 GIT binary patch delta 1452 zcmY*ZZ)j6j6z}_Yb6;ngr0vUV8`H$bei&7v6sOZdmtjRWYlVe@inJ(FkckxShYhuL zOtwl#s-e9)tQG3NGDeh(JyMxEDiuU&6b7Q$$|ghnAR?l)AbQ?=_a$#1esFW%Ip_Y) z@BD6t`qD#v>4B(LQPNnl`dD2vwGSn=gmv8_3ojozTjqSq2A4(nhQPYg!cT+UctL2E zH--7_>bt5atRpP+h{XA|+TEm(8sRPVQ=*awm!%dIz8Gvo_ffvDX@};-SiVL!+1~S% z@OP=7%AFwZO@Cb>j`_|H;)s+C*8Cr(&^RooB(^c6Ey)h_sC>u4*h0~*qgstH-Y>`a z&67(5PSCDvYoK&AFeX~DGd?BEI>xDwUFnyjL;IzM(M-LR&3#IE&!4@;3nM&s|GZx` z58hS{K09;W@bnE#QOa+;c_s*C^PL9EtfK@bL()W1ON0IK3lblRO9xD+8se)Y5NDfV zt{W5P+N2*udxotE8PRmC~NP&F^{xS)bN=yDabhJzUB@o6CQFVOrKE7 z>jZmin)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mJ$+}}YVa+Km3Xjs{xSMaO znyl3c>^(sCh<}g*YYNYfkk`vZ7hB7PtE5wy+!hH?q)io0#<$~B1mQzagpMdhe1uqp X@FU6)0YnfHLX;yG!}wIi^9}C-BHnpm diff --git a/projects/tt_um_jleightcap/tt_um_jleightcap.spef b/projects/tt_um_jleightcap/tt_um_jleightcap.spef index c53ef10..b49d328 100644 --- a/projects/tt_um_jleightcap/tt_um_jleightcap.spef +++ b/projects/tt_um_jleightcap/tt_um_jleightcap.spef @@ -1,6 +1,6 @@ *SPEF "ieee 1481-1999" *DESIGN "tt_um_jleightcap" -*DATE "18:51:02 Saturday June 01, 2024" +*DATE "19:51:54 Saturday June 01, 2024" *VENDOR "The OpenROAD Project" *PROGRAM "OpenROAD" *VERSION "da0053d7b0014ab9c87ea148875ff6c2a0f9b658"