Skip to content

Commit 16a9270

Browse files
authored
Fix isBuffer (#329)
* Add support for "well" direction type (nwell, pwell, etc.), and fix isBuffer (+ other functions) to accommodate wells * Just fix isBuffer issue
1 parent f5cae66 commit 16a9270

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

liberty/Liberty.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,8 @@ LibertyCell::bufferPorts(// Return values.
12261226
}
12271227
output = port;
12281228
}
1229-
else if (!dir->isPowerGround()) {
1229+
else if (!port->isPwrGnd()) {
1230+
// Invalid direction.
12301231
input = nullptr;
12311232
output = nullptr;
12321233
break;

test/get_is_buffer.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
buf_inst

test/get_is_buffer.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# is_buffer property
2+
read_liberty ../examples/sky130hd_tt.lib.gz
3+
read_verilog get_is_buffer.v
4+
link_design dut
5+
report_object_full_names [get_cells -filter is_buffer]

test/get_is_buffer.v

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module dut (
2+
input A,
3+
output Y
4+
);
5+
6+
sky130_fd_sc_hd__buf_2 buf_inst (
7+
.A(A),
8+
.X(Y)
9+
);
10+
11+
endmodule

test/regression_vars.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ record_example_tests {
140140
record_sta_tests {
141141
disconnect_mcp_pin
142142
get_filter
143+
get_is_buffer
143144
get_is_memory
144145
get_lib_pins_of_objects
145146
get_noargs

0 commit comments

Comments
 (0)