-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.76 KB
/
sim.yml
File metadata and controls
53 lines (46 loc) · 1.76 KB
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
name: RTL Simulation
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
simulate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Icarus Verilog
run: sudo apt-get update && sudo apt-get install -y iverilog
- name: Compile pipeline testbench
run: |
iverilog -g2012 -o sim_pipeline \
rtl/pkg_riscv.sv \
rtl/pc.sv rtl/alu.sv rtl/mdu.sv rtl/csr_unit.sv \
rtl/branch_unit.sv rtl/branch_predictor.sv \
rtl/control.sv rtl/imm_gen.sv rtl/regfile.sv \
rtl/forwarding_unit.sv rtl/hazard_unit.sv \
rtl/imem.sv rtl/icache.sv rtl/dmem.sv \
rtl/pipe_if_id.sv rtl/pipe_id_ex.sv \
rtl/pipe_ex_mem.sv rtl/pipe_mem_wb.sv \
rtl/rv32i_pipeline_top.sv \
tb/rv32i_pipeline_tb.sv
- name: Run pipeline test (sum 1-to-10)
run: vvp sim_pipeline
- name: Compile comprehensive testbench
run: |
iverilog -g2012 -o sim_comprehensive \
rtl/pkg_riscv.sv \
rtl/pc.sv rtl/alu.sv rtl/mdu.sv rtl/csr_unit.sv \
rtl/branch_unit.sv rtl/branch_predictor.sv \
rtl/control.sv rtl/imm_gen.sv rtl/regfile.sv \
rtl/forwarding_unit.sv rtl/hazard_unit.sv \
rtl/imem.sv rtl/icache.sv rtl/dmem.sv \
rtl/pipe_if_id.sv rtl/pipe_id_ex.sv \
rtl/pipe_ex_mem.sv rtl/pipe_mem_wb.sv \
rtl/rv32i_pipeline_top.sv \
tb/rv32i_comprehensive_tb.sv
- name: Run comprehensive test (M-ext, CSR, traps, hazards)
run: |
cp programs/asm/test_comprehensive.hex .
vvp sim_comprehensive | tee results.txt
grep -q "ALL TESTS PASSED" results.txt