Skip to content

Commit de1b12e

Browse files
committed
Move sim/ into rtl/sim/
Update all Makefile paths, .gitignore, and README to reflect the new location. Verified all 5 CPU simulation tests still pass. Made-with: Cursor
1 parent 94beacc commit de1b12e

File tree

16 files changed

+25
-24
lines changed

16 files changed

+25
-24
lines changed

.gitignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ firmware/**/imem_init.vh
99
firmware/**/imem_rom.vh
1010
firmware/**/imem_data_rom.vh
1111

12-
# Simulation build artifacts (sim/sw/)
13-
sim/sw/*.elf
14-
sim/sw/*.hex
15-
sim/sw/*.vvp
16-
sim/sw/*.vcd
17-
sim/sw/*.dis
18-
sim/sw/imem.hex
12+
# Simulation build artifacts (rtl/sim/sw/)
13+
rtl/sim/sw/*.elf
14+
rtl/sim/sw/*.hex
15+
rtl/sim/sw/*.vvp
16+
rtl/sim/sw/*.vcd
17+
rtl/sim/sw/*.dis
18+
rtl/sim/sw/imem.hex
1919

2020
# Formal verification generated checks
2121
formal/riscv-formal/cores/nyanrv/checks/

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ help:
3636

3737
.PHONY: sim sim-waves
3838
sim:
39-
$(MAKE) -C sim/sw run
39+
$(MAKE) -C rtl/sim/sw run
4040

4141
sim-waves:
42-
$(MAKE) -C sim/sw waves
42+
$(MAKE) -C rtl/sim/sw waves
4343

4444
# ── Formal verification ───────────────────────────────────────────────────────
4545

@@ -80,4 +80,4 @@ firmware-clean:
8080

8181
.PHONY: clean
8282
clean: board-clean firmware-clean
83-
$(MAKE) -C sim/sw clean
83+
$(MAKE) -C rtl/sim/sw clean

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ NyanSoC/
2626
│ ├── uart/
2727
│ │ ├── uart_tx.v # UART transmitter
2828
│ │ └── uart_rx.v # UART receiver
29-
│ └── gowin/
30-
│ └── sdram_gw2ar.v # SDRAM controller for GW2AR embedded SDRAM
29+
│ ├── gowin/
30+
│ │ └── sdram_gw2ar.v # SDRAM controller for GW2AR embedded SDRAM
31+
│ └── sim/
32+
│ ├── rtl/ # Simulation testbenches
33+
│ └── sw/ # RV32I assembly test suite (iverilog)
3134
├── boards/
3235
│ └── tangnano20k/ # Tang Nano 20K top-level + P&R scripts (only supported board)
3336
├── firmware/
3437
│ ├── blinky/ # LED blink (C)
3538
│ └── hello_world/ # "Hello, World!" over UART (C)
36-
├── formal/
37-
│ ├── nyanrv/ # riscv-formal config and wrapper for nyanrv
38-
│ └── Makefile # Formal verification flow
39-
└── sim/
40-
└── sw/ # RV32I assembly test suite (iverilog)
39+
└── formal/
40+
├── nyanrv/ # riscv-formal config and wrapper for nyanrv
41+
└── Makefile # Formal verification flow
4142
```
4243

4344
## Memory map (Tang Nano 20K SoC)
@@ -88,7 +89,7 @@ make flash
8889

8990
## Simulation tests
9091

91-
The `sim/sw/` test suite assembles RV32I programs with `riscv64-elf-gcc` and
92+
The `rtl/sim/sw/` test suite assembles RV32I programs with `riscv64-elf-gcc` and
9293
runs them under [Icarus Verilog](http://iverilog.icarus.com/):
9394

9495
```sh

sim/Makefile renamed to rtl/sim/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
PROJ_ROOT := ..
1+
PROJ_ROOT := ../..
22
RTL := $(PROJ_ROOT)/rtl
3-
SIM_RTL := $(PROJ_ROOT)/sim/rtl
3+
SIM_RTL := $(PROJ_ROOT)/rtl/sim/rtl
44

55
.PHONY: all run_cpu run_uart clean
66

File renamed without changes.

sim/sw/Makefile renamed to rtl/sim/sw/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##############################################################################
2-
# NyanSoC test suite - sim/sw/Makefile
2+
# NyanSoC test suite - rtl/sim/sw/Makefile
33
#
44
# Usage:
55
# make - build all tests and run them with iverilog
@@ -27,13 +27,13 @@ LDFLAGS := -T link.ld -march=rv32i_zicsr -mabi=ilp32 -nostartfiles -nostdlib \
2727
-Wl,--no-relax
2828

2929
# Simulation sources (relative to repository root)
30-
PROJ_ROOT := ../..
31-
TB := $(PROJ_ROOT)/sim/rtl/nyanrv_tb.v
30+
PROJ_ROOT := ../../..
31+
TB := $(PROJ_ROOT)/rtl/sim/rtl/nyanrv_tb.v
3232
RTL := $(PROJ_ROOT)/rtl/nyanrv.v
3333
ASM_DIR := asm
3434

3535
TESTS := test_alu test_branch test_mem test_jump test_csr
36-
IRQ_TB := $(PROJ_ROOT)/sim/rtl/nyanrv_irq_tb.v
36+
IRQ_TB := $(PROJ_ROOT)/rtl/sim/rtl/nyanrv_irq_tb.v
3737

3838
# Keep intermediate ELF files on build errors for easier debugging
3939
.PRECIOUS: %.elf
File renamed without changes.

0 commit comments

Comments
 (0)