Skip to content

Commit 80bd842

Browse files
committed
Added a new regression get_ports2.tcl and get_ports2_hier.tcl.
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 3901ba8 commit 80bd842

File tree

7 files changed

+143
-0
lines changed

7 files changed

+143
-0
lines changed

src/dbSta/test/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ COMPULSORY_TESTS = [
1212
"find_clks2",
1313
"get_ports1",
1414
"get_ports1_hier",
15+
"get_ports2",
16+
"get_ports2_hier",
1517
"hier2",
1618
"hierclock",
1719
"hierwrite",
@@ -114,6 +116,7 @@ filegroup(
114116
"example1_slow.lib",
115117
"example1_typ.lib",
116118
"get_ports1.v",
119+
"get_ports2.v",
117120
"helpers.tcl",
118121
"hier1.def",
119122
"hier1.sdc",

src/dbSta/test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ or_integration_tests(
99
find_clks2
1010
get_ports1
1111
get_ports1_hier
12+
get_ports2
13+
get_ports2_hier
1214
hier2
1315
hierclock
1416
hierwrite

src/dbSta/test/get_ports2.ok

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
ce_in
7+
count: 1
8+
9+
we_in
10+
count: 1
11+
12+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
13+
count: 6
14+
15+
{wd_in[0]} {wd_in[1]} {wd_in[2]} {wd_in[3]} {wd_in[4]} {wd_in[5]} {wd_in[6]}
16+
count: 7
17+
18+
{w_mask_in[0]} {w_mask_in[1]} {w_mask_in[2]} {w_mask_in[3]} {w_mask_in[4]} {w_mask_in[5]} {w_mask_in[6]}
19+
count: 7
20+
21+
{rd_out[0]} {rd_out[1]} {rd_out[2]} {rd_out[3]} {rd_out[4]} {rd_out[5]} {rd_out[6]}
22+
count: 7
23+
24+
clk
25+
count: 1
26+
27+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
28+
count: 6
29+

src/dbSta/test/get_ports2.tcl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# get_pins on a bus port of leaf liberty instance
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 get_ports2.v
19+
link_design top
20+
21+
print_info [get_ports clk]
22+
print_info [get_ports ce_in]
23+
print_info [get_ports we_in]
24+
print_info [get_ports addr_in*]
25+
print_info [get_ports wd_in*]
26+
print_info [get_ports w_mask_in*]
27+
print_info [get_ports rd_out*]
28+
print_info [get_pins sram/clk]
29+
print_info [get_pins sram/addr_in*]

src/dbSta/test/get_ports2.v

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module top (
2+
input clk,
3+
input ce_in,
4+
input we_in,
5+
input [5:0] addr_in,
6+
input [6:0] wd_in,
7+
input [6:0] w_mask_in,
8+
output [6:0] rd_out
9+
);
10+
11+
fakeram45_64x7 sram (
12+
.clk(clk),
13+
.ce_in(ce_in),
14+
.we_in(we_in),
15+
.addr_in(addr_in),
16+
.wd_in(wd_in),
17+
.w_mask_in(w_mask_in),
18+
.rd_out(rd_out)
19+
);
20+
21+
endmodule

src/dbSta/test/get_ports2_hier.ok

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
ce_in
8+
count: 1
9+
10+
we_in
11+
count: 1
12+
13+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
14+
count: 6
15+
16+
{wd_in[0]} {wd_in[1]} {wd_in[2]} {wd_in[3]} {wd_in[4]} {wd_in[5]} {wd_in[6]}
17+
count: 7
18+
19+
{w_mask_in[0]} {w_mask_in[1]} {w_mask_in[2]} {w_mask_in[3]} {w_mask_in[4]} {w_mask_in[5]} {w_mask_in[6]}
20+
count: 7
21+
22+
{rd_out[0]} {rd_out[1]} {rd_out[2]} {rd_out[3]} {rd_out[4]} {rd_out[5]} {rd_out[6]}
23+
count: 7
24+
25+
clk
26+
count: 1
27+
28+
{addr_in[0]} {addr_in[1]} {addr_in[2]} {addr_in[3]} {addr_in[4]} {addr_in[5]}
29+
count: 6
30+

src/dbSta/test/get_ports2_hier.tcl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# get_pins on a bus port of leaf liberty instance
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 get_ports2.v
19+
link_design -hier top
20+
21+
print_info [get_ports clk]
22+
print_info [get_ports ce_in]
23+
print_info [get_ports we_in]
24+
print_info [get_ports addr_in*]
25+
print_info [get_ports wd_in*]
26+
print_info [get_ports w_mask_in*]
27+
print_info [get_ports rd_out*]
28+
print_info [get_pins sram/clk]
29+
print_info [get_pins sram/addr_in*]

0 commit comments

Comments
 (0)