Skip to content

Commit 937ba8e

Browse files
committed
odb: add unit tests
Signed-off-by: Eder Monteiro <[email protected]>
1 parent a3d5d26 commit 937ba8e

File tree

6 files changed

+35
-0
lines changed

6 files changed

+35
-0
lines changed

src/odb/test/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ py_test(
142142
# From CMakeLists.txt or_integration_tests(TESTS
143143
COMPULSORY_TESTS = [
144144
"abstract_origin",
145+
"all_pin_placed1",
146+
"all_pin_placed2",
145147
"bterm_hier_create",
146148
"check_routing_tracks",
147149
"create_blockage",

src/odb/test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ or_integration_tests(
22
"odb"
33
TESTS
44
abstract_origin
5+
all_pin_placed1
6+
all_pin_placed2
57
bterm_hier_create
68
check_routing_tracks
79
create_blockage

src/odb/test/all_pin_placed1.ok

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0128] Design: top
3+
[INFO ODB-0130] Created 6 pins.
4+
[INFO ODB-0131] Created 5 components and 27 component-terminals.
5+
[INFO ODB-0133] Created 10 nets and 14 connections.
6+
Some pins are not placed

src/odb/test/all_pin_placed1.tcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# test if all pins are placed
2+
source "helpers.tcl"
3+
read_lef Nangate45/Nangate45.lef
4+
read_def floorplan_initialize3.def
5+
6+
if { [all_pin_placed] } {
7+
puts "All pins are placed"
8+
} else {
9+
puts "Some pins are not placed"
10+
}

src/odb/test/all_pin_placed2.ok

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0128] Design: gcd
3+
[INFO ODB-0131] Created 200 components and 1117 component-terminals.
4+
[INFO ODB-0133] Created 4 nets and 11 connections.
5+
All pins are placed

src/odb/test/all_pin_placed2.tcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# test if all pins are placed
2+
source "helpers.tcl"
3+
read_lef Nangate45/Nangate45.lef
4+
read_def design_is_routed1.def
5+
6+
if { [all_pin_placed] } {
7+
puts "All pins are placed"
8+
} else {
9+
puts "Some pins are not placed"
10+
}

0 commit comments

Comments
 (0)