Skip to content

Commit

Permalink
Update OpenROAD version + Updates for OpenDB API changes (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
maliberty authored Dec 13, 2021
1 parent 14ef870 commit 412fcf0
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dependencies/tool_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
make PREFIX=$PREFIX install
- name: openroad_app
repo: https://github.com/The-OpenROAD-Project/OpenROAD
commit: b79f266fe41540eabc064bcaddfe19ed715ac5c2
commit: 174a460d88e87f538ac36e26ef82d0bba0f4182c
build: |
mkdir -p ./build
cd ./build
Expand Down
Binary file modified docker/tar/openroad_app.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions scripts/contextualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
iterms = net.getITerms() # asssumption: no pins (bterms) on top level
if not keep_flag:
for iterm in iterms:
odb.dbITerm_disconnect(iterm)
iterm.disconnect()
if net.getName() in to_connect:
for node_iterm in to_connect[net.getName()]:
node_master = node_iterm.getMTerm().getMaster()
Expand All @@ -132,6 +132,6 @@
new_inst.setPlacementStatus("FIRM")
else:
new_inst = block_macro.findInst(node_inst_name)
odb.dbITerm_connect(new_inst.findITerm(node_iterm.getMTerm().getName()), net)
new_inst.findITerm(node_iterm.getMTerm().getName()).connect(net)

odb.write_def(block_macro, output_def_file_name)
6 changes: 2 additions & 4 deletions scripts/dont_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def remove_buffers(block_design, dont_buffer):
input_net_master_cell = get_master_cells(input_net)[0]
_, output_nets_2 = get_nets(input_net_master_cell)
output_net_it = output_nets_2[0].getITerms()[0]

odb.dbITerm_disconnect(output_net_it)
odb.dbITerm_connect(output_net_it, net)
output_net_it.connect(net)


def get_master_cells(net):
Expand Down Expand Up @@ -114,4 +112,4 @@ def main():


if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion scripts/label_macro_pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def labelITerm(iterm, pin_name, iotype, all_shapes_flag=False):
ur.getY())


odb.dbITerm_connect(pad_iterm, net)
pad_iterm.connect(net)
pin_bterm.connect(net)


Expand Down
4 changes: 2 additions & 2 deletions scripts/openroad/diodes.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ proc add_antenna_cell { iterm } {
$antenna_inst setLocation $avg_iterm_x $avg_iterm_y
$antenna_inst setOrient $inst_ori
$antenna_inst setPlacementStatus PLACED
odb::dbITerm_connect $antenna_iterm $iterm_net
$antenna_iterm connect $iterm_net

if { $::VERBOSE } {
puts "\[INFO\]: Adding $antenna_inst_name on subnet $antenna_subnet for cell $iterm_inst_name pin $iterm_pin_name"
Expand Down Expand Up @@ -97,4 +97,4 @@ write_def $::env(SAVE_DEF)
if { [catch {check_placement -verbose} errmsg] } {
puts stderr $errmsg
exit 1
}
}
2 changes: 1 addition & 1 deletion scripts/place_diodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def insert_diode(self, it, src_pos, force_true=False):
diode_inst.setPlacementStatus('PLACED')

ait = diode_inst.findITerm(self.diode_pin)
odb.dbITerm_connect(ait, it.getNet())
ait.connect(it.getNet())

def execute(self):
# Scan all nets
Expand Down
4 changes: 2 additions & 2 deletions scripts/power_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def getTechMaxSpacing(layers=tech.getLayers()):
and pad_name_substr in master_name: # pad pin
matched_special_net_name = special_net_name
print(inst.getName(), "connected to", net.getName())
# odb.dbITerm_connect(iterm, net)
# iterm.connect(net)
# iterm.setSpecial()

# get the pin shapes
Expand All @@ -533,7 +533,7 @@ def getTechMaxSpacing(layers=tech.getLayers()):
elif pin_name == core_pin: # macro ring
matched_special_net_name = special_net_name
print(inst.getName(), "will be connected to", master_name, "/", pin_name)
# odb.dbITerm_connect(iterm, net)
# iterm.connect(net)
# iterm.setSpecial()

iterm_boxes = getITermBoxes(iterm)
Expand Down
7 changes: 3 additions & 4 deletions scripts/write_powered_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def find_power_ground_port(port_name, ports):
print("Warning: power pin", pin_name, "of", cell_name, "is already connected")
print("Warning: ignoring", cell_name + "/" + pin_name, "!!!!!!!")
else:
odb.dbITerm_connect(VDD_ITERM, DEFAULT_VDD)
VDD_ITERM.connect(DEFAULT_VDD)

for GND_ITERM in GND_ITERMS:
if GND_ITERM.isConnected():
Expand All @@ -188,7 +188,7 @@ def find_power_ground_port(port_name, ports):
print("Warning: ground pin", pin_name, "of", cell_name, "is already connected")
print("Warning: ignoring", cell_name + "/" + pin_name, "!!!!!!!")
else:
odb.dbITerm_connect(GND_ITERM, DEFAULT_GND)
GND_ITERM.connect(DEFAULT_GND)

modified_cells += 1

Expand Down Expand Up @@ -254,8 +254,7 @@ def find_power_ground_port(port_name, ports):
original_port = find_power_ground_port(port.getName(), VDD_PORTS+GND_PORTS)
assert original_port is not None, port.getName() + " not found in the original netlist."

odb.dbITerm_disconnect(original_iterm)
odb.dbITerm_connect(original_iterm, original_port.getNet())
original_iterm.connect(original_port.getNet())
print("Modified connections between", port.getName(), "and", inst_name)

odb.write_def(block, output_file_name)

0 comments on commit 412fcf0

Please sign in to comment.