|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 wlyy 于 2025-4-1 14:54 编辑
我希望使用INNOVUS能够批量的自动生成布局,然后进行布线并获取DRC情况,目前使用的芯片基准是ispd 2015提供的benchmark。
我当前生成随机布局的思路是:随机选择一个宏单元 -> 在合理范围内随机选择一个坐标点 -> 随机选择一个放置方向,然后使用`placeInstance`命令放置该宏单元,剩余的宏单元则使用`planDesign`命令放置。
部分TCL代码如下:
- proc place_randomly {} {
- expr {srand([clock milliseconds])}
- # 1. set the basic variables
- set orientation {"R0" "R90" "R180" "R270" "MX" "MY" "MX90" "MY90"}
- set width [dbGet top.fPlan.box_sizex]
- set height [dbGet top.fPlan.box_sizey]
- # 2. choose one macro randomly
- set macros [dbGet top.insts.cell.subclass block -p2]
- set random_index [expr {int(rand() * [llength $macros])}]
- set random_macro [lindex $macros $random_index]
- # 3. get the random origin of macro
- set x_range [expr {$width - [dbGet $random_macro.box_sizex]}]
- set y_range [expr {$height - [dbGet $random_macro.box_sizey]}]
- set max_range [expr {max($x_range, $y_range)}]
- set x_start [expr {1 + int(rand() * ($width - $max_range - 1))}]
- set y_start [expr {1 + int(rand() * ($height - $max_range - 1))}]
- # 4. place the macro
- set macro_name [dbGet $random_macro.name]
- set random_orientation [lindex $orientation [expr {int(rand() * [llength $orientation])}]]
- placeInstance $macro_name $x_start $y_start -fixed $random_orientation
- # puts "***************\n***************\n Placed $macro_name at ($x_start, $y_start) with orientation $random_orientation\n***************\n***************\n"
- }
- proc run_design {chip save_dir} {
- # 1. import design
- loadLefFile $chip/tech.lef
- loadLefFile $chip/cells.lef
- loadDefFile $chip/floorplan.def
- # 2. clear placement and floorplanning
- # unplaceAllInsts
- unplaceAllBlocks
- deleteAllInstGroups
- deletePlaceBlockage -all
- # 3. P&R flow and get feature files
- place_randomly
- setPlanDesignMode -boundaryPlace true -effort high -legalize true -incremental false
- planDesign
- place_opt_design -place
- earlyGlobalRoute
- dumpCongestArea -all [file join $save_dir eGR_congestion.rpt]
- setNanoRouteMode -envNumberProcessor 8
- globalRoute
- dumpNanoCongestArea -all [file join $save_dir GR_congestion.rpt]
- defOut -floorplan -routing [file join $save_dir floorplan.def]
- set macro_file [open [file join $save_dir macro_coordinates.csv] w]
- foreach macro [dbGet top.insts.cell.subclass block -p2] {
- set macroName [dbGet $macro.name]
- set box [dbGet $macro.box]
- puts $macro_file "$macroName,$box"
- }
- close $macro_file
- set inst_file [open [file join $save_dir inst_coordinates.csv] w]
- foreach inst [dbGet top.insts] {
- set instName [dbGet $inst.name]
- set box [dbGet $inst.box]
- puts $inst_file "$instName,$box"
- }
- close $inst_file
- set net_file [open [file join $save_dir net_coordinates.csv] w]
- foreach net [dbGet top.nets] {
- set netName [dbGet $net.name]
- set box [dbGet $net.box]
- set pins [dbGet $net.instTerms.pt]
- puts $net_file "$netName,$box,$pins"
- }
- close $net_file
- detailRoute
- verify_drc -report [file join $save_dir drc.rpt] ;# maybe shuould specify the argument -check_only all
- # 4. clear design
- freeDesign
- }
复制代码
但是这个过程中遇到一些问题:
布线之后,产生的DRC Violation有点过于多了,大概到了百万级别。
图1 DRC Violation
上图使用的芯片基准为`mgc_edit_dist_a`,布局文件在附件(floorplan.zip)中,NanoRoute共报告Violation 1330434个,其中有1052074个Violation的类型为Metal_short。
由于我不是集成电路专业的(本人计算机专业),对相关知识的了解实在浅显,因此我在布局过程中,使用`unplaceAllBlocks``deleteAllInstGroups``deletePlaceBlockage -all`等命令清理了布局,然后只更改了宏单元的位置,电源规划则沿用了原来的设置,不太清楚是否与此有关。
我在这个帖子下(后端新手,布线后出现好多violations,不知道怎么debug - 后端讨论区 - EETOP 创芯网论坛 (原名:电子顶级开发网) -)看到有人回复说可能是floorplan和powerplan的问题,那么我应该怎样去改脚本呢?
|
|