Skip to content

Commit

Permalink
feat: update project tt_um_28add11_QOAdecode from 28add11/tt07_qoa_de…
Browse files Browse the repository at this point in the history
…code

Commit: fb54f127c521d3be21030f070f5ee0641fc13689
Workflow: https://github.com/28add11/tt07_qoa_decode/actions/runs/9308561102
  • Loading branch information
TinyTapeoutBot authored and urish committed May 30, 2024
1 parent 5ee73a3 commit abef2eb
Show file tree
Hide file tree
Showing 8 changed files with 11,563 additions and 11,319 deletions.
6 changes: 3 additions & 3 deletions projects/tt_um_28add11_QOAdecode/commit_id.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"app": "Tiny Tapeout tt07 98e94823",
"app": "Tiny Tapeout tt07 11b2d371",
"repo": "https://github.com/28add11/tt07_qoa_decode",
"commit": "41eed3cce2c4e67e4f0c2080cd902e072e1b4931",
"workflow_url": "https://github.com/28add11/tt07_qoa_decode/actions/runs/9259672360",
"commit": "fb54f127c521d3be21030f070f5ee0641fc13689",
"workflow_url": "https://github.com/28add11/tt07_qoa_decode/actions/runs/9308561102",
"sort_id": 1716848861892,
"openlane_version": "OpenLane2 2.0.7",
"pdk_version": "open_pdks bdc9412b3e468c102d01b7cf6337be06ec6e9c9a"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions projects/tt_um_28add11_QOAdecode/docs/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ You can also include images in this folder and reference them in the markdown. E

