Skip to content

Commit 91dbac2

Browse files
add step top build top module
1 parent 22134d2 commit 91dbac2

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: RISC-V CI
1+
name: risc-v CI
22

33
on:
44
pull_request:
55

66
jobs:
7-
test:
7+
build_and_test:
88
runs-on: ubuntu-latest
99
container:
1010
image: ghcr.io/utoss/risc-v:ci
@@ -13,6 +13,9 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16+
- name: Build top
17+
run: make build_top
18+
1619
- name: Build testbench
1720
run: make build_tb
1821

@@ -21,8 +24,16 @@ jobs:
2124

2225
- name: Upload VCD files
2326
uses: actions/upload-artifact@v4
24-
if: always()
27+
if: steps.build-testbench.outcome == 'success'
2528
with:
2629
name: vcd-files
2730
path: test/vcd/*.vcd
2831
retention-days: 7
32+
33+
- name: Upload VVP files
34+
uses: actions/upload-artifact@v4
35+
if: steps.build-top.outcome == 'success'
36+
with:
37+
name: vvp-files
38+
path: out/*.vvp
39+
retention-days: 7

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ TB_UTILS := test/utils.svh
1212

1313
TB_VCD_BASE_PATH := test/vcd
1414

15-
all: $(OUTPUT)
15+
build_top: $(OUTPUT)
16+
17+
run_top: $(OUTPUT)
18+
$(VVP) $(OUTPUT)
1619

1720
$(OUTPUT):
1821
$(IVERILOG) -g2012 -o $(OUTPUT) -c src/top.cf
1922

20-
run: $(OUTPUT)
21-
$(VVP) $(OUTPUT)
22-
2323
$(TB_OUT_PATTERN): $(TB_SRC_PATTERN) $(TB_UTILS)
2424
$(IVERILOG) -g2012 -o $@ -c src/top.cf $<
2525

0 commit comments

Comments
 (0)