2019年5月9日 星期四

cadence composer notes

[undo limits]
>> vi ~/.cdsinit

hiSetUndoLimit(10)     

or 
>> vi ~/.cdsenv
ui undoLevel int 10


[parameterized symbol]
fill pPar("parameter") into property boxes
http://www.egr.msu.edu/classes/ece410/mason/files/tutorialD.pdf

[CDL out pin order control]
ref. https://softwareoptimization.wordpress.com/2014/09/05/problem-solved-pin-order-virtuoso-cadence/

Step A:

  1. Open the CELL symbol using the Symbol Editor. Open the Pin Order setup by clicking on: EDIT -> Properties -> Pin Order. In the Edit Pin Order window, set the desired pin order. Click on Apply and OK. Save it.  Close the symbol editor.
  2. Open the CELL schematic using the Schematic Editor. Open the Pin Order setup by clicking on: EDIT -> Properties -> Pin Order. Select COPY From: Symbol, to get the pin order you set on step [A1]. If you didn’t get the desired pin order, change it manually and save it. Close the schematic editor.
  3. Open again (to make sure it was saved) both symbol and schematic and verify if the PIN ORDER is correct. If everything is “ok”, close both editors, if not, fix it by following step [A1] and [A2].

Step B:

  1. Check the root where you execute virtuoso (same directory where the cds.lib and .cdsinit are placed) for the file .simrc
    1. If the file (.simrc) doesn’t exist, create the file .simrc in the directory identified before.
  2. Edit the file (.simrc) and include the line: auCdlCDFPinCntrl=t
    1. If this line was already included, but with different value, change it. This will make the CDL use your PIN ORDER, instead of the default chosen by Cadence.

Step C:

  1. Go to the CIW window, and open the CDF Editor, by clicking on Tools -> CDF -> Edit.
  2. In the “Edit CDF” window, select the Scope: Cell, and  CDF Layer: Base.
  3. Now select the desired LIBRARY and CELL NAME that you want to change the PIN ORDER. You will have to change the PIN ORDER of each cell individually.
  4. After selecting the CELL, select the tab “Simulation Information” and them select “Choose Listing:By Simulator“. Select the simulator “auCdl” .
  5. Now edit the fields as follow. Change the pin names “my_pin_1,2,3” for the desired name/order you have chosen. You probably don’t need to change the namePrefix. Consult the CDF documentation if need any additional customization.
    1. netlistProcedure: ansCdlSubcktCall
    2. componentName: subcircuit
    3. termOrder: “my_pin_1” “my_pin_2” “my_pin_3”
    4. namePrefix: X
  6. Click on APPLY to confirm the change.
  7. Repeat step [C4 to C6] for each desired cell.
! IMPORTANT (STEP C4): The name of the PINS in the “termOrder“, should be enclosed by ” “.  If my cell is a NAND gate with pins A1 A2 ZN, the termOrder will be: “A1” “A2” “ZN”

End:

  1. Go to the CIW window, and open the CDL Exporter, by clicking on File -> Export -> CDL . Choose the desired schematic to export and confirm.
  2. Verify if the CELL pin order is correct. If not, review STEP A,B,C.
    1. Make sure the Step C was done properly. Close the environment, and open it again. Check if your changes were salved.
     
[schematic to layout] IC6
launch -> virtuoso XL -> connectivity -> update -> components and nets...
[ref]
http://www2.ece.rochester.edu/~maricic/autorouter_Cadence_XL.htm
http://web.nchu.edu.tw/~ycchiang/VLSI_Lab/Layout%20fundamental.pdf





2019年4月23日 星期二

omxplayer loop bash on Raspbian + RPi3B

#!/usr/bin/env bash
#
# Plays videos from playlist
#
# Copyright  2013 Janne Enberg http://lietu.net/
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
#

# setup loop times: -1/0: infinite; 1~999: repeat loop
# loop=3
loop=$1
echo "input loop number is: " $loop

# create a playlist in ./ folder
find "$PWD" -name "*.mp4" > playlist.m3u

# Where is the playlist
# PLAYLIST_FILE="${HOME}/.playlist"
PLAYLIST_FILE="playlist.m3u"

# make a copy of the original playlist
cp ${PLAYLIST_FILE} ${PLAYLIST_FILE}.tmp

# If you want to switch omxplayer to something else, or add parameters, use these
PLAYER="omxplayer"
PLAYER_OPTIONS=" -b "

# Process playlist contents
while [ true ]; do
        # Sleep a bit so it's possible to kill this
        sleep 1

        # Do nothing if the playlist doesn't exist
        if [ ! -f "${PLAYLIST_FILE}" ]; then
                echo "Playlist file ${PLAYLIST_FILE} not found"
                continue
        fi
       
        # Get the top of the playlist
        file=$(cat "${PLAYLIST_FILE}.tmp" | head -n1)

        # And strip it off the playlist file
        cat "${PLAYLIST_FILE}.tmp" | tail -n+2 > "${PLAYLIST_FILE}.rest"
        mv "${PLAYLIST_FILE}.rest" "${PLAYLIST_FILE}.tmp"

        # Skip if this is empty
        if [ -z "${file}" ]; then       
                if [ $loop -eq -1 ]; then
                        #cp ${PLAYLIST_FILE} ${PLAYLIST_FILE}.tmp
                        cp ${PLAYLIST_FILE} ${PLAYLIST_FILE}.tmp
                elif [ $loop -gt 1 ]; then               
                        cp ${PLAYLIST_FILE} ${PLAYLIST_FILE}.tmp
                        loop=$(($loop - 1))
                        echo "rest loop number is: " $loop
                else       
                        echo "Playlist empty or bumped into an empty entry for some reason"
                        continue
                fi
        fi

        # Check that the file exists
        if [ ! -f "${file}" ]; then
                echo "Playlist entry ${file} not found"
                continue
        fi

        echo
        echo "Playing ${file} ..."
        echo

        "${PLAYER}" ${PLAYER_OPTIONS} "${file}"

        echo
        echo "Playback complete, continuing to next item on playlist."
        echo    
done

2019年2月26日 星期二

Tapeout note

tone
-clear: 哪裡有圖樣, 挖哪裡,etch where the empty place is
-dark

Field:
-positive:
-negative: 沒保護的挖掉

最後只有兩種 tone/field: D/P or C/N

2019年2月19日 星期二

Laker Technology file

[trace connection setup]

For example: MIM capacitor exists
before:
#*********************************************************************************
#    Connection Definition
#*********************************************************************************
#       Layer1                Layer2                Via Layer       Stop Layer
#---------------------------------------------------------------------------------
tfLayoutConnection {
  def { POLY1                 METAL1                CONT }
  def { METAL1                METAL2                VIA12 }
  def { METAL2                METAL3                VIA23 }
  def { METAL3                METAL4                VIA34 }
}






After:
#*********************************************************************************
#    Connection Definition
#*********************************************************************************
#       Layer1                Layer2                Via Layer       Stop Layer
#---------------------------------------------------------------------------------
tfLayoutConnection {
  def { POLY1                 METAL1                CONT }
  def { METAL1                METAL2                VIA12 }
  def { METAL2                METAL3                VIA23 }

  def { METAL3                METAL4                VIA34 CTM}
  defStopLayer { { {CTM} {METAL4} }  { {CTMDUMMY drawing} } }

}