Difference between revisions of "Pranav"

From Vlsiwiki
Jump to: navigation, search
Line 164: Line 164:
 
set backspace=2
 
set backspace=2
  
:fixdel
+
====:fixdel====

Revision as of 23:28, 30 July 2010

FPU

Data formats

Page 18-23 SPARCV8.pdf

[1]


PSR

PSR.jpg

Icc.jpg

ICC implementation details from pg 170(SPARC V8.pdf)

N,Z,V,C ... may be mapped directly to PSR -> check in a few days


Example for an ADD instruction :-

Add Instructions operand2 := if (i = 0) then r[rs2] else sign_extend(simm13);

                if (ADD or ADDcc) then
                       result ← r[rs1] + operand2;
                else if (ADDX or ADDXcc) then                            //check what these do
                       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>))
                );



sf_float64_2op_check;sf_float64_2op_set

Helper function : sf_float64_2op_check

called whenever softfloat_check() is called ... which is after the posedge of clk


and similar for sf_float64_2op_set except that it is called before the posedge of clk

and int ops have similar helper functions


simple_result

 simple_result[state].when       = my_gettime();
 simple_result[state].val        = ll_res;
 simple_result[state].op         = do_op;
 simple_result[state].in_use     = 1;


saves the pre comp values in a data structure struct Result_Entry... then checked using the fpu generated result....


struct result_entry saves values for checking including number of tests being run


32 bit operations are meant to printed out with masking being involved at some point


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()


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

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


My ~/.vimrc file

set ai

syntax on

set ic

set hls

set ruler

set history=50

set backspace=2

:fixdel