Search This Blog

Saturday, September 30, 2023

Shell scripting

Read the user inputs and execute the script

Example1: 

echo  -n  "Please type your required info"

read info

echo "You're required information is: $info"

Example2:

read -p "Please type your required info" info

echo  "You're required information is: $info""


Example and Example2 both gives the same but, in the example1 there is no read -p

Example2 : read -p --> it will ask a query and assigned to var

Wednesday, September 13, 2023

Lists in TCL scripting

 LISTS keywords and It's Usage 

lindex

lindex is a keyword and it will print the index value of the list.
Example:
   set  NameList  "Naresh Prashanth Sanjeev Manoj  Rajendhar"
   puts [lindex $NameList 0] ; #it will print the 0th index of NameList i,e Naresh
   puts [lindex $NameList 1] 
   puts [lindex $NameList 2] 
         
Explanation:

List index will start from "0" 
Naresh    -----> index 0
Prashanth  ---> index 1
Sanjeev     ---> index 2
Manoj      ----> index 3
Rajendhar ---> index 4

*****************************************************************************

llength

llength is a keyword -it will give you the size of the list.

Example:           
  set  NameList  "Naresh Prashanth  Sanjeev Manoj Rajendhar"
  puts [lindex   $NameList 0] 
  puts [llength  $NameList ] ; #it will print 5 because 5 Names are there in the NameList  

****************************************************************************

lsort

lsort is a keyword -it will sort the list means ascending/Descending order of the List      

Example1:
 set  NumList  "0  9 8 1 3 4"
 puts [lsort $NumList  -ascending ] ; # it will print from small to big
 puts [lsort $NumList  -descending ] ; # it will print from big to small 

 Explanation 1:
 In this example I am taking numerical values     
 Ascending values --> small to big like 0 1 3 4 8 9
 Descending values --> big to small like 9 8 4 3 1 0

Example2:         
 set flist  "Banana Anar Avagado Watermelon Grapes Mango "
 puts [lsort $flist] ; # it will print in alphabetical order

*************************************************************************

lsearch

lsearch is a keyword to search for the element if it is matches it will return 0 otherwise it will return -1 

Example:
    set str "Nag Raju Chandu Mahi"
    lsearch $str Nag

************************************************************************


TCL Basics

 TCL  
Tool Command language

Keywords in TCL

  • puts
  • expr
  • $
  • incr
  • info exists
  • split
  • concat

    LIST keywords

    • lindex
    • llength
    • lsort
    • lreplace
    • linsert
    • lappend
    • lsearch
    • lappend

    Saturday, August 12, 2023

    Basics power anaysis

    Power

    • Dynamic power:
      • Power consumed by the cell when it is active mode.
    • Switching Power:
      • Power dissipated by the charging and discharging of the output load capacitance of a cell is called switching power.
      • Switching power of a cell is a function of output load capacitance and the rate of logic transitions.
    • Internal Power:
      • Power dissipated by charging and discharging of internal capacitance within the boundary of the cell is called Internal power.
    • Short circuit power
      • Power dissipated when a small amount of time both the PMOS and NMOS transistors are turns on.
      • there is short circuit established from VDD to VSS.
    • Leakage power
      • Power dissipated by the cell or circuit when it is in stand by mod or inactive mode.
        

    Friday, December 16, 2022

    How to convert Nand gate to Inverter

     NAND Gate:

    If both the inputs A and B are same output Y becomes 0 otherwise 1

    Truth table of NAND Gate

    A     B    Y

    0      0     1

    0      1     1

    1      0     1

    1      1     0


    Inverter gate 

    The output of the gate is reciprocal to the input of the gate is called inversion 

    Example:

    If you provide the input as 1 the output gone be 0
    if you provide the input as 0 the output becomes 1

    If  you connect the both inputs  A and B , the output becomes inversion of the input, Mentioned both the inputs A and B which are shorted. so it acts a single input to the NAND gate and it will give the inversion of the input

    A   B  Y

    0    0   1

    1    1   0

    How to covert XOR gate to Buffer

     XOR gate:

    When both the inputs are different the output becomes one (1), otherwise output becomes zero 

    Buffer:

    Buffer is used for increasing the signal strength which means it acts as a repeater -the output is same as input

    If we connect anyone of the input of the XOR gate is connected to the ground , remaining input what ever the input we given to that gate will get the same output.


    Consider input B pin is connected to the ground means 0 , if we provide input to the A pin  XOR gate output pin Y we should get the same (Y=A)


    A   B   Y

    0    0     0

    1    0     1

    Tuesday, July 12, 2022

    Power Analysis Inputs

    Power Analysis

     Inputs For power Analysis

    1. Netlist
    2. Constraints
    3. Upf
    4. Liblist
    5. Vcd name
    6. Tb_top_instance
    7. Ptpx_clock_period
    8. Rail Names 
    9. Sdf (Optional)
    10. Spef (Optional)
    11. Mapping file

    Netlist: - 

    -We should Provide the flat netlist otherwise should miss the interface information

    -We should mention the Netlist of ram's because who libs don't have the Power information

    -We should mention the Top-level Netlist and black level Netlists

    Liblist:

    -Give all the standard cells and memories Libs which will have the power information

    Spef

    -Spef contains the wire capacitance

    Constraints

    -From this file, we can read the transition of the Pin (If you have already flat constraints, you can use it otherwise use hierarchical constraints because we are not considering the False path, multi cycle paths, and Half cycle paths

    UPF:

    -Where you have the Power connectivity and voltage, Rail information

    VCD:

    -We can get the Activity information from this File

    TB_top_instance:

    -For which black do you want to do the power analysis this will indicate that hm

    PTPx_clk_period:

    -We can take the Dominant clock, clock period for ptpx because it will reach the maximum percentage of the flops

    Rails:

    -Rail names we can get them from the UPF file

    SDF
    -Where we have the exact interconnect and Call delays are present

    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...