Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

ASIC/FPGA Design and Verification Out Source Services

This page show a little script to create a soft link in a given directory to all assorted coverage files.

  1. This script was targeted to specman tool. After regression the coverage files are in different directories. The scripts creates soft links in a single directory. the soft link includes the name found plus the directory name to overcome same seed case, by creating a unique name per each entry.

  2. #!/bin/bash

    if [ "$1" = "ucd" ] ; then
      if [ "$2" = "" ] ; then
        echo -n "you "
        tput bold;
        echo -n "must "
        tput sgr0
        echo "enter a destination directory if you select the ucd script generation"
        exit
      fi
      ucd_cnt="0"
      echo -n "prepare ucd soft link / copy script "
      tput bold;
      echo "link_ucd.sh"
      tput sgr0
      if [ -e "link_ucd.sh" ] ; then
        \rm -f link_ucd.sh
      fi
      for f in $(find ./ -name "*.ucd"); do
        ucd_cnt=$[$ucd_cnt+1]
        ucd_mod=$(($ucd_cnt % $cnt_prg))
        if [ $ucd_mod -eq "0" ] ; then
          echo -ne "${ucd_mod} ucd files processed so far\r"
        fi


        f1=`echo $f | sed "s/\.\/ucd_tests//g"`
        f2=`echo $f1 | sed "s/\//_/g"`
        f1=`echo $f2 | sed "s/^\.//"`
        f3=c"$f1"
      # f4="ln -s"
        f4="cp -f"
        f5="$f4 $f ${2}"/"$f3"
        echo "$f5" >> link_ucd.sh
      done
    fi


  3. A few words on the bash script:
    If you don't enter the first parameter as ucd, the script does nothing.
    If you enter the first parameter, it must be followed by a second parameter. If you forget, to specify the second parameter, it will exit and print an error message, using bash echo font bold option.

Contact me now at:

  ...


I would be happy to offer my services. Call ASAP !


Home

E1 CRC specman code


Text to Integer specman code


Download Area






Search This Site


Feedback This Site




new pages on this site