Skip to content

Commit a93a43a

Browse files
committed
test: use FST waveform format by default
Also upgrade cocotb to 2.0.1 which fixes cocotb/cocotb#5025
1 parent 0ac027d commit a93a43a

File tree

7 files changed

+23
-11
lines changed

7 files changed

+23
-11
lines changed

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737
paths: "test/results.xml"
3838
if: always()
3939

40-
- name: upload vcd
40+
- name: upload waveform and test results
4141
if: success() || failure()
4242
uses: actions/upload-artifact@v4
4343
with:
44-
name: test-vcd
44+
name: test-results
4545
path: |
46-
test/tb.vcd
46+
test/tb.fst
4747
test/results.xml
4848
test/output/*

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.DS_Store
22
.idea
33
*.vcd
4+
*.fst
5+
*.fst.hier
46
runs
57
tt_submission
68
src/user_config.json

test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# defaults
55
SIM ?= icarus
6-
WAVES ?= 1
6+
FST ?= -fst # Use more efficient FST format
77
TOPLEVEL_LANG ?= verilog
88
SRC_DIR = $(PWD)/../src
99
PROJECT_SOURCES = project.v

test/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,24 @@ Then run:
2424
make -B GATES=yes
2525
```
2626

27-
## How to view the VCD file
27+
If you wish to save the waveform in VCD format instead of FST format, edit tb.v to use `$dumpfile("tb.vcd");` and then run:
28+
29+
```sh
30+
make -B FST=
31+
```
32+
33+
This will generate `tb.vcd` instead of `tb.fst`.
34+
35+
## How to view the waveform file
2836

2937
Using GTKWave
38+
3039
```sh
31-
gtkwave tb.vcd tb.gtkw
40+
gtkwave tb.fst tb.gtkw
3241
```
3342

3443
Using Surfer
44+
3545
```sh
36-
surfer tb.vcd
46+
surfer tb.fst
3747
```

test/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pytest==8.4.2
2-
cocotb==2.0.0
2+
cocotb==2.0.1

test/tb.gtkw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[*] GTKWave Analyzer v3.4.0 (w)1999-2022 BSI
33
[*] Mon Nov 20 16:00:28 2023
44
[*]
5-
[dumpfile] "/home/uri/p/tt-new-template-proto/test/tb.vcd"
5+
[dumpfile] "/home/uri/p/tt-new-template-proto/test/tb.fst"
66
[dumpfile_mtime] "Mon Nov 20 15:58:34 2023"
77
[dumpfile_size] 1110
88
[savefile] "/home/uri/p/tt-new-template-proto/test/tb.gtkw"

test/tb.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77
module tb ();
88

9-
// Dump the signals to a VCD file. You can view it with gtkwave or surfer.
9+
// Dump the signals to a FST file. You can view it with gtkwave or surfer.
1010
initial begin
11-
$dumpfile("tb.vcd");
11+
$dumpfile("tb.fst");
1212
$dumpvars(0, tb);
1313
#1;
1414
end

0 commit comments

Comments
 (0)