在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 203|回复: 2

[求助] 使用INNOVUS进行批量的自动布局布线过程中,出现大量violation

[复制链接]
发表于 4 天前 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 wlyy 于 2025-4-1 14:54 编辑

我希望使用INNOVUS能够批量的自动生成布局,然后进行布线并获取DRC情况,目前使用的芯片基准是ispd 2015提供的benchmark。


我当前生成随机布局的思路是:随机选择一个宏单元 -> 在合理范围内随机选择一个坐标点 -> 随机选择一个放置方向,然后使用`placeInstance`命令放置该宏单元,剩余的宏单元则使用`planDesign`命令放置。
部分TCL代码如下:





  1. proc place_randomly {} {
  2.     expr {srand([clock milliseconds])}

  3.     # 1. set the basic variables
  4.     set orientation {"R0" "R90" "R180" "R270" "MX" "MY" "MX90" "MY90"}
  5.     set width [dbGet top.fPlan.box_sizex]
  6.     set height [dbGet top.fPlan.box_sizey]

  7.     # 2. choose one macro randomly
  8.     set macros [dbGet top.insts.cell.subclass block -p2]
  9.     set random_index [expr {int(rand() * [llength $macros])}]
  10.     set random_macro [lindex $macros $random_index]

  11.     # 3. get the random origin of macro
  12.     set x_range [expr {$width - [dbGet $random_macro.box_sizex]}]
  13.     set y_range [expr {$height - [dbGet $random_macro.box_sizey]}]
  14.     set max_range [expr {max($x_range, $y_range)}]
  15.     set x_start [expr {1 + int(rand() * ($width - $max_range - 1))}]
  16.     set y_start [expr {1 + int(rand() * ($height - $max_range - 1))}]

  17.     # 4. place the macro
  18.     set macro_name [dbGet $random_macro.name]
  19.     set random_orientation [lindex $orientation [expr {int(rand() * [llength $orientation])}]]
  20.     placeInstance $macro_name $x_start $y_start -fixed $random_orientation

  21.     # puts "***************\n***************\n Placed $macro_name at ($x_start, $y_start) with orientation $random_orientation\n***************\n***************\n"
  22. }



  23. proc run_design {chip save_dir} {
  24.     # 1. import design
  25.     loadLefFile $chip/tech.lef
  26.     loadLefFile $chip/cells.lef
  27.     loadDefFile $chip/floorplan.def

  28.     # 2. clear placement and floorplanning
  29.     # unplaceAllInsts
  30.     unplaceAllBlocks
  31.     deleteAllInstGroups
  32.     deletePlaceBlockage -all

  33.     # 3. P&R flow and get feature files
  34.     place_randomly
  35.     setPlanDesignMode -boundaryPlace true -effort high -legalize true -incremental false
  36.     planDesign

  37.     place_opt_design -place

  38.     earlyGlobalRoute
  39.     dumpCongestArea -all [file join $save_dir eGR_congestion.rpt]

  40.     setNanoRouteMode -envNumberProcessor 8
  41.     globalRoute
  42.     dumpNanoCongestArea -all [file join $save_dir GR_congestion.rpt]
  43.     defOut -floorplan -routing [file join $save_dir floorplan.def]

  44.     set macro_file [open [file join $save_dir macro_coordinates.csv] w]
  45.     foreach macro [dbGet top.insts.cell.subclass block -p2] {
  46.         set macroName [dbGet $macro.name]
  47.         set box     [dbGet $macro.box]

  48.         puts $macro_file "$macroName,$box"
  49.     }
  50.     close $macro_file

  51.     set inst_file [open [file join $save_dir inst_coordinates.csv] w]
  52.     foreach inst [dbGet top.insts] {
  53.         set instName [dbGet $inst.name]
  54.         set box     [dbGet $inst.box]

  55.         puts $inst_file "$instName,$box"
  56.     }
  57.     close $inst_file

  58.     set net_file [open [file join $save_dir net_coordinates.csv] w]
  59.     foreach net [dbGet top.nets] {
  60.         set netName [dbGet $net.name]
  61.         set box     [dbGet $net.box]
  62.         set pins     [dbGet $net.instTerms.pt]

  63.         puts $net_file "$netName,$box,$pins"
  64.     }
  65.     close $net_file

  66.     detailRoute
  67.     verify_drc -report [file join $save_dir drc.rpt] ;# maybe shuould specify the argument -check_only all

  68.     # 4. clear design
  69.     freeDesign
  70. }


复制代码



但是这个过程中遇到一些问题:

布线之后,产生的DRC Violation有点过于多了,大概到了百万级别。

图1 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的问题,那么我应该怎样去改脚本呢?

ispd_2015_contest_benchmark.zip

18.34 MB, 下载次数: 3 , 下载积分: 资产 -6 信元, 下载支出 6 信元

所使用的部分benchmark

floorplan.zip

7.65 MB, 下载次数: 4 , 下载积分: 资产 -3 信元, 下载支出 3 信元

mgc_edit_dist_a的布局文件

 楼主| 发表于 3 天前 | 显示全部楼层
我刚刚发现一个问题,ispd2015的芯片读进来之后,执行verify_drc就会得到30w个violation
init.png
 楼主| 发表于 3 天前 | 显示全部楼层
感觉可能是电源的问题,刚刚使用`get_pg_pins`命令获取idpd2015其中一个芯片的宏单元的pg引脚,结果是空的。
pgpins.png

而且不知为何,我在`detailRoute`之后,执行`verify_drc -check_only regular`,还是会得到大量的报错。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-4-5 13:33 , Processed in 0.018919 second(s), 8 queries , Gzip On, MemCached On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表