Print information of top cells
This script prints the name, contained layers, and cell size of all top cells in the opened files.
Download here. (print_topcell_info.py)
Script
# Get the list of files and iterate through each file
file_list = pynebv.file.list()
for file in file_list :
print("Input file : " + file.file_path)
# Iterate through all descendants in the file
for top_cell in file.descendants():
if not isinstance(top_cell, pynebv.TopCell):
continue
# Output the top cell name, layer numbers, and cell area size
print("MAIN " + top_cell.name)
layers = [str(layer.name.replace(" ", "").replace("L", "")) for layer in top_cell.layers()]
print("LAYNO " + ", ".join(layers))
print("SIZE " + ", ".join(map(str, top_cell.area)))
How to Use
$ nebv --python-file /path/to/script.py /path/to/chip_file
Results
Output File
None
Console
Input file : /path/to/chip_file
MAIN <Top Cell 1>
LAYNO <layno>,<layno>...
SIZE <x1,y1,x2,y2>
MAIN <Top Cell 2>
LAYNO <layno>,<layno>...
SIZE <x1,y1,x2,y2>
Last modified August 18, 2026