Skip to content

Commit 08774db

Browse files
committed
test/orfs/ram_8x7: eqy_floorplan_test failure
Disabled for now, but this ram_8x7.sv is the smallest file that we've found to work in simulation before floorplan and fail afterwards: bazelisk test //test/orfs/ram_8x7:eqy_floorplan_test --test_output=streamed It is a lot to hope for, but perhaps this is actionable information? ``` EQY 12:13:50 [eqy_floorplan_test] partition: ERROR: conflicting matches for gold bit \W0_en: \W0_en vs \_113_ ``` Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 1b5e6d7 commit 08774db

File tree

5 files changed

+403
-0
lines changed

5 files changed

+403
-0
lines changed

test/orfs/ram_8x7/BUILD

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
load("@bazel-orfs//:eqy.bzl", "eqy_test")
2+
load("@bazel-orfs//:openroad.bzl", "orfs_flow", "orfs_run")
3+
load("//test/orfs/mock-array:mock-array.bzl", "ASAP7_REMOVE_CELLS")
4+
5+
package(features = ["layering_check"])
6+
7+
orfs_flow(
8+
name = "ram_8x7",
9+
# buildifier: disable=unsorted-dict-items
10+
arguments = {
11+
# Faster builds
12+
"GPL_TIMING_DRIVEN": "0",
13+
"SKIP_INCREMENTAL_REPAIR": "1",
14+
"SKIP_LAST_GASP": "1",
15+
# Various
16+
"CORE_AREA": "1.08 1.08 15.12 15.12",
17+
"DIE_AREA": "0 0 16.2 16.2",
18+
"PLACE_DENSITY": "0.35",
19+
"OPENROAD_HIERARCHICAL": "1",
20+
},
21+
sources = {
22+
"RULES_JSON": [":rules-base.json"],
23+
"SDC_FILE": [":constraint.sdc"],
24+
},
25+
tags = ["manual"],
26+
test_kwargs = {
27+
"tags": ["orfs"],
28+
},
29+
verilog_files = ["ram_8x7.sv"],
30+
)
31+
32+
STAGES = [
33+
"source",
34+
# _source tests original source to source transition,
35+
# which checks that the eqy setup works.
36+
"source",
37+
# _synth tests synthesis output, and so on
38+
# for the next stages.
39+
"synth",
40+
"floorplan",
41+
"place",
42+
"cts",
43+
"grt",
44+
"route",
45+
"final",
46+
]
47+
48+
[orfs_run(
49+
name = "ram_8x7_{stage}_verilog".format(stage = stage),
50+
src = ":ram_8x7_{stage}".format(stage = stage),
51+
outs = [
52+
"ram_8x7_{stage}.v".format(stage = stage),
53+
],
54+
arguments = {
55+
"ASAP7_REMOVE_CELLS": " ".join(ASAP7_REMOVE_CELLS),
56+
"OUTPUT": "$(location :ram_8x7_{stage}.v)".format(stage = stage),
57+
},
58+
script = "//test/orfs/mock-array:write_verilog.tcl",
59+
tags = ["manual"],
60+
) for stage in STAGES[2:]]
61+
62+
filegroup(
63+
name = "ram_8x7_source_files",
64+
srcs = [
65+
"ram_8x7.sv",
66+
],
67+
)
68+
69+
[filegroup(
70+
name = "ram_8x7_{stage}_files".format(stage = stage),
71+
srcs = [
72+
":ram_8x7_{stage}_verilog".format(stage = stage),
73+
],
74+
) for stage in STAGES[2:]]
75+
76+
[eqy_test(
77+
name = "eqy_{stage}_test".format(stage = STAGES[i + 1]),
78+
depth = 1,
79+
gate_verilog_files = [
80+
":ram_8x7_{stage}_files".format(stage = STAGES[i + 1]),
81+
] + ([] if STAGES[i + 1] == "source" else ["//test/orfs/mock-array:asap7_files"]),
82+
gold_verilog_files = [
83+
":ram_8x7_{stage}_files".format(stage = STAGES[i]),
84+
] + ([] if STAGES[i] == "source" else ["//test/orfs/mock-array:asap7_files"]),
85+
module_top = "ram_8x7",
86+
tags = ["manual"],
87+
) for i in range(len(STAGES) - 1)]

test/orfs/ram_8x7/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Summary
2+
3+
The main value here is that this caused eqy_floorplan_test to fail.

test/orfs/ram_8x7/constraint.sdc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
set sdc_version 2.0
2+
3+
#
4+
# SDC file used during SRAM abstract generation
5+
#
6+
7+
# Run at 833 MHz
8+
set clk_period 1200
9+
10+
# Covers all clock naming types in SRAMs and reg files
11+
set clock_ports [concat [get_ports -quiet *clk] [get_ports -quiet *clock]]
12+
13+
if {[llength $clock_ports] == 0} {
14+
error "No clock ports found"
15+
}
16+
17+
foreach clk_port $clock_ports {
18+
set clk_name [get_name $clk_port]
19+
create_clock -period $clk_period -name $clk_name $clk_port
20+
}
21+
22+
set non_clk_inputs {}
23+
foreach input [all_inputs] {
24+
if {[lsearch -exact $clock_ports $input] == -1} {
25+
lappend non_clk_inputs $input
26+
}
27+
}
28+
29+
set_max_delay [expr {[info exists in2out_max] ? $in2out_max : 80}] -from $non_clk_inputs -to [all_outputs]
30+
group_path -name in2out -from $non_clk_inputs -to [all_outputs]
31+
32+
if {[llength [all_registers]] > 0} {
33+
set_max_delay [expr {[info exists in2reg_max] ? $in2reg_max : 80}] -from $non_clk_inputs -to [all_registers]
34+
set_max_delay [expr {[info exists reg2out_max] ? $reg2out_max : 80}] -from [all_registers] -to [all_outputs]
35+
36+
group_path -name in2reg -from $non_clk_inputs -to [all_registers]
37+
group_path -name reg2out -from [all_registers] -to [all_outputs]
38+
group_path -name reg2reg -from [all_registers] -to [all_registers]
39+
}

test/orfs/ram_8x7/ram_8x7.sv

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Generated by CIRCT firtool-1.137.0
2+
// VCS coverage exclude_file
3+
module ram_8x7(
4+
input [2:0] R0_addr,
5+
input R0_en,
6+
R0_clk,
7+
output [6:0] R0_data,
8+
input [2:0] W0_addr,
9+
input W0_en,
10+
W0_clk,
11+
input [6:0] W0_data
12+
);
13+
14+
reg [6:0] Memory[0:7];
15+
always @(posedge W0_clk) begin
16+
if (W0_en)
17+
Memory[W0_addr] <= W0_data;
18+
end // always @(posedge)
19+
assign R0_data = R0_en ? Memory[R0_addr] : 7'bx;
20+
endmodule
21+

0 commit comments

Comments
 (0)