Scripting Interview Question 2 | Physical Design | Floor-planning | Tcl Programming
Scripting Interview Question 2 | Physical Design | Floor-Planning | Tcl Programming
Role: Physical Design
Company : Product Based
Experience: 5+ years
Suppose you are working on floor-planning for a block-level implementation, and one of the key tasks is macro placement. In this scenario, there are special cells in the design that need to be placed according to specific requirements:
- The cells must be uniformly placed throughout the chip.
- The block has dimensions of 500 μm in height and 1000 μm in width.
- The distance between adjacent special cells should be 10 μm in both the vertical and horizontal directions.
- Each special cell has dimensions of 2 μm x 2 μm.
- The first special cell should be placed with an offset of 5 μm from the origin.
Write a TCL script to implement this placement strategy at floorplan stage.
Instructions for Submission:
- Please post your answers in the comment section below.
- For detailed explanations and solutions, check the answers later on compile-vlsi.blogspot.com
Happy Learning !
#scripting #coding #Tcl #pd #physicaldesign #physicalverification #pv #vlsi #design #india #semiconductor #freshers #professional #hardware #floorplanning #motivation #leadership
set H 500
ReplyDeleteset w 1000
set cell_height_width 2
set offset 5
set cell_place [expr $cell_height_width + $offset]
for {set x 5} {$x <= $w} {incr x $cell_place} {
for {set y 5} {$y <= $H} {incr y $cell_place} {
set name "Special_${x}_${y}"
puts "create_cell -ref_name NAND*****ULVT -name $name"
puts "set_cell_location -location/cordinates {$x $y} $name -physical_Status -fixed"
}
}
sample solution
create_cell -ref_name NAND*****ULVT -name Special_5_5
set_cell_location -location/cordinates {5 5} Special_5_5 -physical_Status -fixed
create_cell -ref_name NAND*****ULVT -name Special_5_12
set_cell_location -location/cordinates {5 12} Special_5_12 -physical_Status -fixed
create_cell -ref_name NAND*****ULVT -name Special_5_19
set_cell_location -location/cordinates {5 19} Special_5_19 -physical_Status -fixed
use file handling and save to another file or use catch
let me correct if there are any mistakes