Skip to content

Commit dbcb1b2

Browse files
committed
test/orfs/gcd: add testing of each stage
A self test, check that gcd.v is equivalent to gcd.v, which passes: bazelisk test test/orfs/gcd:eqy_source_test --test_output=streamed Next, test that synthesis + OpenROAD load + write_verilog: bazelisk test test/orfs/gcd:eqy_synth_test --test_output=streamed That synth to floorplan worked: bazelisk test test/orfs/gcd:eqy_floorplan_test --test_output=streamed and so on for place, cts, grt and route. Various error messages that need some eqy skills...
1 parent 32662f8 commit dbcb1b2

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

test/orfs/gcd/BUILD

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,53 @@ orfs_flow(
2727
verilog_files = ["gcd.v"],
2828
)
2929

30-
orfs_run(
31-
name = "gcd_floorplan_verilog",
32-
src = ":gcd_floorplan",
30+
STAGES = [
31+
"source",
32+
"source",
33+
"synth",
34+
"floorplan",
35+
"place",
36+
"cts",
37+
"grt",
38+
"route",
39+
]
40+
41+
[orfs_run(
42+
name = "gcd_{stage}_verilog".format(stage = stage),
43+
src = ":gcd_{stage}".format(stage = stage),
3344
outs = [
34-
"gcd_floorplan.v",
45+
"gcd_{stage}.v".format(stage = stage),
3546
],
3647
arguments = {
37-
"OUTPUT": "$(location :gcd_floorplan.v)",
48+
"OUTPUT": "$(location :gcd_{stage}.v)".format(stage = stage),
3849
},
3950
script = "//test/orfs/mock-array:write_verilog.tcl",
4051
tags = ["manual"],
41-
)
52+
) for stage in STAGES[2:]]
4253

4354
filegroup(
44-
name = "gcd_synth_files",
55+
name = "gcd_source_files",
4556
srcs = [
46-
":gcd_synth",
57+
"gcd.v",
4758
],
48-
output_group = "1_synth.v",
4959
)
5060

51-
eqy_test(
52-
name = "eqy_test",
61+
[filegroup(
62+
name = "gcd_{stage}_files".format(stage = stage),
63+
srcs = [
64+
":gcd_{stage}_verilog".format(stage = stage),
65+
],
66+
) for stage in STAGES[2:]]
67+
68+
[eqy_test(
69+
name = "eqy_{stage}_test".format(stage = STAGES[i + 1]),
5370
depth = 1,
5471
gate_verilog_files = [
55-
":gcd_floorplan.v",
56-
"//test/orfs/mock-array:asap7_files",
57-
],
72+
":gcd_{stage}_files".format(stage = STAGES[i + 1]),
73+
] + ([] if STAGES[i + 1] == "source" else ["//test/orfs/mock-array:asap7_files"]),
5874
gold_verilog_files = [
59-
":gcd_synth_files",
60-
"//test/orfs/mock-array:asap7_files",
61-
],
75+
":gcd_{stage}_files".format(stage = STAGES[i]),
76+
] + ([] if STAGES[i] == "source" else ["//test/orfs/mock-array:asap7_files"]),
6277
module_top = "gcd",
6378
tags = ["manual"],
64-
)
79+
) for i in range(len(STAGES) - 1)]

0 commit comments

Comments
 (0)