generated from TinyTapeout/tt09-verilog-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
138 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
# Tiny Tapeout project information | ||
project: | ||
title: "" # Project title | ||
author: "" # Your name | ||
discord: "" # Your discord username, for communication and automatically assigning you a Tapeout role (optional) | ||
description: "" # One line description of what your project does | ||
title: "TinyTapeout 8 Factory Test" # Project title | ||
author: "Tiny Tapeout" # Your name | ||
discord: "" # Your discord username, for communication and automatically assigning you a Tapeout role (optional) | ||
description: "Factory test module" # One line description of what your project does | ||
language: "Verilog" # other examples include SystemVerilog, Amaranth, VHDL, etc | ||
clock_hz: 0 # Clock frequency in Hz (or 0 if not applicable) | ||
|
||
# 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 | ||
|
||
# Your top module name must start with "tt_um_". Make it unique by including your github username: | ||
top_module: "tt_um_example" | ||
top_module: "tt_um_factory_test" | ||
|
||
# List your project's source files here. | ||
# Source files must be in ./src and you must list each source file separately, one per line. | ||
# Don't forget to also update `PROJECT_SOURCES` in test/Makefile. | ||
source_files: | ||
- "project.v" | ||
- "tt_um_factory_test.v" | ||
|
||
# The pinout of your project. Leave unused pins blank. DO NOT delete or add any pins. | ||
pinout: | ||
# Inputs | ||
ui[0]: "" | ||
ui[1]: "" | ||
ui[2]: "" | ||
ui[3]: "" | ||
ui[4]: "" | ||
ui[5]: "" | ||
ui[6]: "" | ||
ui[7]: "" | ||
ui[0]: "sel / in_a[0]" | ||
ui[1]: "in_a[1]" | ||
ui[2]: "in_a[2]" | ||
ui[3]: "in_a[3]" | ||
ui[4]: "in_a[4]" | ||
ui[5]: "in_a[5]" | ||
ui[6]: "in_a[6]" | ||
ui[7]: "in_a[7]" | ||
|
||
# Outputs | ||
uo[0]: "" | ||
uo[1]: "" | ||
uo[2]: "" | ||
uo[3]: "" | ||
uo[4]: "" | ||
uo[5]: "" | ||
uo[6]: "" | ||
uo[7]: "" | ||
uo[0]: "output[0] / counter[0]" | ||
uo[1]: "output[1] / counter[1]" | ||
uo[2]: "output[2] / counter[2]" | ||
uo[3]: "output[3] / counter[3]" | ||
uo[4]: "output[4] / counter[4]" | ||
uo[5]: "output[5] / counter[5]" | ||
uo[6]: "output[6] / counter[6]" | ||
uo[7]: "output[7] / counter[7]" | ||
|
||
# Bidirectional pins | ||
uio[0]: "" | ||
uio[1]: "" | ||
uio[2]: "" | ||
uio[3]: "" | ||
uio[4]: "" | ||
uio[5]: "" | ||
uio[6]: "" | ||
uio[7]: "" | ||
uio[0]: "in_b[0] / counter[0]" | ||
uio[1]: "in_b[1] / counter[1]" | ||
uio[2]: "in_b[2] / counter[2]" | ||
uio[3]: "in_b[3] / counter[3]" | ||
uio[4]: "in_b[4] / counter[4]" | ||
uio[5]: "in_b[5] / counter[5]" | ||
uio[6]: "in_b[6] / counter[6]" | ||
uio[7]: "in_b[7] / counter[7]" | ||
|
||
# Do not change! | ||
yaml_version: 6 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* tt_um_factory_test.v | ||
* | ||
* Test user module | ||
* | ||
* Author: Sylvain Munaut <[email protected]> | ||
*/ | ||
|
||
`default_nettype none | ||
|
||
module tt_um_factory_test ( | ||
input wire [7:0] ui_in, // Dedicated inputs | ||
output wire [7:0] uo_out, // Dedicated outputs | ||
input wire [7:0] uio_in, // IOs: Input path | ||
output wire [7:0] uio_out, // IOs: Output path | ||
output wire [7:0] uio_oe, // IOs: Enable path (active high: 0=input, 1=output) | ||
input wire ena, // always 1 when the design is powered, so you can ignore it | ||
input wire clk, // clock | ||
input wire rst_n // reset_n - low to reset | ||
); | ||
|
||
reg rst_n_i; | ||
reg [7:0] cnt; | ||
|
||
always @(posedge clk or negedge rst_n) | ||
if (~rst_n) rst_n_i <= 1'b0; | ||
else rst_n_i <= 1'b1; | ||
|
||
always @(posedge clk or negedge rst_n_i) | ||
if (~rst_n_i) cnt <= 0; | ||
else cnt <= cnt + 1; | ||
|
||
assign uo_out = ~rst_n ? ui_in : ui_in[0] ? cnt : uio_in; | ||
assign uio_out = ui_in[0] ? cnt : 8'h00; | ||
assign uio_oe = rst_n && ui_in[0] ? 8'hff : 8'h00; | ||
|
||
// avoid linter warning about unused pins: | ||
wire _unused_pins = ena; | ||
|
||
endmodule // tt_um_factory_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters