Search This Blog

Friday, October 6, 2023

TCL Script 10

Question:
Write a proc to get the collaterals from  different dir

#!/usr/bin/tclsh

proc getPtpxInputs {hm_name run_tag} {

        set comman_path "/home/kalam/pnr_inputs/"

        set run_area    "$comman_path/$hm_name/$run_tag"

        set ptpx_inputs [list ${hm_name}.v ${hm_name}.map ${hm_name}.sdc]

        set upf_path    [list ${hm_name}.upf]

        foreach input $ptpx_inputs {

               set file_path [file join $run_area $input]

               set upf_path  [file join $comman_path/power_intent $upf_path]

               if {[file exists $file_path] && [file exists $upf_path]} {

                        puts "$file_path"

             }

       }

       puts "$upf_path"

   }

  set hm_name top

  set run_tag run1

getPtpxInputs $hm_name $run_tag

Usage of the script <proc_name> <hm_name> <run_tag>

output:

kalam@DESKTOP-OSJTLNE:~/pnr_inputs$ tclsh  getptpx_inputs.tcl

/home/kalam/pnr_inputs/top/run1/top.v

/home/kalam/pnr_inputs/top/run1/top.map

/home/kalam/pnr_inputs/top/run1/top.sdc

/home/kalam/pnr_inputs/power_intent/top.upf

No comments:

Post a Comment

What is the sanity checks you have done for STA?

 Sanity checks for STA: Linking Checks: We need to check., is there any missing modules or missing pins in a library. this is done by link c...