File tree 3 files changed +61
-3
lines changed
3 files changed +61
-3
lines changed Original file line number Diff line number Diff line change 58
58
- name : show files
59
59
run : find runs/wokwi/
60
60
61
+ # extract gate-level verilog
62
+ - name : extract gate-level verilog
63
+ run : |
64
+ cp `find runs/wokwi/results/final/verilog/gl/*.v` runs/gatelevel.v
65
+
66
+ # upload gate-level verilog
67
+ - uses : actions/upload-artifact@v3
68
+ with :
69
+ name : gatelevel.v
70
+ path : runs/gatelevel.v
71
+
61
72
# print some routing stats
62
73
- name : add summary
63
74
run : ./configure.py --get-stats >> $GITHUB_STEP_SUMMARY
80
91
path : runs
81
92
key : ${{ runner.os }}-runs-${{ github.run_id }}
82
93
94
+ gatelevel :
95
+ needs : gds
96
+ runs-on : ubuntu-latest
97
+ container :
98
+ image : davidsiaw/ocs
99
+ env :
100
+ GATES : yes
101
+ PDK_ROOT : /opt/pdk
102
+ steps :
103
+ - name : checkout repo
104
+ uses : actions/checkout@v3
105
+ - uses : actions/download-artifact@v3
106
+ with :
107
+ name : gatelevel.v
108
+ path : src/gatelevel-src
109
+ - name : run gate level test
110
+ run : |
111
+ cd src
112
+ ls
113
+ cp gatelevel-src/gatelevel.v gatelevel.v
114
+ make
115
+
83
116
png :
84
117
needs : gds
85
118
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 5
5
SIM ?= icarus
6
6
TOPLEVEL_LANG ?= verilog
7
7
8
- VERILOG_SOURCES += $(PWD ) /tb.v $(PWD ) /counter.v $(PWD ) /decoder.v
8
+ ifneq ($(GATES ) ,yes)
9
+ # normal simulation
10
+ VERILOG_SOURCES =$(wildcard $(PWD ) /* .v)
11
+
12
+ else
13
+ # copy the gatelevel verilog from /runs/wokwi/results/final/verilog/gl/ and commit to this directory
14
+ VERILOG_SOURCES =$(PWD ) /tb.v $(PWD ) /gatelevel.v
15
+
16
+ # gate level simulation requires some extra setup
17
+ COMPILE_ARGS += -DGL_TEST
18
+ COMPILE_ARGS += -DFUNCTIONAL
19
+ COMPILE_ARGS += -DUSE_POWER_PINS
20
+ COMPILE_ARGS += -DSIM
21
+ COMPILE_ARGS += -DUNIT_DELAY=# 1
22
+ COMPILE_ARGS += -DSIM
23
+ VERILOG_SOURCES += $(PDK_ROOT ) /sky130B/libs.ref/sky130_fd_sc_hd/verilog/primitives.v
24
+ VERILOG_SOURCES += $(PDK_ROOT ) /sky130B/libs.ref/sky130_fd_sc_hd/verilog/sky130_fd_sc_hd.v
25
+ endif
9
26
10
27
# TOPLEVEL is the name of the toplevel module in your Verilog or VHDL file
11
28
TOPLEVEL = tb
@@ -15,4 +32,3 @@ MODULE = test
15
32
16
33
# include cocotb's make rules to take care of the simulator setup
17
34
include $(shell cocotb-config --makefiles) /Makefile.sim
18
-
Original file line number Diff line number Diff line change @@ -26,7 +26,16 @@ module tb (
26
26
assign segments = outputs[6 :0 ];
27
27
28
28
// instantiate the DUT
29
- seven_segment_seconds #(.MAX_COUNT(100 )) seven_segment_seconds (
29
+ seven_segment_seconds #(
30
+ `ifndef GL_TEST
31
+ .MAX_COUNT(100 )
32
+ `endif
33
+ ) seven_segment_seconds (
34
+ `ifdef GL_TEST
35
+ // for gatelevel testing we need to set up the power pins
36
+ .vccd1(1'b1 ),
37
+ .vssd1(1'b0 ),
38
+ `endif
30
39
.io_in (inputs),
31
40
.io_out (outputs)
32
41
);
You can’t perform that action at this time.
0 commit comments