Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
07b55f4
Integrating UART into RISC-V core
marwannismail May 10, 2026
4cea2fe
UART Cocotb testbench intial work
marwannismail May 10, 2026
680b6eb
Removed all simulation commands from UART makefile
marwannismail May 10, 2026
533442e
Standalone UART test bench using Cocotb
marwannismail May 10, 2026
9bac90d
bump librelane
TheDeepestSpace May 26, 2026
cecca5a
bump upstream
TheDeepestSpace May 26, 2026
a24b6dc
agressively fix antenna violations
TheDeepestSpace May 26, 2026
4f3bf09
skip dbg_* signals for uart for now
TheDeepestSpace May 26, 2026
1fc09c0
bump upstream again
TheDeepestSpace May 26, 2026
d6340de
ci dbg
TheDeepestSpace May 26, 2026
1b55ab6
ci hack
TheDeepestSpace May 26, 2026
7d4c8d3
temporarily stop running tests
TheDeepestSpace May 26, 2026
043a59e
bump upstream again
TheDeepestSpace May 26, 2026
4cd1554
temporarily skip gltest
TheDeepestSpace May 26, 2026
e15516c
use verilator for cocotb test and bring latest version from oss cad s…
TheDeepestSpace May 29, 2026
8ae80e4
bring back dbg_regs for now
TheDeepestSpace May 30, 2026
b69e833
bump upstream
TheDeepestSpace May 30, 2026
bac2c79
make tests work
TheDeepestSpace May 30, 2026
959cbf6
udpate tests a bit
TheDeepestSpace May 30, 2026
48bd0d1
bring back tests in ci
TheDeepestSpace May 30, 2026
17d9670
bump upstream
TheDeepestSpace May 30, 2026
36a4606
use oss cad suite docker image as base for test workflow + remove icarus
TheDeepestSpace May 31, 2026
eea9253
fix git missing from oss-cad-suite image
TheDeepestSpace May 31, 2026
a20109c
use devcontainer as the base imagefor test workflow
TheDeepestSpace May 31, 2026
d3cab35
fix dispatch for test workflow
TheDeepestSpace May 31, 2026
15f63bf
make gds workflow also use devcontainer
TheDeepestSpace May 31, 2026
8b294c2
bring back gl test
TheDeepestSpace May 31, 2026
36c45a6
stip trying to setup python explicitly in test workflow
TheDeepestSpace May 31, 2026
8c4de61
stop using container for gds action
TheDeepestSpace May 31, 2026
d067cb0
debug: reg file check
TheDeepestSpace May 31, 2026
cc66b45
attempting to fix missing regfile issue with sv2v
TheDeepestSpace May 31, 2026
d622073
not using dbg_reg now
RunzeZhu28 May 31, 2026
0c8a7aa
remove and gitignore venv folder
TheDeepestSpace Jun 3, 2026
14627ec
Fixed inverted reset which was failing past tests (not fault of uart …
Parzival129 Jun 4, 2026
efc1c72
update submodule
RunzeZhu28 Jun 5, 2026
dcb8fe3
Merge branch 'uart_new' into mi_uart_integration
TheDeepestSpace Jun 5, 2026
7bf7abb
Merge remote-tracking branch 'origin/uart_new' into mi_uart_integration
TheDeepestSpace Jun 5, 2026
5cca0ee
switch back to ssh based submodule
TheDeepestSpace Jun 5, 2026
c300508
Merge branch 'main' into mi_uart_integration
TheDeepestSpace Jun 5, 2026
3df07d1
fix gl tests
TheDeepestSpace Jun 7, 2026
412be9d
manual gltest action
TheDeepestSpace Jun 7, 2026
2df1a6b
fixing gl action
TheDeepestSpace Jun 7, 2026
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
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ARG VARIANT=ubuntu-22.04

FROM ghcr.io/utoss/oss-cad-suite:latest AS oss-cad-suite

FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}

ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -42,3 +45,8 @@ RUN mkdir /tmp/sv2v && \

# Install LibreLane (pinned to latest known stable)
RUN pip3 install librelane==3.0.3

# Copy OSS CAD Suite installation from prebuilt image
COPY --from=oss-cad-suite /opt/oss-cad-suite /opt/oss-cad-suite
COPY --from=oss-cad-suite /etc/profile.d/oss-cad-suite.sh /etc/profile.d/oss-cad-suite.sh
ENV PATH="/opt/oss-cad-suite/bin:${PATH}"
83 changes: 83 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Docker image build template workflow