This chip decoded the QOA audio format, which is designed to be a simple, portable format for 16 bit PCM audio data. The specification is one page, and is availible at [qoaformat.org](https://qoaformat.org/). The chip communicates through an SPI slave mode 0 interface to a controller chip, which handles the file interface and all adjecent functions. The chip only handles decoding samples into their 16 bit uncompressed versions.

### Block diagram

![A diagram showing the internal structure of the chip](28add11_QOAdecode_whole.jpg)

The chip itself consists of two main parts, an SPI interface for communication, and the decoder itself. The decoder contains a parser for the SPI data, the LMS predictor/updater at the heart of the QOA format, and the history/weights for the LMS predictor.
For die area savings, we use a sequential multiplier in the LMS predictor, and save on the expensive dequantizing computations by using a precalculated table in the [reference code on Github](https://github.com/phoboslab/qoa). This ROM also takes half the size of that in the original code, because half of the values are just their negative counterpart so we just flip the sign.

## How to test

Connect the chip to a mode 0 SPI master, with a clock rate at least 6x slower than the chip clock. Then, fill the LMS history and weights, by using the following instruction:
Expand All @@ -26,15 +33,15 @@ If you want to then send a sample, the following instruction is used:

qr and sf_quant are exactly as they are in the QOA specification, with this chip decoding sample by sample.

After sending the sample, wait (NUMBER) chip clock cycles, then request the sample with the following instruction:
After sending the sample, wait 40 chip clock cycles, then request the sample with the following instruction:
| bit[7] | bit[6] | bit[5] | bit[4] | bit[3] | bit[2] | bit[1] | bit[0] |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| 1 | | | | | | | 0 |

Once you send that instruction, the next two bytes sent by the chip will be the decoded sample, MSB first.
While you are reciving the sample, you can send any data, but it will be ignored. The chip will send gibberish data when the instruction is not used.
While you are reciving the sample, you can send any data, but it will be ignored. The chip will send unknown data when the instruction is not used.

Eventually I will get arould to writing firmware on my Github, please look back there for updates.
Eventually I will get arould to writing code for the interface on [my Github](https://github.com/28add11), please look back there for updates.

## External hardware

Expand Down
220 changes: 110 additions & 110 deletions projects/tt_um_28add11_QOAdecode/stats/metrics.csv

Large diffs are not rendered by default.

123 changes: 62 additions & 61 deletions projects/tt_um_28add11_QOAdecode/stats/synthesis-stats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,77 @@

=== tt_um_28add11_QOAdecode ===

Number of wires: 2528
Number of wire bits: 2563
Number of public wires: 376
Number of public wire bits: 411
Number of wires: 2514
Number of wire bits: 2549
Number of public wires: 367
Number of public wire bits: 402
Number of memories: 0
Number of memory bits: 0
Number of processes: 0
Number of cells: 2544
sky130_fd_sc_hd__a2111o_2 2
sky130_fd_sc_hd__a211o_2 24
sky130_fd_sc_hd__a211oi_2 3
sky130_fd_sc_hd__a21bo_2 15
sky130_fd_sc_hd__a21boi_2 4
sky130_fd_sc_hd__a21o_2 117
sky130_fd_sc_hd__a21oi_2 88
sky130_fd_sc_hd__a221o_2 103
sky130_fd_sc_hd__a221oi_2 1
sky130_fd_sc_hd__a22o_2 68
sky130_fd_sc_hd__a22oi_2 5
Number of cells: 2530
sky130_fd_sc_hd__a2111o_2 1
sky130_fd_sc_hd__a2111oi_2 2
sky130_fd_sc_hd__a211o_2 21
sky130_fd_sc_hd__a211oi_2 2
sky130_fd_sc_hd__a21bo_2 19
sky130_fd_sc_hd__a21boi_2 9
sky130_fd_sc_hd__a21o_2 128
sky130_fd_sc_hd__a21oi_2 86
sky130_fd_sc_hd__a221o_2 97
sky130_fd_sc_hd__a22o_2 56
sky130_fd_sc_hd__a22oi_2 2
sky130_fd_sc_hd__a2bb2o_2 4
sky130_fd_sc_hd__a311o_2 4
sky130_fd_sc_hd__a311oi_2 2
sky130_fd_sc_hd__a31o_2 75
sky130_fd_sc_hd__a31oi_2 5
sky130_fd_sc_hd__a32o_2 56
sky130_fd_sc_hd__a41o_2 2
sky130_fd_sc_hd__and2_2 122
sky130_fd_sc_hd__and2b_2 49
sky130_fd_sc_hd__and3_2 90
sky130_fd_sc_hd__and3b_2 6
sky130_fd_sc_hd__and4_2 4
sky130_fd_sc_hd__a311o_2 6
sky130_fd_sc_hd__a311oi_2 1
sky130_fd_sc_hd__a31o_2 69
sky130_fd_sc_hd__a31oi_2 9
sky130_fd_sc_hd__a32o_2 65
sky130_fd_sc_hd__a41o_2 6
sky130_fd_sc_hd__a41oi_2 1
sky130_fd_sc_hd__and2_2 134
sky130_fd_sc_hd__and2b_2 42
sky130_fd_sc_hd__and3_2 81
sky130_fd_sc_hd__and3b_2 8
sky130_fd_sc_hd__and4_2 3
sky130_fd_sc_hd__and4b_2 1
sky130_fd_sc_hd__and4bb_2 1
sky130_fd_sc_hd__buf_2 23
sky130_fd_sc_hd__dfrtp_2 19
sky130_fd_sc_hd__dfxtp_2 351
sky130_fd_sc_hd__inv_2 82
sky130_fd_sc_hd__mux2_1 89
sky130_fd_sc_hd__mux4_2 45
sky130_fd_sc_hd__nand2_2 213
sky130_fd_sc_hd__nand2b_2 26
sky130_fd_sc_hd__nand3_2 43
sky130_fd_sc_hd__nand3b_2 2
sky130_fd_sc_hd__nand4_2 1
sky130_fd_sc_hd__nor2_2 170
sky130_fd_sc_hd__nor3_2 5
sky130_fd_sc_hd__nor3b_2 2
sky130_fd_sc_hd__nor4_2 1
sky130_fd_sc_hd__o2111a_2 1
sky130_fd_sc_hd__o2111ai_2 1
sky130_fd_sc_hd__o211a_2 55
sky130_fd_sc_hd__o211ai_2 6
sky130_fd_sc_hd__o21a_2 55
sky130_fd_sc_hd__o21ai_2 59
sky130_fd_sc_hd__o21ba_2 12
sky130_fd_sc_hd__o21bai_2 3
sky130_fd_sc_hd__o221a_2 44
sky130_fd_sc_hd__o22a_2 9
sky130_fd_sc_hd__o2bb2a_2 8
sky130_fd_sc_hd__o311a_2 7
sky130_fd_sc_hd__o311ai_2 1
sky130_fd_sc_hd__o31a_2 7
sky130_fd_sc_hd__dfxtp_2 342
sky130_fd_sc_hd__inv_2 80
sky130_fd_sc_hd__mux2_1 108
sky130_fd_sc_hd__mux4_2 46
sky130_fd_sc_hd__nand2_2 229
sky130_fd_sc_hd__nand2b_2 20
sky130_fd_sc_hd__nand3_2 61
sky130_fd_sc_hd__nand3b_2 1
sky130_fd_sc_hd__nand4_2 2
sky130_fd_sc_hd__nor2_2 172
sky130_fd_sc_hd__nor3_2 11
sky130_fd_sc_hd__o2111a_2 3
sky130_fd_sc_hd__o211a_2 45
sky130_fd_sc_hd__o211ai_2 4
sky130_fd_sc_hd__o21a_2 36
sky130_fd_sc_hd__o21ai_2 53
sky130_fd_sc_hd__o21ba_2 7
sky130_fd_sc_hd__o21bai_2 10
sky130_fd_sc_hd__o221a_2 47
sky130_fd_sc_hd__o22a_2 4
sky130_fd_sc_hd__o2bb2a_2 5
sky130_fd_sc_hd__o311a_2 4
sky130_fd_sc_hd__o311ai_2 3
sky130_fd_sc_hd__o31a_2 5
sky130_fd_sc_hd__o31ai_2 15
sky130_fd_sc_hd__o32a_2 3
sky130_fd_sc_hd__or2_2 170
sky130_fd_sc_hd__or3_2 38
sky130_fd_sc_hd__o32a_2 1
sky130_fd_sc_hd__o41a_2 2
sky130_fd_sc_hd__or2_2 171
sky130_fd_sc_hd__or3_2 33
sky130_fd_sc_hd__or3b_2 16
sky130_fd_sc_hd__or4_2 9
sky130_fd_sc_hd__or4b_2 6
sky130_fd_sc_hd__xnor2_2 72
sky130_fd_sc_hd__xor2_2 25
sky130_fd_sc_hd__or4b_2 4
sky130_fd_sc_hd__or4bb_2 1
sky130_fd_sc_hd__xnor2_2 65
sky130_fd_sc_hd__xor2_2 19

Chip area for module '\tt_um_28add11_QOAdecode': 27491.366400
Chip area for module '\tt_um_28add11_QOAdecode': 27228.614400

Binary file modified projects/tt_um_28add11_QOAdecode/tt_um_28add11_QOAdecode.gds
Binary file not shown.
140 changes: 91 additions & 49 deletions projects/tt_um_28add11_QOAdecode/tt_um_28add11_QOAdecode.lef
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ MACRO tt_um_28add11_QOAdecode
PIN uio_in[0]
DIRECTION INPUT ;
USE SIGNAL ;
ANTENNAGATEAREA 0.196500 ;
ANTENNAGATEAREA 0.213000 ;
PORT
LAYER met4 ;
RECT 118.070 224.760 118.370 225.760 ;
Expand Down Expand Up @@ -397,60 +397,102 @@ MACRO tt_um_28add11_QOAdecode
END
END uo_out[7]
OBS
LAYER nwell ;
RECT 2.570 221.625 158.430 223.230 ;
RECT 2.570 216.185 158.430 219.015 ;
RECT 2.570 210.745 158.430 213.575 ;
RECT 2.570 205.305 158.430 208.135 ;
RECT 2.570 199.865 158.430 202.695 ;
RECT 2.570 194.425 158.430 197.255 ;
RECT 2.570 188.985 158.430 191.815 ;
RECT 2.570 183.545 158.430 186.375 ;
RECT 2.570 178.105 158.430 180.935 ;
RECT 2.570 172.665 158.430 175.495 ;
RECT 2.570 167.225 158.430 170.055 ;
RECT 2.570 161.785 158.430 164.615 ;
RECT 2.570 156.345 158.430 159.175 ;
RECT 2.570 150.905 158.430 153.735 ;
RECT 2.570 145.465 158.430 148.295 ;
RECT 2.570 140.025 158.430 142.855 ;
RECT 2.570 134.585 158.430 137.415 ;
RECT 2.570 129.145 158.430 131.975 ;
RECT 2.570 123.705 158.430 126.535 ;
RECT 2.570 118.265 158.430 121.095 ;
RECT 2.570 112.825 158.430 115.655 ;
RECT 2.570 107.385 158.430 110.215 ;
RECT 2.570 101.945 158.430 104.775 ;
RECT 2.570 96.505 158.430 99.335 ;
RECT 2.570 91.065 158.430 93.895 ;
RECT 2.570 85.625 158.430 88.455 ;
RECT 2.570 80.185 158.430 83.015 ;
RECT 2.570 74.745 158.430 77.575 ;
RECT 2.570 69.305 158.430 72.135 ;
RECT 2.570 63.865 158.430 66.695 ;
RECT 2.570 58.425 158.430 61.255 ;
RECT 2.570 52.985 158.430 55.815 ;
RECT 2.570 47.545 158.430 50.375 ;
RECT 2.570 42.105 158.430 44.935 ;
RECT 2.570 36.665 158.430 39.495 ;
RECT 2.570 31.225 158.430 34.055 ;
RECT 2.570 25.785 158.430 28.615 ;
RECT 2.570 20.345 158.430 23.175 ;
RECT 2.570 14.905 158.430 17.735 ;
RECT 2.570 9.465 158.430 12.295 ;
RECT 2.570 4.025 158.430 6.855 ;
LAYER li1 ;
RECT 2.760 2.635 158.240 223.125 ;
LAYER met1 ;
RECT 2.460 2.480 160.010 223.280 ;
RECT 2.760 1.740 160.930 223.280 ;
LAYER met2 ;
RECT 3.780 2.535 159.980 224.925 ;
RECT 4.230 1.710 160.900 224.245 ;
LAYER met3 ;
RECT 3.950 2.555 156.795 224.905 ;
LAYER met4 ;
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 ;
RECT 15.730 224.360 18.310 224.905 ;
RECT 19.410 224.360 21.990 224.905 ;
RECT 23.090 224.360 25.670 224.905 ;
RECT 26.770 224.360 29.350 224.905 ;
RECT 30.450 224.360 33.030 224.905 ;
RECT 34.130 224.360 36.710 224.905 ;
RECT 37.810 224.360 40.390 224.905 ;
RECT 41.490 224.360 44.070 224.905 ;
RECT 45.170 224.360 47.750 224.905 ;
RECT 48.850 224.360 51.430 224.905 ;
RECT 52.530 224.360 55.110 224.905 ;
RECT 56.210 224.360 58.790 224.905 ;
RECT 59.890 224.360 62.470 224.905 ;
RECT 63.570 224.360 66.150 224.905 ;
RECT 67.250 224.360 69.830 224.905 ;
RECT 70.930 224.360 73.510 224.905 ;
RECT 74.610 224.360 77.190 224.905 ;
RECT 78.290 224.360 80.870 224.905 ;
RECT 81.970 224.360 84.550 224.905 ;
RECT 85.650 224.360 88.230 224.905 ;
RECT 89.330 224.360 91.910 224.905 ;
RECT 93.010 224.360 95.590 224.905 ;
RECT 96.690 224.360 99.270 224.905 ;
RECT 100.370 224.360 102.950 224.905 ;
RECT 104.050 224.360 106.630 224.905 ;
RECT 107.730 224.360 110.310 224.905 ;
RECT 111.410 224.360 113.990 224.905 ;
RECT 115.090 224.360 117.670 224.905 ;
RECT 118.770 224.360 121.350 224.905 ;
RECT 122.450 224.360 125.030 224.905 ;
RECT 126.130 224.360 128.710 224.905 ;
RECT 129.810 224.360 132.390 224.905 ;
RECT 133.490 224.360 136.070 224.905 ;
RECT 137.170 224.360 139.750 224.905 ;
RECT 140.850 224.360 143.430 224.905 ;
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 3.950 2.555 156.795 224.225 ;
LAYER met4 ;
RECT 4.690 224.360 7.270 224.760 ;
RECT 8.370 224.360 10.950 224.760 ;
RECT 12.050 224.360 14.630 224.760 ;
RECT 15.730 224.360 18.310 224.760 ;
RECT 19.410 224.360 21.990 224.760 ;
RECT 23.090 224.360 25.670 224.760 ;
RECT 26.770 224.360 29.350 224.760 ;
RECT 30.450 224.360 33.030 224.760 ;
RECT 34.130 224.360 36.710 224.760 ;
RECT 37.810 224.360 40.390 224.760 ;
RECT 41.490 224.360 44.070 224.760 ;
RECT 45.170 224.360 47.750 224.760 ;
RECT 48.850 224.360 51.430 224.760 ;
RECT 52.530 224.360 55.110 224.760 ;
RECT 56.210 224.360 58.790 224.760 ;
RECT 59.890 224.360 62.470 224.760 ;
RECT 63.570 224.360 66.150 224.760 ;
RECT 67.250 224.360 69.830 224.760 ;
RECT 70.930 224.360 73.510 224.760 ;
RECT 74.610 224.360 77.190 224.760 ;
RECT 78.290 224.360 80.870 224.760 ;
RECT 81.970 224.360 84.550 224.760 ;
RECT 85.650 224.360 88.230 224.760 ;
RECT 89.330 224.360 91.910 224.760 ;
RECT 93.010 224.360 95.590 224.760 ;
RECT 96.690 224.360 99.270 224.760 ;
RECT 100.370 224.360 102.950 224.760 ;
RECT 104.050 224.360 106.630 224.760 ;
RECT 107.730 224.360 110.310 224.760 ;
RECT 111.410 224.360 113.990 224.760 ;
RECT 115.090 224.360 117.670 224.760 ;
RECT 118.770 224.360 121.350 224.760 ;
RECT 122.450 224.360 125.030 224.760 ;
RECT 126.130 224.360 128.710 224.760 ;
RECT 129.810 224.360 132.390 224.760 ;
RECT 133.490 224.360 136.070 224.760 ;
RECT 137.170 224.360 139.750 224.760 ;
RECT 140.850 224.360 143.430 224.760 ;
RECT 144.530 224.360 147.110 224.760 ;
RECT 148.210 224.360 150.790 224.760 ;
RECT 151.890 224.360 154.470 224.760 ;
RECT 3.975 223.680 155.185 224.360 ;
RECT 3.975 6.975 17.880 223.680 ;
RECT 20.280 6.975 21.180 223.680 ;
RECT 23.580 6.975 155.185 223.680 ;
RECT 3.975 13.095 17.880 223.680 ;
RECT 20.280 13.095 21.180 223.680 ;
RECT 23.580 13.095 155.185 223.680 ;
END
END tt_um_28add11_QOAdecode
END LIBRARY
Expand Down
Loading

0 comments on commit abef2eb

Please sign in to comment.