Skip to content

Commit

Permalink
feat: update project tt_um_ccattuto_charmatrix from ccattuto/tt07-ser…
Browse files Browse the repository at this point in the history
…ial-charmatrix

Commit: e23907a394cbe48a08d45a941596b1c2604e7ec7
Workflow: https://github.com/ccattuto/tt07-serial-charmatrix/actions/runs/9134705693
  • Loading branch information
TinyTapeoutBot authored and urish committed May 18, 2024
1 parent ee3054d commit 6965d29
Show file tree
Hide file tree
Showing 9 changed files with 102,151 additions and 114,267 deletions.
6 changes: 3 additions & 3 deletions projects/tt_um_ccattuto_charmatrix/commit_id.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"app": "Tiny Tapeout tt07 5e4d73d4",
"app": "Tiny Tapeout tt07 29e3bc4c",
"repo": "https://github.com/ccattuto/tt07-serial-charmatrix",
"commit": "fe06bbf1504a094dcb169f4da9fec89684fc56d7",
"workflow_url": "https://github.com/ccattuto/tt07-serial-charmatrix/actions/runs/9095605876",
"commit": "e23907a394cbe48a08d45a941596b1c2604e7ec7",
"workflow_url": "https://github.com/ccattuto/tt07-serial-charmatrix/actions/runs/9134705693",
"sort_id": 1715616136626,
"openlane_version": "OpenLane 337ffbf4749b8bc6e8d8742ed9a595934142198b",
"pdk_version": "open_pdks cd1748bb197f9b7af62a54507de6624e30363943"
Expand Down
17 changes: 10 additions & 7 deletions projects/tt_um_ccattuto_charmatrix/docs/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,29 @@ This project drives an LED-matrix character display composed of one or more [Pix

Up to 4 chained devices are supported for a maximum of 8 characters. The displayed characters are received from a serial port using the UART protocol (9600 baud, 8N1). The project includes a [simple UART implementation](https://github.com/ccattuto/verilog-uart). Every time a character is received over UART, the displayed characters shift left, and the new character appears to the right. 5x7 matrix representations for printable ASCII characters are supported using the font from [Arduino Microview Library](https://github.com/geekammo/MicroView-Arduino-Library/blob/master/font5x7.h) encoded in a character ROM. Non-printable ASCII characters are shown as an empty rectangle. Each new character appears with a color randomly chosen among a palette of 16 colors contained in a color ROM. A pseudo-random number generator based on a linear-feedback shift register is used for color selection.

The project is designed to demonstrate the underlying Verilog modules, which should be easily re-usable:
The project is designed to demonstrate components that should be easily re-usable:
- WS2812B LED strip driver
- UART receiver and transmitter (8N1 only, no flow control)
- [UART receiver and transmitter](https://github.com/ccattuto/verilog-uart) (8N1 only, no flow control)
- linear-feedback pseudo-random number generator
- character ROM

The cocotb code to parse the [WS2812B protocol](https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf) might also be useful to others.
- cocotb tests for UART and [WS2812B protocol](https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf)


## How to test

Basic setup:
* Connect `uo[0]` to the input pin (`DATA_IN`) of a [Pixie Chroma](https://connornishijima.github.io/Pixie_Chroma/) LED-matrix display (two 5x7 WS2812B LED matrices). Ensure the `VCC` and `GND` pins are connected to an adequate power source.
* Configure the input (e.g., using the DIP switches of the PCB) as follows: set `ui[0]` and `ui[1]` to `0` to use one Pixie Chrome (i.e., two 5x7 LED matrices); set `ui[2]` to `1` to enable UART echo; set `ui[4]` and `ui[5]` to `0` to disable LED dimming.
* Configure the input (e.g., using the DIP switches of the PCB) as follows: set `ui[0]` and `ui[1]` to `0` to use one Pixie Chrome (i.e., two 5x7 LED matrices); set `ui[2]` to `1` to enable UART echo; set `ui[4]` and `ui[5]` to `0` to disable LED dimming, set `ui[6]` to `0` to select internal display refresh, and `ui[7]` to `0` to select random color selection.
* Connect the UART interface of the project (RX is `ui[3]`, TX is `uo[4]`) to a serial terminal or a UART-to-USB PMOD or adapter (e.g., the one provided by the onboard RP2040 of the Tiny Tapeout PCB). Configure the serial interface for 9600 baud, 8 bits, 1 start bit, no parity bit, and 1 stop bit (8N1), with no hardware or software flow control.
* Open the terminal and type any characters: printable ASCII characters will appear from the right-hand side on the LED matrix and shift left as more characters are typed. Each character will appear with a different random color. Non-printable ASCII characters are shown as an empty rectangle. Received characters are echoed on the serial connection when `ui[2]` is set to `1`.
* Open the terminal and type any characters: printable ASCII characters will appear from the right-hand side on the LED matrix and shift left as more characters are typed. Each character will appear with a different random color. Non-printable ASCII characters are shown as an empty rectangle. When `ui[2]` is set to `1`, received characters are echoed on the serial connection.

To use **more than one Pixie Chroma**, [chain](https://connornishijima.github.io/Pixie_Chroma/?section=datasheet) additional displays after the first one. This project supports up to 4 displays (e.g., 8 5x7 LED matrices). Set `ui[1]` and `ui[0]` (e.g., by using the DIP switches of the PCB) to configure the number of displays you are using: `00` for 1 display, `01` for 2 displays, `10` for 3 displays, and `11` for 4 displays (8 5x7 characters).

Dimming of the LED matrix is controlled by the `ui[5]` and `ui[4]` signals: `00` for no dimming, `01`, `10`, and `11` for increasing dimming.
**Dimming** of the LED matrix is controlled by the `ui[5]` and `ui[4]` signals: `00` for no dimming, `01`, `10`, and `11` for increasing dimming.

The **color of characters** is randomly chosen when `ui[6]` is low, and fixed when ``ui[6]` is high. The fixed color can be changed by sending over UART a non-printable byte >= 128: the lower 4 bits of such value are stored and used as an index in the color ROM (16 different colors).

Two **display refresh modes** are available, controlled by `ui[6]`. When `ui[6]` is low, refresh is internally triggered at a frequency of about 75 Hz. When `ui[6]` is high, refresh is triggered via UART, whenever a CR or LF character is received. For both refresh modes, `uo[1]` is pulsed high on LED matrix refresh.

## External hardware

Expand Down
4 changes: 2 additions & 2 deletions projects/tt_um_ccattuto_charmatrix/info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ pinout:
ui[3]: "UART RX"
ui[4]: "dimmer selector 0"
ui[5]: "dimmer selector 1"
ui[6]: ""
ui[7]: ""
ui[6]: "internal/external refresh selector"
ui[7]: "random/fixed color selector"

# Outputs
uo[0]: "LED strip"
Expand Down
2 changes: 1 addition & 1 deletion projects/tt_um_ccattuto_charmatrix/stats/metrics.csv
Original file line number Diff line number Diff line change
@@ -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_ccattuto_charmatrix,wokwi,flow completed,0h7m49s0ms,0h7m7s0ms,122980.04586853075,0.03634736,61490.02293426538,59.5,63.4232,638.68,1948,0,0,0,0,0,0,0,14,12,0,-1,-1,101981,19991,0.0,-1,-1,-1,-1,0.0,-1,-1,-1,-1,49631832.0,0.0,70.51,76.96,35.32,46.99,-1,1799,2402,102,622,0,0,0,2072,73,20,88,39,331,68,31,576,302,292,16,1140,456,36,761,2235,4628,34255.3536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21.0,47.61904761904762,20,1,50,55.080,38.870,0.3,1,10,0.6,0,sky130_fd_sc_hd,AREA 0
/work/src,tt_um_ccattuto_charmatrix,wokwi,flow completed,0h4m26s0ms,0h3m44s0ms,119073.29720783021,0.03634736,59536.648603915106,58.9,61.827,619.19,1910,0,0,0,0,0,0,0,0,0,0,-1,-1,79998,17773,0.0,-1,-1,-1,-1,0.0,-1,-1,-1,-1,49156955.0,0.0,62.93,71.22,10.76,36.4,-1,1807,2413,106,629,0,0,0,2074,74,20,93,40,327,68,31,585,300,288,16,1237,456,5,712,2164,4574,34255.3536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,21.0,47.61904761904762,20,1,50,55.080,38.870,0.3,1,10,0.6,0,sky130_fd_sc_hd,AREA 0
143 changes: 72 additions & 71 deletions projects/tt_um_ccattuto_charmatrix/stats/synthesis-stats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,82 +3,83 @@

=== tt_um_ccattuto_charmatrix ===

Number of wires: 1932
Number of wire bits: 1967
Number of public wires: 304
Number of public wire bits: 339
Number of wires: 1894
Number of wire bits: 1929
Number of public wires: 300
Number of public wire bits: 335
Number of memories: 0
Number of memory bits: 0
Number of processes: 0
Number of cells: 1948
sky130_fd_sc_hd__a2111o_2 6
sky130_fd_sc_hd__a211o_2 24
sky130_fd_sc_hd__a211oi_2 5
sky130_fd_sc_hd__a21bo_2 2
sky130_fd_sc_hd__a21boi_2 6
sky130_fd_sc_hd__a21o_2 115
sky130_fd_sc_hd__a21oi_2 62
sky130_fd_sc_hd__a221o_2 19
sky130_fd_sc_hd__a22o_2 23
sky130_fd_sc_hd__a22oi_2 1
sky130_fd_sc_hd__a2bb2o_2 5
sky130_fd_sc_hd__a311o_2 14
sky130_fd_sc_hd__a311oi_2 1
sky130_fd_sc_hd__a31o_2 82
sky130_fd_sc_hd__a31oi_2 4
sky130_fd_sc_hd__a32o_2 12
sky130_fd_sc_hd__a41o_2 8
sky130_fd_sc_hd__and2_2 104
sky130_fd_sc_hd__and2b_2 5
sky130_fd_sc_hd__and3_2 127
sky130_fd_sc_hd__and3b_2 23
sky130_fd_sc_hd__and4_2 9
sky130_fd_sc_hd__and4b_2 5
sky130_fd_sc_hd__and4bb_2 1
sky130_fd_sc_hd__buf_1 180
Number of cells: 1910
sky130_fd_sc_hd__a2111o_2 7
sky130_fd_sc_hd__a2111oi_2 1
sky130_fd_sc_hd__a211o_2 26
sky130_fd_sc_hd__a211oi_2 4
sky130_fd_sc_hd__a21bo_2 5
sky130_fd_sc_hd__a21boi_2 1
sky130_fd_sc_hd__a21o_2 94
sky130_fd_sc_hd__a21oi_2 54
sky130_fd_sc_hd__a221o_2 23
sky130_fd_sc_hd__a221oi_2 5
sky130_fd_sc_hd__a22o_2 64
sky130_fd_sc_hd__a22oi_2 2
sky130_fd_sc_hd__a2bb2o_2 8
sky130_fd_sc_hd__a311o_2 6
sky130_fd_sc_hd__a31o_2 79
sky130_fd_sc_hd__a31oi_2 5
sky130_fd_sc_hd__a32o_2 26
sky130_fd_sc_hd__a41o_2 7
sky130_fd_sc_hd__a41oi_2 1
sky130_fd_sc_hd__and2_2 97
sky130_fd_sc_hd__and2b_2 10
sky130_fd_sc_hd__and3_2 113
sky130_fd_sc_hd__and3b_2 24
sky130_fd_sc_hd__and4_2 13
sky130_fd_sc_hd__and4b_2 8
sky130_fd_sc_hd__and4bb_2 3
sky130_fd_sc_hd__buf_1 204
sky130_fd_sc_hd__buf_2 4
sky130_fd_sc_hd__conb_1 20
sky130_fd_sc_hd__dfxtp_2 295
sky130_fd_sc_hd__inv_2 48
sky130_fd_sc_hd__mux2_2 26
sky130_fd_sc_hd__mux4_2 24
sky130_fd_sc_hd__nand2_2 117
sky130_fd_sc_hd__nand2b_2 5
sky130_fd_sc_hd__nand3_2 7
sky130_fd_sc_hd__nand3b_2 4
sky130_fd_sc_hd__nand4_2 1
sky130_fd_sc_hd__nor2_2 120
sky130_fd_sc_hd__nor2b_2 7
sky130_fd_sc_hd__nor3_2 5
sky130_fd_sc_hd__nor3b_2 1
sky130_fd_sc_hd__nor4b_2 1
sky130_fd_sc_hd__o2111a_2 4
sky130_fd_sc_hd__o211a_2 52
sky130_fd_sc_hd__o211ai_2 7
sky130_fd_sc_hd__o21a_2 47
sky130_fd_sc_hd__o21ai_2 55
sky130_fd_sc_hd__o21ba_2 10
sky130_fd_sc_hd__o21bai_2 1
sky130_fd_sc_hd__o221a_2 21
sky130_fd_sc_hd__o221ai_2 1
sky130_fd_sc_hd__o22a_2 24
sky130_fd_sc_hd__dfxtp_2 291
sky130_fd_sc_hd__inv_2 37
sky130_fd_sc_hd__mux2_2 39
sky130_fd_sc_hd__mux4_2 20
sky130_fd_sc_hd__nand2_2 84
sky130_fd_sc_hd__nand2b_2 6
sky130_fd_sc_hd__nand3_2 3
sky130_fd_sc_hd__nand3b_2 3
sky130_fd_sc_hd__nor2_2 100
sky130_fd_sc_hd__nor2b_2 5
sky130_fd_sc_hd__nor3_2 6
sky130_fd_sc_hd__nor3b_2 2
sky130_fd_sc_hd__nor4_2 1
sky130_fd_sc_hd__o2111a_2 5
sky130_fd_sc_hd__o2111ai_2 2
sky130_fd_sc_hd__o211a_2 62
sky130_fd_sc_hd__o211ai_2 1
sky130_fd_sc_hd__o21a_2 41
sky130_fd_sc_hd__o21ai_2 64
sky130_fd_sc_hd__o21ba_2 5
sky130_fd_sc_hd__o21bai_2 2
sky130_fd_sc_hd__o221a_2 11
sky130_fd_sc_hd__o221ai_2 2
sky130_fd_sc_hd__o22a_2 16
sky130_fd_sc_hd__o22ai_2 2
sky130_fd_sc_hd__o2bb2a_2 6
sky130_fd_sc_hd__o311a_2 11
sky130_fd_sc_hd__o31a_2 19
sky130_fd_sc_hd__o31ai_2 1
sky130_fd_sc_hd__o32a_2 11
sky130_fd_sc_hd__o41a_2 3
sky130_fd_sc_hd__o41ai_2 1
sky130_fd_sc_hd__or2_2 44
sky130_fd_sc_hd__or2b_2 6
sky130_fd_sc_hd__or3_2 30
sky130_fd_sc_hd__or3b_2 19
sky130_fd_sc_hd__or4_2 25
sky130_fd_sc_hd__or4b_2 7
sky130_fd_sc_hd__or4bb_2 1
sky130_fd_sc_hd__xnor2_2 8
sky130_fd_sc_hd__xor2_2 4
sky130_fd_sc_hd__o2bb2a_2 4
sky130_fd_sc_hd__o311a_2 14
sky130_fd_sc_hd__o31a_2 13
sky130_fd_sc_hd__o31ai_2 4
sky130_fd_sc_hd__o32a_2 9
sky130_fd_sc_hd__o41a_2 4
sky130_fd_sc_hd__or2_2 46
sky130_fd_sc_hd__or2b_2 10
sky130_fd_sc_hd__or3_2 25
sky130_fd_sc_hd__or3b_2 21
sky130_fd_sc_hd__or4_2 13
sky130_fd_sc_hd__or4b_2 9
sky130_fd_sc_hd__or4bb_2 2
sky130_fd_sc_hd__xnor2_2 7
sky130_fd_sc_hd__xor2_2 5

Chip area for module '\tt_um_ccattuto_charmatrix': 19681.376000
Chip area for module '\tt_um_ccattuto_charmatrix': 19482.435200

Binary file not shown.
37 changes: 19 additions & 18 deletions projects/tt_um_ccattuto_charmatrix/tt_um_ccattuto_charmatrix.lef
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[0]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.213000 ;
ANTENNAGATEAREA 0.159000 ;
PORT
LAYER met4 ;
RECT 147.510 224.760 147.810 225.760 ;
Expand All @@ -85,7 +85,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[1]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.213000 ;
ANTENNAGATEAREA 0.159000 ;
PORT
LAYER met4 ;
RECT 143.830 224.760 144.130 225.760 ;
Expand All @@ -94,7 +94,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[2]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.196500 ;
ANTENNAGATEAREA 0.213000 ;
PORT
LAYER met4 ;
RECT 140.150 224.760 140.450 225.760 ;
Expand All @@ -112,7 +112,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[4]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.126000 ;
ANTENNAGATEAREA 0.213000 ;
PORT
LAYER met4 ;
RECT 132.790 224.760 133.090 225.760 ;
Expand All @@ -121,7 +121,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[5]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.213000 ;
ANTENNAGATEAREA 0.196500 ;
PORT
LAYER met4 ;
RECT 129.110 224.760 129.410 225.760 ;
Expand All @@ -130,6 +130,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[6]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.213000 ;
PORT
LAYER met4 ;
RECT 125.430 224.760 125.730 225.760 ;
Expand All @@ -138,6 +139,7 @@ MACRO tt_um_ccattuto_charmatrix
PIN ui_in[7]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.159000 ;
PORT
LAYER met4 ;
RECT 121.750 224.760 122.050 225.760 ;
Expand Down Expand Up @@ -407,13 +409,12 @@ MACRO tt_um_ccattuto_charmatrix
LAYER li1 ;
RECT 2.760 2.635 158.240 223.125 ;
LAYER met1 ;
RECT 0.070 0.040 160.470 225.040 ;
RECT 1.450 1.060 159.040 224.360 ;
LAYER met2 ;
RECT 0.100 0.010 160.440 225.070 ;
RECT 1.480 1.030 159.010 224.925 ;
LAYER met3 ;
RECT 0.525 0.175 159.030 224.905 ;
RECT 3.285 2.555 159.030 224.905 ;
LAYER met4 ;
RECT 1.215 224.360 3.590 224.905 ;
RECT 4.690 224.360 7.270 224.905 ;
RECT 8.370 224.360 10.950 224.905 ;
RECT 12.050 224.360 14.630 224.905 ;
Expand Down Expand Up @@ -455,15 +456,15 @@ MACRO tt_um_ccattuto_charmatrix
RECT 144.530 224.360 147.110 224.905 ;
RECT 148.210 224.360 150.790 224.905 ;
RECT 151.890 224.360 154.470 224.905 ;
RECT 1.215 223.680 155.185 224.360 ;
RECT 1.215 4.255 20.995 223.680 ;
RECT 23.395 4.255 40.430 223.680 ;
RECT 42.830 4.255 59.865 223.680 ;
RECT 62.265 4.255 79.300 223.680 ;
RECT 81.700 4.255 98.735 223.680 ;
RECT 101.135 4.255 118.170 223.680 ;
RECT 120.570 4.255 137.605 223.680 ;
RECT 140.005 4.255 155.185 223.680 ;
RECT 3.975 223.680 155.185 224.360 ;
RECT 3.975 10.375 20.995 223.680 ;
RECT 23.395 10.375 40.430 223.680 ;
RECT 42.830 10.375 59.865 223.680 ;
RECT 62.265 10.375 79.300 223.680 ;
RECT 81.700 10.375 98.735 223.680 ;
RECT 101.135 10.375 118.170 223.680 ;
RECT 120.570 10.375 137.605 223.680 ;
RECT 140.005 10.375 155.185 223.680 ;
END
END tt_um_ccattuto_charmatrix
END LIBRARY
Expand Down
Loading

0 comments on commit 6965d29

Please sign in to comment.