Skip to content

Commit faf08d6

Browse files
committed
Added more test cases to check bus wires b/w hard macro instances.
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 5951c01 commit faf08d6

File tree

9 files changed

+559
-0
lines changed

9 files changed

+559
-0
lines changed

src/rsz/test/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ TESTS = [
1010
"buffer_ports10",
1111
"buffer_ports11",
1212
"buffer_ports11_hier",
13+
"buffer_ports12",
14+
"buffer_ports12_hier",
1315
"buffer_ports3",
1416
"buffer_ports4",
1517
"buffer_ports5",

src/rsz/test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ or_integration_tests(
1616
buffer_ports10
1717
buffer_ports11
1818
buffer_ports11_hier
19+
buffer_ports12
20+
buffer_ports12_hier
1921
buffer_varying_lengths
2022
clone_flat
2123
clone_hier

src/rsz/test/buffer_ports12.ok

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
3+
clk
4+
count: 1
5+
6+
sram0_ce_in
7+
count: 1
8+
9+
sram0_we_in
10+
count: 1
11+
12+
{sram0_addr_in[0]} {sram0_addr_in[1]} {sram0_addr_in[2]} {sram0_addr_in[3]} {sram0_addr_in[4]} {sram0_addr_in[5]}
13+
count: 6
14+
15+
{sram0_w_mask_in[0]} {sram0_w_mask_in[1]} {sram0_w_mask_in[2]} {sram0_w_mask_in[3]} {sram0_w_mask_in[4]} {sram0_w_mask_in[5]} {sram0_w_mask_in[6]}
16+
count: 7
17+
18+
sram1_ce_in
19+
count: 1
20+
21+
sram1_we_in
22+
count: 1
23+
24+
{sram1_addr_in[0]} {sram1_addr_in[1]} {sram1_addr_in[2]} {sram1_addr_in[3]} {sram1_addr_in[4]} {sram1_addr_in[5]}
25+
count: 6
26+
27+
{sram1_w_mask_in[0]} {sram1_w_mask_in[1]} {sram1_w_mask_in[2]} {sram1_w_mask_in[3]} {sram1_w_mask_in[4]} {sram1_w_mask_in[5]} {sram1_w_mask_in[6]}
28+
count: 7
29+
30+
clk
31+
count: 1
32+
33+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
34+
count: 6
35+
36+
clk
37+
count: 1
38+
39+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
40+
count: 6
41+
42+
[INFO RSZ-0027] Inserted 31 BUF_X1 input buffers.
43+
[INFO RSZ-0028] Inserted 0 BUF_X1 output buffers.
44+
No differences found.

src/rsz/test/buffer_ports12.tcl

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Check bus ports of hard macro instances in flat flow
2+
source "helpers.tcl"
3+
4+
proc print_info { objs } {
5+
set obj_names {}
6+
foreach obj $objs {
7+
lappend obj_names [get_name $obj]
8+
}
9+
puts "[lsort $obj_names]"
10+
puts "count: [llength $objs]"
11+
puts ""
12+
}
13+
14+
read_liberty Nangate45/Nangate45_typ.lib
15+
read_liberty Nangate45/fakeram45_64x7.lib
16+
read_lef Nangate45/Nangate45.lef
17+
read_lef Nangate45/fakeram45_64x7.lef
18+
read_verilog buffer_ports12.v
19+
link_design top
20+
21+
print_info [get_ports clk]
22+
print_info [get_ports sram0_ce_in]
23+
print_info [get_ports sram0_we_in]
24+
print_info [get_ports sram0_addr_in*]
25+
print_info [get_ports sram0_w_mask_in*]
26+
print_info [get_ports sram1_ce_in]
27+
print_info [get_ports sram1_we_in]
28+
print_info [get_ports sram1_addr_in*]
29+
print_info [get_ports sram1_w_mask_in*]
30+
print_info [get_pins sram0/clk]
31+
print_info [get_pins sram0/addr_in*]
32+
print_info [get_pins sram1/clk]
33+
print_info [get_pins sram1/addr_in*]
34+
35+
buffer_ports
36+
37+
set verilog_file [make_result_file buffer_ports12.v]
38+
write_verilog $verilog_file
39+
diff_files buffer_ports12.vok $verilog_file

src/rsz/test/buffer_ports12.v

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module top (
2+
input clk,
3+
input sram0_ce_in,
4+
input sram0_we_in,
5+
input [5:0] sram0_addr_in,
6+
input [6:0] sram0_w_mask_in,
7+
input sram1_ce_in,
8+
input sram1_we_in,
9+
input [5:0] sram1_addr_in,
10+
input [6:0] sram1_w_mask_in
11+
);
12+
13+
wire [6:0] sram0_rd_out;
14+
wire [6:0] sram1_rd_out;
15+
16+
fakeram45_64x7 sram0 (
17+
.clk(clk),
18+
.ce_in(sram0_ce_in),
19+
.we_in(sram0_we_in),
20+
.addr_in(sram0_addr_in),
21+
.wd_in(sram1_rd_out),
22+
.w_mask_in(sram0_w_mask_in),
23+
.rd_out(sram0_rd_out)
24+
);
25+
26+
fakeram45_64x7 sram1 (
27+
.clk(clk),
28+
.ce_in(sram1_ce_in),
29+
.we_in(sram1_we_in),
30+
.addr_in(sram1_addr_in),
31+
.wd_in(sram0_rd_out),
32+
.w_mask_in(sram1_w_mask_in),
33+
.rd_out(sram1_rd_out)
34+
);
35+
36+
endmodule

src/rsz/test/buffer_ports12.vok

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
module top (clk,
2+
sram0_ce_in,
3+
sram0_we_in,
4+
sram1_ce_in,
5+
sram1_we_in,
6+
sram0_addr_in,
7+
sram0_w_mask_in,
8+
sram1_addr_in,
9+
sram1_w_mask_in);
10+
input clk;
11+
input sram0_ce_in;
12+
input sram0_we_in;
13+
input sram1_ce_in;
14+
input sram1_we_in;
15+
input [5:0] sram0_addr_in;
16+
input [6:0] sram0_w_mask_in;
17+
input [5:0] sram1_addr_in;
18+
input [6:0] sram1_w_mask_in;
19+
20+
wire net1;
21+
wire net2;
22+
wire net3;
23+
wire net4;
24+
wire net5;
25+
wire net6;
26+
wire net7;
27+
wire net8;
28+
wire net9;
29+
wire net10;
30+
wire net11;
31+
wire net12;
32+
wire net13;
33+
wire net14;
34+
wire net15;
35+
wire net16;
36+
wire net17;
37+
wire net18;
38+
wire net19;
39+
wire net20;
40+
wire net21;
41+
wire net22;
42+
wire net23;
43+
wire net24;
44+
wire net25;
45+
wire net26;
46+
wire net27;
47+
wire net28;
48+
wire net29;
49+
wire net30;
50+
wire net31;
51+
wire [6:0] sram0_rd_out;
52+
wire [6:0] sram1_rd_out;
53+
54+
fakeram45_64x7 sram0 (.we_in(net16),
55+
.ce_in(net8),
56+
.clk(net1),
57+
.addr_in({net7,
58+
net6,
59+
net5,
60+
net4,
61+
net3,
62+
net2}),
63+
.rd_out({sram0_rd_out[6],
64+
sram0_rd_out[5],
65+
sram0_rd_out[4],
66+
sram0_rd_out[3],
67+
sram0_rd_out[2],
68+
sram0_rd_out[1],
69+
sram0_rd_out[0]}),
70+
.w_mask_in({net15,
71+
net14,
72+
net13,
73+
net12,
74+
net11,
75+
net10,
76+
net9}),
77+
.wd_in({sram1_rd_out[6],
78+
sram1_rd_out[5],
79+
sram1_rd_out[4],
80+
sram1_rd_out[3],
81+
sram1_rd_out[2],
82+
sram1_rd_out[1],
83+
sram1_rd_out[0]}));
84+
fakeram45_64x7 sram1 (.we_in(net31),
85+
.ce_in(net23),
86+
.clk(net1),
87+
.addr_in({net22,
88+
net21,
89+
net20,
90+
net19,
91+
net18,
92+
net17}),
93+
.rd_out({sram1_rd_out[6],
94+
sram1_rd_out[5],
95+
sram1_rd_out[4],
96+
sram1_rd_out[3],
97+
sram1_rd_out[2],
98+
sram1_rd_out[1],
99+
sram1_rd_out[0]}),
100+
.w_mask_in({net30,
101+
net29,
102+
net28,
103+
net27,
104+
net26,
105+
net25,
106+
net24}),
107+
.wd_in({sram0_rd_out[6],
108+
sram0_rd_out[5],
109+
sram0_rd_out[4],
110+
sram0_rd_out[3],
111+
sram0_rd_out[2],
112+
sram0_rd_out[1],
113+
sram0_rd_out[0]}));
114+
BUF_X1 input1 (.A(clk),
115+
.Z(net1));
116+
BUF_X1 input2 (.A(sram0_addr_in[0]),
117+
.Z(net2));
118+
BUF_X1 input3 (.A(sram0_addr_in[1]),
119+
.Z(net3));
120+
BUF_X1 input4 (.A(sram0_addr_in[2]),
121+
.Z(net4));
122+
BUF_X1 input5 (.A(sram0_addr_in[3]),
123+
.Z(net5));
124+
BUF_X1 input6 (.A(sram0_addr_in[4]),
125+
.Z(net6));
126+
BUF_X1 input7 (.A(sram0_addr_in[5]),
127+
.Z(net7));
128+
BUF_X1 input8 (.A(sram0_ce_in),
129+
.Z(net8));
130+
BUF_X1 input9 (.A(sram0_w_mask_in[0]),
131+
.Z(net9));
132+
BUF_X1 input10 (.A(sram0_w_mask_in[1]),
133+
.Z(net10));
134+
BUF_X1 input11 (.A(sram0_w_mask_in[2]),
135+
.Z(net11));
136+
BUF_X1 input12 (.A(sram0_w_mask_in[3]),
137+
.Z(net12));
138+
BUF_X1 input13 (.A(sram0_w_mask_in[4]),
139+
.Z(net13));
140+
BUF_X1 input14 (.A(sram0_w_mask_in[5]),
141+
.Z(net14));
142+
BUF_X1 input15 (.A(sram0_w_mask_in[6]),
143+
.Z(net15));
144+
BUF_X1 input16 (.A(sram0_we_in),
145+
.Z(net16));
146+
BUF_X1 input17 (.A(sram1_addr_in[0]),
147+
.Z(net17));
148+
BUF_X1 input18 (.A(sram1_addr_in[1]),
149+
.Z(net18));
150+
BUF_X1 input19 (.A(sram1_addr_in[2]),
151+
.Z(net19));
152+
BUF_X1 input20 (.A(sram1_addr_in[3]),
153+
.Z(net20));
154+
BUF_X1 input21 (.A(sram1_addr_in[4]),
155+
.Z(net21));
156+
BUF_X1 input22 (.A(sram1_addr_in[5]),
157+
.Z(net22));
158+
BUF_X1 input23 (.A(sram1_ce_in),
159+
.Z(net23));
160+
BUF_X1 input24 (.A(sram1_w_mask_in[0]),
161+
.Z(net24));
162+
BUF_X1 input25 (.A(sram1_w_mask_in[1]),
163+
.Z(net25));
164+
BUF_X1 input26 (.A(sram1_w_mask_in[2]),
165+
.Z(net26));
166+
BUF_X1 input27 (.A(sram1_w_mask_in[3]),
167+
.Z(net27));
168+
BUF_X1 input28 (.A(sram1_w_mask_in[4]),
169+
.Z(net28));
170+
BUF_X1 input29 (.A(sram1_w_mask_in[5]),
171+
.Z(net29));
172+
BUF_X1 input30 (.A(sram1_w_mask_in[6]),
173+
.Z(net30));
174+
BUF_X1 input31 (.A(sram1_we_in),
175+
.Z(net31));
176+
endmodule
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0227] LEF file: Nangate45/fakeram45_64x7.lef, created 1 library cells
3+
[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments.
4+
clk
5+
count: 1
6+
7+
sram0_ce_in
8+
count: 1
9+
10+
sram0_we_in
11+
count: 1
12+
13+
{sram0_addr_in[0]} {sram0_addr_in[1]} {sram0_addr_in[2]} {sram0_addr_in[3]} {sram0_addr_in[4]} {sram0_addr_in[5]}
14+
count: 6
15+
16+
{sram0_w_mask_in[0]} {sram0_w_mask_in[1]} {sram0_w_mask_in[2]} {sram0_w_mask_in[3]} {sram0_w_mask_in[4]} {sram0_w_mask_in[5]} {sram0_w_mask_in[6]}
17+
count: 7
18+
19+
sram1_ce_in
20+
count: 1
21+
22+
sram1_we_in
23+
count: 1
24+
25+
{sram1_addr_in[0]} {sram1_addr_in[1]} {sram1_addr_in[2]} {sram1_addr_in[3]} {sram1_addr_in[4]} {sram1_addr_in[5]}
26+
count: 6
27+
28+
{sram1_w_mask_in[0]} {sram1_w_mask_in[1]} {sram1_w_mask_in[2]} {sram1_w_mask_in[3]} {sram1_w_mask_in[4]} {sram1_w_mask_in[5]} {sram1_w_mask_in[6]}
29+
count: 7
30+
31+
clk
32+
count: 1
33+
34+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
35+
count: 6
36+
37+
clk
38+
count: 1
39+
40+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
41+
count: 6
42+
43+
[INFO RSZ-0027] Inserted 31 BUF_X1 input buffers.
44+
[INFO RSZ-0028] Inserted 0 BUF_X1 output buffers.
45+
No differences found.

0 commit comments

Comments
 (0)