Monday, 9 May 2011

vlsi commands




FREQUENTLY USED CVS COMMANDS
  1. Check-out
  2. cvs co <file/dir>
  3. Check-in
  4. cvs ci –m "<message>" <file> or cvs ci <file> (message can be given in vi editor) "commit" can also be used alternatively instead of "ci"
  5. Addition of new file
  6. Copy the file to the directory of check-in, and give following two commands cvs add <file> cvs ci –m "<message>" <file>
  7. Addition of new directory
  8. Go to the directory under which new sub directory needs to be created, mkdir <new-dir> è Create dir chown <current-grp>:cvsg <new-dir> è Change the group to "cvsg" cvs add <new-dir> è add to repository
  9. Update
  10. cvs up <file> è Updates local copy to latest version if sticky tag is reset cvs up –A <file> è Updates local copy to latest version by resetting the sticky tag cvs up –r <version> <file> Updates the local copy to the version specified, sticky tag will be set to <version> after execution of this command. "cvs up <file>" command will update the local copy to version <version> if the sticky tag is set to <version>. Always better to –A option to get the latest version (top of tree) cvs up –r <tag> <file> è update the copy with specified tag from repository
  11. Removing a file
  12. Usage: cvs remove [-flR] [files...] -f Delete the file before removing it. -l Process this directory only (not recursive). -R Process directories recursively.
  13. Finding the status
  14. cvs stat <file>
  15. Check-in history
  16. cvs log <file>
  17. Diff
  18. cvs diff <file> è diffs the local copy with repository copy (latest) cvs diff –r <ver1> -r <ver2> <file> è diffs the file of two versions specified.
  19. Help on particular command
  20. cvs <command> --help
  21. Header related fields (automatically filled)
  22. File name : $RCSfile $ Check-in author : $Author $ Revision : $Revision $ Last Modified : $Date $ Id : $Id $ Footer related fields (automatically filled) $Log $
  23. CVS e-mail notification
  24. Go to the CVSROOT directory of <project> directory (login as root) and add following line in "loginfo"file. <project_name> mail –s %s: <email_id_1>, <email_id_2>
  25. CVS Import of project (first time)
cvs import <project> <project> start
Code Coverage
Structural code coverage locates areas of a program that were not exercised by a set of test cases. Functional coverage assures that the major functions of the design have been adequately tested.

Code coverage measures how thoroughly a testbench exercises the lines of HDL code that describe a design. The coverage results reveal the areas of the design that have not been fully tested, or that did not meet a desired coverage criteria. When provided with this information, you can develop tests to target the untested or under tested areas.
For example, block coverage information can tell you whether or not various sections of the design were ever stimulated by test vectors. FSM coverage can help you determine whether or not all possible states in a state machine were visited.
Functional coverage is generated by inserting PSL, SystemVerilog assertion statements, or SystemVerilog covergroup statements into the HDL code and simulating the design. The assertions create functional coverage points that specify test scenarios that you want to cover. Functional coverage shows the amount of design functionality exercised simulation, which can help prove that a design is functionally correct.
Block coverage monitors all exercisable blocks in the Verilog/VHDL source code and identifies those not exercised during simulation.
Expression coverage monitors expressions in continuous assignments and procedural control constructs (if/case conditions).
Toggle coverage—reports coverage based on signal activity.
Finite state machine coverage Shows state visitation and arcs.


Linux commands


Show list of files in current directory
ls
à long, a à hidden, r à alphabetical order, t à timestamp

Changing the permissions of files/directories
chmod +x <filename>
chmod +w <filename>
chmod +r <filename>
chmod 744 <filename>
chmod 777 <filename>
Ex. 777 = 111 111 111 = {owner, group, others}
111 = {r, w, x} = {read, write, execute}

Copy the files/directory to destination
cp source destination à copies destination to source (file)
cp –r source destination à copies recursively (directory)


man <command> à help of the command
Ex. man mv
cd <dir_name> à change directory
mkdir <dir_name> à create new directory
cd à go to home directory
pwd à displays present working directory