on:
workflow_call:
inputs:
image-name:
required: true
type: string
dockerfile:
required: true
type: string
tag-prefix:
required: false
type: string
default: ""
outputs:
image-tag:
description: Built image tags
value: ${{ jobs.build.outputs.image-tag }}
image-primary-tag:
description: Primary image tag
value: ${{ jobs.build.outputs.image-primary-tag }}

jobs:
build:
timeout-minutes: 30
runs-on: ubuntu-latest
outputs:
image-tag: ${{ steps.meta.outputs.tags }}
image-primary-tag: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
image-digest: ${{ steps.build.outputs.digest }}

steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo apt-get clean
docker system prune -af --volumes
echo "Available space after cleanup:"
df -h

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.image-name }}
tags: |
type=ref,event=branch,prefix=${{ inputs.tag-prefix }}branch-
type=ref,event=pr,prefix=${{ inputs.tag-prefix }}pr-
type=raw,value=latest,prefix=#${{ inputs.tag-prefix }},enable={{is_default_branch}}

- name: Build and push Docker image
id: build
uses: docker/build-push-action@v5
with:
context: .
file: ${{ inputs.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: |
type=gha
type=registry,ref=${{ inputs.image-name }}:buildcache
cache-to: |
type=gha,mode=max
type=registry,ref=${{ inputs.image-name }}:buildcache,mode=max
38 changes: 36 additions & 2 deletions .github/workflows/gds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
- name: sv2v
run: make sv2v

- name: check file
run: ls -la src/utoss-risc-v/src/Instruction_Decode

- name: Build GDS
uses: TinyTapeout/tt-gds-action@ttgf26a
with:
Expand All @@ -77,14 +80,45 @@ jobs:
gl_test:
needs: gds
runs-on: ubuntu-24.04
container:
image: ghcr.io/utoss/risc-v-ttgf-devcontainer:latest
steps:
- name: checkout repo
uses: actions/checkout@v6
with:
submodules: recursive

- name: GL test
uses: TinyTapeout/tt-gds-action/gl_test@ttgf26a
- name: Download GDS artifact
uses: actions/download-artifact@v7
with:
name: tt_submission

- name: Enable PDK
shell: bash
env:
PDK_ROOT: /home/runner/pdk
PDK_VERSION: 54435919abffb937387ec956209f9cf5fd2dfbee
run: |
python3 -m ciel enable --pdk-family gf180mcu --pdk-root "$PDK_ROOT" "$PDK_VERSION"

- name: Run GL test
shell: bash
env:
PDK_ROOT: /home/runner/pdk
run: |
cp tt_submission/*.v test/gate_level_netlist.v
cd test
rm -f tb_gl.vcd tb.fst gl_test.log simv_gl
bash run_gl_icarus.sh

- name: Upload Waveform and Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: gatelevel_test_results
path: |
test/tb_gl.vcd
test/gl_test.log

viewer:
needs: gds
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: setup

on:
push:
branches: [main]
pull_request:
workflow_dispatch: {}

permissions:
contents: read
packages: write

jobs:
build_devcontainer_image:
# do this during a push to a branch (e.g. to main) or on a non-fork PR
if: >
github.event_name == 'push' ||
(github.event.pull_request != null && github.event.pull_request.head.repo.full_name == github.repository)
uses: ./.github/workflows/docker-image.yml
with:
image-name: ghcr.io/utoss/risc-v-ttgf-devcontainer
dockerfile: .devcontainer/Dockerfile
tag-prefix: ""
secrets: inherit
24 changes: 10 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
name: test
on: [push, workflow_dispatch]
on:
push:
branches:
- main
pull_request:
types: [opened, labeled, synchronize]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-24.04
container:
image: ghcr.io/utoss/risc-v-ttgf-devcontainer:latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
submodules: recursive

- name: Install iverilog
shell: bash
run: sudo apt-get update && sudo apt-get install -y iverilog

# Set Python up and install cocotb
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: '3.11'

- name: Install Python packages
shell: bash
run: pip install -r test/requirements.txt

- name: Install sv2v
uses: ./.github/actions/install-sv2v

- name: sv2v
run: make sv2v

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ test/__pycache__/
test/results.xml
test/gate_level_netlist.v
tt
.venv/
30 changes: 27 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Convert SystemVerilog (.sv) files to Verilog (.v) using sv2v

SV_FILES := $(shell find src/ -follow -name "*.sv" -type f 2>/dev/null | grep -v '/src/src')
# SV_FILES := $(shell find src/ -follow -name "*.sv" -type f 2>/dev/null | grep -v '/src/src')
SV_FILES := \
src/tt_um_utoss_riscv.sv \
src/MA.sv \
src/utoss-risc-v/src/ALU_ALUdecoder/ALU.sv \
src/utoss-risc-v/src/ALU_ALUdecoder/ALUdecoder.sv \
src/utoss-risc-v/src/ControlFSM.sv \
src/utoss-risc-v/src/fetch.sv \
src/utoss-risc-v/src/Instruction_Decode/Instruction_Decode.sv \
src/utoss-risc-v/src/Instruction_Decode/MemoryLoader.sv \
src/utoss-risc-v/src/Instruction_Decode/RegisterFile.sv \
src/utoss-risc-v/src/uart_bus_master.sv \
src/utoss-risc-v/src/uart_rx.sv \
src/utoss-risc-v/src/uart_tx.sv \
src/utoss-risc-v/src/uart.sv \
src/utoss-risc-v/src/utoss_riscv.sv
INCLUDE_FLAGS := -I src/utoss-risc-v/
DEFINE_FLAGS := -DUTOSS_RISCV_HARDENING
V_FILES := $(SV_FILES:.sv=.sv2v.v)
Expand All @@ -12,10 +27,19 @@ sv2v:
@sv2v $(INCLUDE_FLAGS) $(DEFINE_FLAGS) $(SV_FILES) -w .sv2v_temp
@for svfile in $(SV_FILES); do \
module_name=$$(basename "$$svfile" .sv); \
if [ -f ".sv2v_temp/$$module_name.v" ]; then \
mv ".sv2v_temp/$$module_name.v" "$$(dirname "$$svfile")/$$module_name.sv2v.v"; \
generated_file=$$(find .sv2v_temp -maxdepth 1 -type f -iname "$$module_name.v" | head -n 1); \
if [ -n "$$generated_file" ]; then \
mv "$$generated_file" "$$(dirname "$$svfile")/$$module_name.sv2v.v"; \
fi; \
done
@missing=0; \
for relpath in $$(sed -n 's/^[[:space:]]*-[[:space:]]*"\(.*\.sv2v\.v\)".*/\1/p' info.yaml); do \
if [ ! -f "src/$$relpath" ]; then \
echo "ERROR: Expected generated file missing: src/$$relpath" >&2; \
missing=1; \
fi; \
done; \
test $$missing -eq 0
@rm -rf .sv2v_temp

tt: sv2v
Expand Down
6 changes: 5 additions & 1 deletion info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ project:
- "utoss-risc-v/src/fetch.sv2v.v"
- "utoss-risc-v/src/Instruction_Decode/Instruction_Decode.sv2v.v"
- "utoss-risc-v/src/Instruction_Decode/MemoryLoader.sv2v.v"
- "utoss-risc-v/src/Instruction_Decode/registerFile.v"
- "utoss-risc-v/src/Instruction_Decode/RegisterFile.sv2v.v"
- "utoss-risc-v/src/uart_bus_master.sv2v.v"
- "utoss-risc-v/src/uart_rx.sv2v.v"
- "utoss-risc-v/src/uart_tx.sv2v.v"
- "utoss-risc-v/src/uart.sv2v.v"
- "utoss-risc-v/src/utoss_riscv.sv2v.v"

# The pinout of your project. Leave unused pins blank. DO NOT delete or add any pins.
Expand Down
6 changes: 5 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"//": "CLOCK_PERIOD - Increase this in case you are getting setup time violations.",
"//": "The value is in nanoseconds, so 20ns == 50MHz.",
"CLOCK_PERIOD": 40,
"CLOCK_PERIOD": 100,

"//": "Hold slack margin - Increase them in case you are getting hold violations.",
"PL_RESIZER_HOLD_SLACK_MARGIN": 0.1,
Expand All @@ -37,6 +37,10 @@
"VERILOG_INCLUDE_DIRS": ["src/utoss-risc-v"],
"VERILOG_DEFINES": ["UTOSS_RISCV_HARDENING"],

"//": "Attempt to fix attennas more agressively",
"GRT_ANTENNA_ITERS": 20,
"DIODE_PADDING": 20,

Comment on lines +40 to +43

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure we need these, i have not tried running hardening without this after the version bump

"//": "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
"//": "!!! DO NOT CHANGE ANYTHING BELOW THIS POINT !!!",
"//": "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
Expand Down
Loading
Loading