changeset 4:ddfcbc21b5c2

Data structures for Context Unit
author sohan
date Wed, 07 Mar 2012 17:25:55 +0100
parents 03de56d9aad5
children e5dfca080b0f
files contextUnitElem.h
diffstat 1 files changed, 60 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/contextUnitElem.h	Wed Mar 07 17:25:55 2012 +0100
     1.3 @@ -0,0 +1,60 @@
     1.4 +/*
     1.5 + *  Copyright 2011 OpenSourceStewardshipFoundation.org
     1.6 + *  Licensed under GNU General Public License version 2 
     1.7 + */
     1.8 +
     1.9 +#ifndef CONTEXT_UNIT_
    1.10 +#define CONTEXT_UNIT_
    1.11 +
    1.12 +#include<stdbool.h>
    1.13 +//==============================  Structures  ==============================
    1.14 +struct
    1.15 + { 
    1.16 +    bool ReadyForIF;
    1.17 +    bool InIF;
    1.18 +    bool DoneWithIF;
    1.19 + }
    1.20 +IFState;
    1.21 +
    1.22 +struct
    1.23 + {
    1.24 +    bool ReadyForPipe;
    1.25 +    bool InPipe;
    1.26 +    bool DoneWithPipe;
    1.27 + }
    1.28 +PipeState;
    1.29 +
    1.30 +struct
    1.31 +{
    1.32 +    bool NotinLdSt;
    1.33 +    bool InLdSt;
    1.34 +}
    1.35 +LdStState;
    1.36 +
    1.37 +struct
    1.38 +{
    1.39 +    struct IFState IF;
    1.40 +    struct PipeState PS;
    1.41 +    struct LdStState LS;
    1.42 +    
    1.43 +}
    1.44 +FsmState;
    1.45 +
    1.46 +typedef struct
    1.47 +{
    1.48 +    int ContextId;
    1.49 +    int CurrentPc;
    1.50 +    int NewPc;
    1.51 +    int Instr;
    1.52 +    struct FsmState FS;
    1.53 +}
    1.54 +ContextUnit;
    1.55 +
    1.56 +//==============================  Functions  ================================
    1.57 +
    1.58 +//===========================================================================
    1.59 +
    1.60 +#endif /**/
    1.61 +
    1.62 +
    1.63 +