diff --git a/docs/INFO.md b/docs/INFO.md index a36d0c5..33366db 100644 --- a/docs/INFO.md +++ b/docs/INFO.md @@ -6,10 +6,69 @@ All 250 designs are joined together in a long chain similiar to JTAG. We provide The default is to use an external driver, this is in case anything goes wrong with the Caravel logic analyser or the internal driver. -The scan chain is identical for each little project, and you can [read it here](https://github.com/mattvenn/wokwi-verilog-gds-test/blob/main/template/scan_wrapper.v). +The scan chain is identical for each little project, and you can [read it here](verilog/rtl/scanchain/scanchain.v). ![block diagram](pics/block_diagram.png) +## Scan chain changes since TT02 + +After doing more simulation, we found that the 500 buffers in the scanchain +were distorting the clock pulse to the point where we needed to further slow +the clock. For more information [watch this video](https://youtu.be/eQxAseGVMoo). + +Sylvain 'tnt' Munaut suggested a change to the scanchain that prevents the distortion +and reduces the number of buffers: + +The main change to the `scanchain` block is related to the clocking and the +data output. Previously, you'd have something like this : + + clk_in ---|>----|>---- clk_out + | + '------- Internal FFs + +That is, you had an input buffer receving clock from the previous block and +sending it to all the scan chain FF and to a strong output buffer that would +send it to the next block. + +The issues that were identified there are : + + - 2 buffers per block means 500 buffers in the whole chain and the more + stages, the more delay. + + - The buffers don't have symmetrical rise/fall time. So each buffer would + slightly alter the pulse width. Multiply that by 500 buffers and the shape + at the end of the scan chain would be nowhere close to what was fed in. + +The new block is like this : + + clk_in ---|>o--------- clk_out + | + '-|>o--- Internal FFs + +You have a single inverter that receives the clock and sends it inverted to +the next block. That inverted clock is also fed to another small inverter +whose output will be used to clock all the internal effects. + +The result is that we have half as many stages in the chain of inverter. +And also because the clock is inverted at each stage, any change in duty +cycle that one stage causes on the clock pulses is "undone" by the next. +It's not perfect of course since they are not perfectly match, but it's +MUCH MUCH better. + +Of course this required some other changes to deal with the fact the clock +is inverted at the output. + +The first change is in scanchain block itself. Previously we'd have a negative +edge FF at the output so that the output clock rising edge would happen in +the middle of the output data valid window. Now because the clock is inverted, +this has the same effect by itself. We still need a FF though (else the last +bit of each block would always be reflected to the first bit of the next), but +now it needs to be a rising edge FF. + +The second change is in the scan controller since the drive waveform needs +to be slightly different. Every two stages, a clock pulse is "lost" effectively +and so an extra pulse must be injected to keep moving the data long. + ### Updating inputs and outputs of a specified design A good way to see how this works is to read the FSM in the [scan controller](verilog/rtl/scan_controller/scan_controller.v). @@ -23,11 +82,11 @@ This design connects an inverter between each input and output. * Set scan_select low so that the data is clocked into the scan flops (rather than from the design) * For the next 8 clocks, set scan_data_out to 0, 0, 0, 0, 0, 0, 1, 0 -* Toggle scan_clk_out 16 times to deliver the data to the DUT +* Toggle scan_clk_out 17 times to deliver the data to the DUT (new scanchain needs 1 extra clock for every odd numbered project in the chain) * Toggle scan_latch_en to deliver the data from the scan chain to the DUT * Set scan_select high to set the scan flop's input to be from the DUT * Toggle the scan_clk_out to capture the DUT's data into the scan chain -* Toggle the scan_clk_out another 8 x number of remaining designs to receive the data at scan_data_in +* Toggle the scan_clk_out another 8.5 x number of remaining designs to receive the data at scan_data_in ![update cycle](pics/update_cycle.png) @@ -36,6 +95,7 @@ This design connects an inverter between each input and output. * There are large wait times between the latch and scan signals to ensure no hold violations across the whole chain. For the internal scan controller, these can be configured (see section on wait states below). * The input looks wrong (0x03) because the input is incremented by the test bench as soon as the scan controller captures the data. The input is actually 0x02. * The output in the trace looks wrong (0xFE) because it's updated after a full refresh, the output is 0xFD. +* Generate the trace yourself by running `make test_single` in `verilog/dv/scan_controller`. See [VERIFICATION.md](VERIFICATION.md) for more info on running tests. ## Clocking diff --git a/docs/README_init.md b/docs/README_init.md index 37ccb25..ec6ef77 100644 --- a/docs/README_init.md +++ b/docs/README_init.md @@ -19,7 +19,7 @@ For the most recent automatic build, click the tt_datasheet badge above, then do # GDS layout of all projects -![tiny tapeout](pics/tinytapeout.png) +![tiny tapeout](pics/tinytapeout_numbered.png) # Project Index diff --git a/docs/doc_header.md b/docs/doc_header.md index 0a694bf..d5d2574 100644 --- a/docs/doc_header.md +++ b/docs/doc_header.md @@ -18,7 +18,7 @@ header-includes: # Render of whole chip -![Full GDS](pics/tinytapeout.png) +![Full GDS](pics/tinytapeout_numbered.png) \pagebreak diff --git a/docs/hugo_index_template.md b/docs/hugo_index_template.md index 68b9134..4ce62e8 100644 --- a/docs/hugo_index_template.md +++ b/docs/hugo_index_template.md @@ -1,8 +1,7 @@ --- title: "Tiny Tapeout 03" weight: 20 -description: Overview - +description: 249 designs, closed 24th April 2023 --- {{% toc %}} @@ -17,44 +16,69 @@ description: Overview # Launch stats * Launched: 1 March 2023 -* Submission closes: 24 April 2023 +* Submission closed: 24 April 2023 * Submitted to Efabless 2304C chipIgnite shuttle using Skywater 130nm open source PDK - +* 100 projects submitted, 149 projects added from [TT02](/runs/tt02) +* build time for all projects 22.68 hours +* total cells 79674 +* max cells 1287 for [project 072](./072) +* max utilisation 59.95% for [project 044](./044) +* total wire length 4079353mm +* 94 used Wokwi, 135 Verilog, 1 myhdl, 7 Amaranth, spade 1, xls 2, migen 1, systemverilog 3, mixed radix circuit synthesis (mrcs) 1, chisel 1. +* top 10 tags: + - test : 21 + - experiment: 6 + - cpu : 6 + - timer : 5 + - risc : 5 + - game : 4 + - pwm : 4 + - music : 4 + - counter : 4 # Whole die render ![whole die](images/tinytapeout-03.png) - diff --git a/documentation.py b/documentation.py index 8edc19f..0156fbb 100644 --- a/documentation.py +++ b/documentation.py @@ -119,7 +119,7 @@ class Docs(): index_template = fh.read() # copy image - shutil.copyfile('pics/tinytapeout.png', os.path.join(hugo_images, 'tinytapeout-03.png')) # TODO fix hardcoded run + shutil.copyfile('pics/tinytapeout_numbered.png', os.path.join(hugo_images, 'tinytapeout-03.png')) # TODO fix hardcoded run # index page logging.info("building pages - can take a minute as fetching latest GDS action URLs for all projects")