forked from TinyTapeout/tt03-submission-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.yaml
104 lines (83 loc) · 6.37 KB
/
info.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
# TinyTapeout project information
project:
wokwi_id: 357752736742764545 # If using wokwi, set this to your project's ID
# If using an HDL, set wokwi_id as 0 and uncomment and list your source files here.
# Source files must be in ./src and you must list each source file separately
# source_files:
# - counter.v
# - decoder.v
# top_module: "seven_segment_seconds" # put the name of your top module here, make it unique by prepending your github username
# Keep a track of the submission yaml
yaml_version: 3.0
# As everyone will have access to all designs, try to make it easy for someone new to your design to know what
# it does and how to operate it. This info will be automatically collected and used to make a datasheet for the chip.
#
# Here is a great example: https://github.com/davidsiaw/tt02-davidsiaw-stackcalc/blob/38c5647f83aad2aec675d566aa3d67b98f0aac81/info.yaml
documentation:
author: "icegoat9" # Your name
title: "7 Segment Life" # Project title
language: "Wokwi" # other examples include Verilog, Amaranth, VHDL, etc
description: "Simple 7-segment cellular automaton" # Short description of what your project does
# Longer description of how the project works. You can use standard markdown format.
how_it_works: |
This implements a very simple 7-segment [cellular automaton](https://en.wikipedia.org/wiki/Cellular_automaton) from ~200 basic logic gates. At each clock cycle, each of the seven segments is set to "alive" or "dead" based on a simple set of rules:
1. If a segment was "alive" in the previous time step and has exactly one living neighbor, it survives.
2. If a segment was "dead" (or "empty") in the previous time step and has exactly two living neighbors, if becomes alive ("gives birth")
A "neighbor" is any segment it touches, tip to tip. This means that the top and bottom segments only have two neighbors, while the side segments have three neighbors and the center segment has four neighbors.
**Implementation**
See the [Wokwi gate layout and simulation](https://wokwi.com/projects/357752736742764545). At a high level:
* Seven flip-flops hold the cellular automaton's internal state, which is also wired to the seven-segment display.
* Combinatorial logic generates the next state for each segment based on its neighbors.
* When either the system clock or a user-toggled clock input goes high, this new state is latched in to the flip-flips.
* There's minor additional support logic to let the user manually shift in an initial condition and handle clock dividing.
# Instructions on how someone could test your project, include things like what buttons do what and how to set the clock if needed
how_to_test: |
For full details with some examples, see the [github README](https://github.com/icegoat9/tinytapeout03-7seglife) doc link. At a high level, assuming the IC is mounted on the standard tinytapeout PCB which provides dip switches, clock, and a seven-segment display for output:
1. Set all dip switches off, and the clock slide switch to the 'manual' clock side.
2. Power on the system. An arbitrary state may appear on the 7-segment display.
3. Set dip switch 4 on ('run mode').
4. Toggle dip switch 1 on and off to advance the automaton to the next state, you should see the 7-segment display update.
If you want to watch it run automatically (which may quickly settle on an empty state or a static pattern, depending on start state):
1. Set the PCB clock divider to the maximum clock division (255). With a system clock of 6.25kHz, the clock input should now be ~24.5Hz.
2. Set dip switches 5 and 7 on to add an additional 16x clock divider.
3. Set dip switch 4 on.
4. Switch the clock slide switch to the 'system clock' side. The display should advance at roughly 1.5Hz (if I've done math correctly)
5. To run faster or slower, set a combination of dip switches 5 (8x clock divider), 6 (4x divider), and 7 (2x divider)
If you want to load a custom initial state:
1. Set dip switch 4 off ('load mode').
2. Toggle dip switches 2 and/or 3 on and off up to seven times total, to shift in 0 and 1 values to the automaton's internal state (see github README for examples).
3. Set dip switch 4 on and run manually or automatically as above.
**Exercises / puzzles for the reader:**
1. How many unique initial states are there, disregarding equivalent mirrored/rotated states? (there are 2^7 = 128 possible initial states, but many are equivalent)
2. What fraction of these initial states survive? (i.e. don't eventually die out)
3. What fraction settle into a static living pattern vs an infinite cycle between multiple different patterns?
4. What is the longest sequence of unique states a pattern travels through (stop counting once it reaches a previously-visited state, beginning an infinite loop)?
5. What is the longest cycle of unique states that repeats in a loop?
# A description of what the inputs do
inputs:
- clock
- load0
- load1
- runmode
- clockdiv8
- clockdiv4
- clockdiv2
- unused
# A description of what the outputs do
outputs:
- 7segmentA
- 7segmentB
- 7segmentC
- 7segmentD
- 7segmentE
- 7segmentF
- 7segmentG
- 7segmentDP
# The following fields are optional
tag: "animation, puzzle, game" # comma separated list of tags: test encryption, experiment, clock, animation, utility, industrial, pwm, fpga, alu, microprocessor, risc, riscv, sensor, signal generator, fft, filter, music, bcd, sound, serial, timer, random number generator, calculator, decoder, counter, puzzle, multiplier, game, oscillator,
external_hw: "None. Could add debounced momentary pushbuttons in parallel with dip switches 1,2,3 to make loading in new patterns and stepping through a run easier." # Describe any external hardware needed
discord: "icegoat9#3798" # Your discord handle, used for communication and automatically assigning tapeout role after a submission
doc_link: "https://github.com/icegoat9/tinytapeout03-7seglife/blob/main/README.md" # URL to longer form documentation, eg the README.md in your repository
clock_hz: 6250 # Clock frequency in Hz (if required)
picture: "" # relative path to a picture in your repository