find . –name "*.v" à finds all files with extension .v recursively from current location
find . –name "*.v" –print
find . –type d à all the directories from current location recursively
find ~ -type d à all the directories from /home/$USER/ recursively
find . –type f à all the files from current location recursively
find ~ -type f à all the files from current location recursively
find . –size 0 à zero length files
find . –exec grep "word" {} \; -print à find word in all files recursively

Display disk space
du(disk usage)
du –s ., du -sk à number of blocks on disk, suppress individual directory details
du, du ., du –sk * à space in Kilobytes, individual dir/file wise
df, df –k . à total space , disk free command


rm <file_name> à removes the file
rm –i <file_name> à interactive remove
rm –rf <dir> à removes directory
rm <dir> à if directory is empty

head <file> à displays first 10 lines of the file
head –n <file> à displays first n lines of the file
tail <file> à last 10 lines
tail –n <file> à last n lines

Global Regular Expression Parser (GREP)
grep "word" <file> à searches for the word in the file
grep "^module" <file> à searches for the lines start with "module"
grep "^module$" <file> à searches for the lines end with "module"
grep "word" <file> | wc –l à searches for word in file and gives the number of occurrences
à Unix pipe, output of one command is given as input to the next command

sort <file> à sorts the file in alphabetical order
sort <file> > sorted_file à sorts and output will be redirected to sorted_file
>> à append mode
à overwrite mode

wc (word count)
wc <file> à displays line, word, character count of the file
wc –l <file à only line count
wc –w <file> à only word count
wc –c <file> à only character count

diff <file1> <file2> à diffs two files
diff –r –w <dir1> <dir2> à diffs two directories
sdiff <file1> <file2> à diffs and results will be placed side by side

cat <file> à displays file contents
cat <file> | more à displays one page(one screen on console) at a time, goes to second screen on pressing space bar (more command – can be piped with any other command)

mv <file1> <file2> à renaming the file, can also be used to move the files in different directories


SYSTEM LEVEL COMMANDS
ps –l à own process details
ps –la à all processes
ps –u <user> à process details of particular user
ps –u <user> | grep <keyword> à searches for particular process of a particular user, process defined by keyword
kill -9 <PID> à kill process having ID, PID (sure kill)
env à lists environment variables and their values
env | grep <user> à environment variables of particular user
setenv CVSROOT /proj/asics in .cshrc file à setting up environment variable
setenv CVSROOT = /proj/asics/ in bash à setting up environment variable
echo $ENV_VARIABLE à displaying the value of environment variable ENV_VARIABLE
who à list of users logged in
who am i à current user
which perl à perl source directory
alias dir ‘ls –l | grep ^d’ à alias for listing directories
alias ll ‘ls –l | more’


VI EDITOR COMMANDS
  • :q à close file
  • vi à create/open new file
  • /<word_tobe_searched>
  • :w à save file
  • :wq à save and quit from file
  • :q! à quit from a read only file
  • :wq! à save and quit from a read only file
  • :0 à go to first line
  • :1 à go to first line
  • à go to the last line
  • ctrl+g à prints total number of lines and current line in %
  • :%s?<string_tobe_replaced>?<new_string>g à global search and replace
  • à go to previous line
  • à go to next line
  • à go to next character and insert mode
  • à insert mode
  • escape à come out of insert mode
  • à go to the next line and insert mode
  • à Page up
  • à Page down
  • à go to previous character
  • à go to next character
  • à delete character
  • dd à delete single line
  • n dd à delete n lines
  • m a à mark current line with ‘a’
  • ` a à go to the line marked ‘a’
  • :’a,’by à copy the lines marked between ‘a’ and ‘b’
  • :e <file> à opens second file
  • yy, p à copy & paste
  • dd, p à cut & paste
  • n yy à copy n lines
  • :r <file> à inserts the file contents specified in to current file after current line (cursor)
  • r <c> à replaces current character with ‘c’
  • ctrl + d à half screen down
  • ctrl + u à half screen up
  • à go to start of line
  • à go to end of line
  • à go to the next word
  • à go to the next character
  • à go to the end of current word
  • dw à delete current word
  • cw à replace current word
  • cc à replace current line
  • à execute previous command
  • :sp <file> à opens other file specified in the same screen, ctrl+ww can be used to shift between files
  • à join the next line to current line
  • Shift+5 à matching begin end

No comments:

Post a Comment