用户工具

站点工具


edastudy:verdi:vc_apps_npi

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
edastudy:verdi:vc_apps_npi [2023/03/17 10:12] – 外部编辑 127.0.0.1edastudy:verdi:vc_apps_npi [2023/07/23 07:50] (当前版本) – [9.1 trace driver] zhangguo
行 282: 行 282:
 connection. \\  connection. \\ 
 3. npiLowConn will indicate the lower (further from the top module) port connection.</color> 3. npiLowConn will indicate the lower (further from the top module) port connection.</color>
 +
 +===== - 实例 =====
 +
 +==== - trace driver ====
 +
 +<code tcl [enable_line_numbers="true",highlight_lines_extra="28,29"]>
 +#source $env(NPIL1_PATH)/npi_L1.tcl
 +
 +proc prepare_Netlist_setting {} {
 +    schSetPreference -detailRTL on -detailMux on -recogFSM off -expandGenBlock on -detailLevel 101 -InferenceLibCell on
 +}
 +
 +proc dump_res_list { resList targetFileHdl } {
 +  set size [ llength $resList ]
 +  for { set i 0 } { $i < $size } { incr i } {
 +    set dlStruct [lindex $resList $i]
 +    puts $targetFileHdl " $i source: [ npi_util_get_hdl_info [lindex $dlStruct 0] 
 +]"
 +    puts $targetFileHdl "   scope: [ npi_util_get_hdl_info [lindex $dlStruct 1] ]"
 +    puts $targetFileHdl "   isPassThrought: [lindex $dlStruct 2] "
 +    puts $targetFileHdl "   numSigUse: [lindex $dlStruct 3] "
 +    puts $targetFileHdl "   useHdl: [ npi_util_get_hdl_info [lindex $dlStruct 4] 
 +]"
 +    set sigList [lindex $dlStruct 5]
 +    set sigSize [llength $sigList]
 +    for { set l 0 } { $l < $sigSize } { incr l } {
 +      puts $targetFileHdl "        [ npi_util_get_hdl_info [lindex $sigList $l] ]"
 +    }
 +
 +
 +    set hdl [lindex $dlStruct 4]
 +    set tmp [npi_get_str -property npiType -object $hdl]
 +    puts $targetFileHdl "t:$tmp"
 +    set tmpStr [ npi_util_decompile_t::decompile $hdl ]
 +    puts $targetFileHdl "tmpStr:$tmpStr";   #可用于获取赋值语句,这样有机会获取到取反信息等, assign a2 = ((~a1) & 'b1)
 +  }
 +}
 +
 +
 +proc main { output_log } {
 +    prepare_Netlist_setting
 +    set LOG [open $output_log "w"]
 +
 +    puts $LOG "================================================================================"
 +    puts $LOG ""
 +
 +    #npi_trace_driver_dump2 { sigHdl { fileHdl “” }  { needPassThrough 1 } { boundaryHdlList {} } { trcOptionsList “1 0 1 1” } }
 +    ::npi_L1::npi_trace_driver_dump2 "top.a2" $LOG
 +    puts $LOG ""
 +    puts $LOG ""
 +    puts $LOG ""
 +
 +
 +    set resList {}
 +    set sigHdl [ npi_handle_by_name -name {top.a2} -scope ""]
 +    ::npi_L1::npi_trace_driver_by_hdl2 $sigHdl "resList"
 +    dump_res_list $resList $LOG
 +
 +
 +    close $LOG
 +}
 +</code>
 +
 +trace log如下:
 +<code>
 +================================================================================
 +
 +npiNet, top.a2, {/home/user01/try_verdi/top.v : 53} /* results of trace driver */
 +Need pass through
 +<1> source: a2, scope: top
 +    <D> npiContAssign, assign a2 = ((~a1) & 'b1), {/home/user01/try_verdi/top.v : 70}
 +          npiConstant, 'b1, (null)
 +          npiNet, top.a1, {/home/user01/try_verdi/top.v : 52}
 +
 +
 +
 + 0 source: npiNet, top.a2, {/home/user01/try_verdi/top.v : 53}
 +   scope: npiModule, top, {/home/user01/try_verdi/top.v : 20}
 +   isPassThrought:
 +   numSigUse:
 +   useHdl: npiContAssign, assign a2 = ((~a1) & 'b1), {/home/user01/try_verdi/top.v : 70}
 +        npiConstant, 'b1, (null)
 +        npiNet, top.a1, {/home/user01/try_verdi/top.v : 52}
 +t:npiContAssign
 +tmpStr:assign a2 = ((~a1) & 'b1)
 +</code>
  
edastudy/verdi/vc_apps_npi.1679019144.txt.gz · 最后更改: 2023/03/17 10:12 由 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki