Difference between revisions of "Pranav"

From Vlsiwiki
Jump to: navigation, search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=FPU=  
 
=FPU=  
  
===Data formats===
+
we assign op=OP_MDDS something to tell the hardware the current opcode
 +
and float64_add_next etc are used to compute the softvalues .. no calculations by hand
  
Page 18-23 SPARCV8.pdf
+
===PLI===
  
[http://www.sparc.org/standards/V8.pdf]
+
tf_putlongp() is a PLI function which puts a 64 int value to the current task or function
  
 +
my_putlongp() is a helper function which takes in dest and value and stores it into that dest with some PLI function...
  
===PSR===
+
similarly for my_getlongp() and my_gettime()
  
[[File:PSR.jpg]]
 
  
[[File:icc.jpg]]
+
==DC SHELL==
  
==ICC implementation details from pg 170(SPARC V8.pdf) ==
+
invoke dc_shell-t -64bit
  
 +
GUI
  
N,Z,V,C ... may be mapped directly to PSR -> check in a few days
+
gui_start
  
 +
== GIT Commands - HOWTO ==
  
Example for an ADD instruction :-
+
git commit //adds the current changes to the local repo
  
Add Instructions operand2 := if (i = 0) then r[rs2] else sign_extend(simm13);
+
git push //makes the changes to the server repo
  
                if (ADD or ADDcc) then
+
git status // to check local rev compares to the main one
                        result ← r[rs1] + operand2;
+
  
                else if (ADDX or ADDXcc) then                            //check what these do
+
git pull //to sync with others
                        result ← r[rs1] + operand2 + C;
+
                next;
+
                if (rd ≠ 0) then                                       
+
                        r[rd] ← result;
+
                if (ADDcc or ADDXcc) then (
+
                        N ← result<31>;
+
                        Z ← if (result = 0) then 1 else 0;
+
                        V ← (r[rs1]<31> and operand2<31> and (not result<31>)) or
+
                            ((not r[rs1]<31>) and (not operand2<31>) and result<31>);
+
                        C ← (r[rs1]<31> and operand2<31>) or
+
                            ((not result<31>) and (r[rs1]<31> or operand2<31>))
+
                );
+
  
 +
git mv foo foo.cpp
  
 +
git add foo.cpp
  
 +
git reset --hard HEAD // reset local repo
  
===sf_float64_2op_check;sf_float64_2op_set===
+
git diff HEAD // diff from last commit
  
Helper function : sf_float64_2op_check
+
=== TO COMMIT - TYPICAL WAY ===
  
called whenever softfloat_check() is called ... which is after the posedge of clk
+
git commit -a -m 'DEBUG: Defaulted to the rank test...'
  
  
and similar for sf_float64_2op_set except that it is called before the posedge of clk
+
== NOTES on terminal commands and search tips ==
  
and int ops have similar helper functions
 
  
 +
NOTES on terminal commands and search tips
  
===simple_result===
+
grep -r <string> * --- To search for a string in folders
  simple_result[state].when      = my_gettime();
+
  simple_result[state].val        = ll_res;
+
  simple_result[state].op        = do_op;
+
  simple_result[state].in_use    = 1;
+
  
 +
find ~ -name "*.*" --- to search for a file
  
saves the pre comp values in a data structure struct Result_Entry... then checked using the fpu generated result....
 
  
 +
=== to open a pdf ===
  
 +
evince <filename>.pdf
  
struct result_entry saves values for checking including number of tests being run
 
  
 +
=== VI skills/UNIX ===
  
 +
search replace
  
32 bit operations are meant to printed out with  masking being involved at some point
+
http://www.thegeekstuff.com/2009/04/vi-vim-editor-search-and-replace-examples/
  
 +
:%s/awesome/wonderful/gc
  
  
we assign op=OP_MDDS something to tell the hardware the current opcode
+
Clear cmd by using ctrl+L instead of typing out clear
and float64_add_next etc are used to compute the softvalues .. no calculations by hand
+
  
 +
To store simulation log in a file say log.txt
  
 +
'''rake test:softfloat_tb >& log.txt'''
  
  
===PLI===
+
Cut or copy lines without counting the lines
  
tf_putlongp() is a PLI function which puts a 64 int value to the current task or function
+
  - In normal mode, go to the beginning of the first mark ---> Type '''mk'''
 +
  - Go to the end of your selection                      ---> '''"ay'k''' (double quotes, <register name from a-z>, <y-yank or d-delete>, single quote, k
 +
 
 +
If you do "ad'k it will delete them from the current location and copy them into register a.
 +
 
 +
<number>dd - delete line
 +
<number>yy - yank  line
  
my_putlongp() is a helper function which takes in dest and value and stores it into that dest with some PLI function...
 
  
similarly for my_getlongp() and my_gettime()
+
==SSH multiple windows==
  
 +
ssh -X mada gnome-terminal &
  
== GIT Commands - HOWTO ==
 
  
git commit //adds the current changes to the local repo
+
==My ~/.vimrc file==
  
git push //makes the changes to the server repo
+
set ai
  
git status // to check local rev compares to the main one
+
syntax on
  
git pull //to sync with others
+
set ic
  
git mv foo foo.cpp
+
set hls
  
git add foo.cpp
+
set ruler
  
git reset --hard HEAD // reset local repo
+
set history=50
  
git diff HEAD // diff from last commit
+
set backspace=2
  
=== TO COMMIT - TYPICAL WAY ===
+
===Alignment===
  
git commit -a -m 'DEBUG: Defaulted to the rank test...'
+
select block of text in visual mode
  
 +
then gq to align
  
== NOTES on terminal commands and search tips ==
+
===search tips===
  
 +
gd to search for word under cursor
  
NOTES on terminal commands and search tips
+
===copy & paste===
  
grep -r <string> * --- To search for a string in folders
+
to copy within blocks
 +
yi{}, yi(), yiw, etc - copy
 +
di{}, di(), diw, etc - cut
  
find ~ -name "*.*" --- to search for a file
+
ctrl+v for block mode vi
  
  
=== to open a pdf ===
+
===Working with multiple files===
  
evince <filename>.pdf
+
:e filename - Edit a file in a new buffer
 +
:bnext (or :bn) - go to next buffer
 +
:bprev (of :bp) - go to previous buffer
 +
:bd - delete a buffer (close a file)
 +
:sp filename - Open a file in a new buffer and split window
 +
ctrl+ws - Split windows
 +
ctrl+ww - switch between windows
 +
ctrl+wq - Quit a window
 +
ctrl+wv - Split windows vertically
  
 +
:fixdel
  
=== VI skills ===
 
  
Cut or copy lines without counting the lines
+
===Logging terminal outputs===
  
  - In normal mode, go to the beginning of the first mark ---> Type '''mk'''
+
Nifty tool for logging the entire interactive session
  - Go to the end of your selection                      ---> '''"ay'k''' (double quotes, <register name from a-z>, <y-yank or d-delete>, single quote, k
+
 
 
+
 
If you do "ad'k it will delete them from the current location and copy them into register a.
+
'''script <outfile.out>'''
 
+
 
<number>dd - delete line
+
ctrl+D to exit or end session
<number>yy - yank  line
+

Latest revision as of 03:32, 12 September 2011

FPU

we assign op=OP_MDDS something to tell the hardware the current opcode and float64_add_next etc are used to compute the softvalues .. no calculations by hand

PLI

tf_putlongp() is a PLI function which puts a 64 int value to the current task or function

my_putlongp() is a helper function which takes in dest and value and stores it into that dest with some PLI function...

similarly for my_getlongp() and my_gettime()


DC SHELL

invoke dc_shell-t -64bit

GUI

gui_start

GIT Commands - HOWTO

git commit //adds the current changes to the local repo

git push //makes the changes to the server repo

git status // to check local rev compares to the main one

git pull //to sync with others

git mv foo foo.cpp

git add foo.cpp

git reset --hard HEAD // reset local repo

git diff HEAD // diff from last commit

TO COMMIT - TYPICAL WAY

git commit -a -m 'DEBUG: Defaulted to the rank test...'


NOTES on terminal commands and search tips

NOTES on terminal commands and search tips

grep -r <string> * --- To search for a string in folders

find ~ -name "*.*" --- to search for a file


to open a pdf

evince <filename>.pdf


VI skills/UNIX

search replace

http://www.thegeekstuff.com/2009/04/vi-vim-editor-search-and-replace-examples/

%s/awesome/wonderful/gc


Clear cmd by using ctrl+L instead of typing out clear

To store simulation log in a file say log.txt

rake test:softfloat_tb >& log.txt


Cut or copy lines without counting the lines

  - In normal mode, go to the beginning of the first mark ---> Type mk
  - Go to the end of your selection                       ---> "ay'k (double quotes, <register name from a-z>, <y-yank or d-delete>, single quote, k
  

If you do "ad'k it will delete them from the current location and copy them into register a.

<number>dd - delete line <number>yy - yank line


SSH multiple windows

ssh -X mada gnome-terminal &


My ~/.vimrc file

set ai

syntax on

set ic

set hls

set ruler

set history=50

set backspace=2

Alignment

select block of text in visual mode

then gq to align

search tips

gd to search for word under cursor

copy & paste

to copy within blocks yi{}, yi(), yiw, etc - copy di{}, di(), diw, etc - cut

ctrl+v for block mode vi


Working with multiple files

e filename - Edit a file in a new buffer
bnext (or :bn) - go to next buffer
bprev (of :bp) - go to previous buffer
bd - delete a buffer (close a file)
sp filename - Open a file in a new buffer and split window

ctrl+ws - Split windows ctrl+ww - switch between windows ctrl+wq - Quit a window ctrl+wv - Split windows vertically

fixdel


Logging terminal outputs

Nifty tool for logging the entire interactive session


script <outfile.out>

ctrl+D to exit or end session