Skip to content

"Added FPGA-based Image Processor module" #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ You can also include images in this folder and reference them in the markdown. E

## How it works

Explain how your project works

adds two values and gives the caarry;
## How to test

Explain how to use your project

aaaaaaaasssdddgggh;
## External hardware
no

List external hardware used in your project (e.g. PMOD, LED display, etc), if any
20 changes: 10 additions & 10 deletions info.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# 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: "half adder demo" # Project title
author: "Sabariath" # Your name
discord: "" # Your discord username, for communication and automatically assigning you a Tapeout description: "performs half addition" # 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_addon"

# 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:
source_files:
- "src/image_processor.v"
- "project.v"

# The pinout of your project. Leave unused pins blank. DO NOT delete or add any pins.
# This section is for the datasheet/website. Use descriptive names (e.g., RX, TX, MOSI, SCL, SEG_A, etc.).
pinout:
# Inputs
ui[0]: ""
ui[1]: ""
ui[0]: "a"
ui[1]: "b"
ui[2]: ""
ui[3]: ""
ui[4]: ""
Expand All @@ -33,8 +33,8 @@ pinout:
ui[7]: ""

# Outputs
uo[0]: ""
uo[1]: ""
uo[0]: "sum"
uo[1]: "carry"
uo[2]: ""
uo[3]: ""
uo[4]: ""
Expand Down
7 changes: 5 additions & 2 deletions src/project.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

`default_nettype none

module tt_um_example (
module tt_um_addon (
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
Expand All @@ -17,7 +17,10 @@ module tt_um_example (
);

// All output pins must be assigned. If not used, assign to 0.
assign uo_out = ui_in + uio_in; // Example: ou_out is the sum of ui_in and uio_in
// assign uo_out = ui_in + uio_in; // Example: ou_out is the sum of ui_in and uio_in
assign uo_out[0]=ui_in[0]^ui_in[1];
assign uo_out[1]=ui_in[0]&ui_in[1];
assign uo_out[7:2]=6'b0;
assign uio_out = 0;
assign uio_oe = 0;

Expand Down
2 changes: 1 addition & 1 deletion test/tb.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module tb ();
`endif

// Replace tt_um_example with your module name:
tt_um_example user_project (
tt_um_addon user_project (

// Include power ports for the Gate Level test:
`ifdef GL_TEST
Expand Down
10 changes: 5 additions & 5 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ async def test_project(dut):
await ClockCycles(dut.clk, 10)
dut.rst_n.value = 1

dut._log.info("Test project behavior")
# dut._log.info("Test project behavior")

# Set the input values you want to test
dut.ui_in.value = 20
dut.uio_in.value = 30
# dut.ui_in.value = 20
# dut.uio_in.value = 30

# Wait for one clock cycle to see the output values
await ClockCycles(dut.clk, 1)
#await ClockCycles(dut.clk, 1)

# The following assersion is just an example of how to check the output values.
# Change it to match the actual expected output of your module:
assert dut.uo_out.value == 50
# assert dut.uo_out.value == 50

# Keep testing the module by changing the input values, waiting for
# one or more clock cycles, and asserting the expected output values.