diff core/sim/bdir_dut/Processor.bi @ 1:91a1f76ddd62 pygar svn.2

[svn r2] Adding initial lab 5 source
author punk
date Tue, 13 Apr 2010 17:34:33 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/core/sim/bdir_dut/Processor.bi	Tue Apr 13 17:34:33 2010 -0400
     1.3 @@ -0,0 +1,126 @@
     1.4 +signature Processor where {
     1.5 +import ¶Assert®¶;
     1.6 +		
     1.7 +import ¶ConfigReg®¶;
     1.8 +		   
     1.9 +import ¶Counter®¶;
    1.10 +		 
    1.11 +import ¶FIFOF_®¶;
    1.12 +		
    1.13 +import ¶FIFOF®¶;
    1.14 +	       
    1.15 +import ¶FIFO®¶;
    1.16 +	      
    1.17 +import ¶Inout®¶;
    1.18 +	       
    1.19 +import ¶List®¶;
    1.20 +	      
    1.21 +import BFIFO;
    1.22 +	    
    1.23 +import ¶Clocks®¶;
    1.24 +		
    1.25 +import ¶ListN®¶;
    1.26 +	       
    1.27 +import ¶Monad®¶;
    1.28 +	       
    1.29 +import ¶PrimArray®¶;
    1.30 +		   
    1.31 +import ¶RWire®¶;
    1.32 +	       
    1.33 +import ¶RegFile®¶;
    1.34 +		 
    1.35 +import SFIFO;
    1.36 +	    
    1.37 +import ¶Vector®¶;
    1.38 +		
    1.39 +import ¶Connectable®¶;
    1.40 +		     
    1.41 +import ¶GetPut®¶;
    1.42 +		
    1.43 +import ¶ClientServer®¶;
    1.44 +		      
    1.45 +import Trace;
    1.46 +	    
    1.47 +import MemTypes;
    1.48 +	       
    1.49 +import ProcTypes;
    1.50 +		
    1.51 +import BRegFile;
    1.52 +	       
    1.53 +import BranchPred;
    1.54 +		 
    1.55 +interface (Processor.ProcStats :: *) = {
    1.56 +    Processor.num_cycles :: ¶GetPut®¶.¶Get®¶ ProcTypes.Stat;
    1.57 +    Processor.num_inst :: ¶GetPut®¶.¶Get®¶ ProcTypes.Stat
    1.58 +};
    1.59 + 
    1.60 +instance Processor ¶Prelude®¶.¶PrimMakeUndefined®¶ Processor.ProcStats;
    1.61 +								      
    1.62 +instance Processor ¶Prelude®¶.¶PrimDeepSeqCond®¶ Processor.ProcStats;
    1.63 +								    
    1.64 +instance Processor ¶Prelude®¶.¶PrimMakeUninitialized®¶ Processor.ProcStats;
    1.65 +									  
    1.66 +interface (Processor.CPUToHost :: *) = {
    1.67 +    Processor.cpuToHost :: ¶Prelude®¶.¶Int®¶ 32 -> ¶Prelude®¶.¶Bit®¶ 32 {-# arg_names = [req] #-}
    1.68 +};
    1.69 + 
    1.70 +instance Processor ¶Prelude®¶.¶PrimMakeUndefined®¶ Processor.CPUToHost;
    1.71 +								      
    1.72 +instance Processor ¶Prelude®¶.¶PrimDeepSeqCond®¶ Processor.CPUToHost;
    1.73 +								    
    1.74 +instance Processor ¶Prelude®¶.¶PrimMakeUninitialized®¶ Processor.CPUToHost;
    1.75 +									  
    1.76 +interface (Processor.Proc :: *) = {
    1.77 +    Processor.dmem_client :: ¶ClientServer®¶.¶Client®¶ MemTypes.DataReq MemTypes.DataResp;
    1.78 +    Processor.imem_client :: ¶ClientServer®¶.¶Client®¶ MemTypes.InstReq MemTypes.InstResp;
    1.79 +    Processor.statsEn_get :: ¶GetPut®¶.¶Get®¶ ¶Prelude®¶.¶Bool®¶;
    1.80 +    Processor.stats :: Processor.ProcStats;
    1.81 +    Processor.tohost :: Processor.CPUToHost
    1.82 +};
    1.83 + 
    1.84 +instance Processor ¶Prelude®¶.¶PrimMakeUndefined®¶ Processor.Proc;
    1.85 +								 
    1.86 +instance Processor ¶Prelude®¶.¶PrimDeepSeqCond®¶ Processor.Proc;
    1.87 +							       
    1.88 +instance Processor ¶Prelude®¶.¶PrimMakeUninitialized®¶ Processor.Proc;
    1.89 +								     
    1.90 +data (Processor.Stage :: *) = Processor.PCgen () | Processor.Exec () | Processor.Writeback ();
    1.91 +											     
    1.92 +instance Processor ¶Prelude®¶.¶PrimMakeUndefined®¶ Processor.Stage;
    1.93 +								  
    1.94 +instance Processor ¶Prelude®¶.¶PrimDeepSeqCond®¶ Processor.Stage;
    1.95 +								
    1.96 +instance Processor ¶Prelude®¶.¶PrimMakeUninitialized®¶ Processor.Stage;
    1.97 +								      
    1.98 +instance Processor ¶Prelude®¶.¶Eq®¶ Processor.Stage;
    1.99 +						   
   1.100 +instance Processor ¶Prelude®¶.¶Bits®¶ Processor.Stage 2;
   1.101 +						       
   1.102 +interface (Processor.BRFile :: *) = {
   1.103 +    Processor.wr :: ProcTypes.Rindx ->
   1.104 +		    ¶Prelude®¶.¶Bit®¶ 32 -> ¶Prelude®¶.¶Action®¶ {-# arg_names = [rindx, ¡data¡] #-};
   1.105 +    Processor.rd1 :: ProcTypes.Rindx -> ¶Prelude®¶.¶Bit®¶ 32 {-# arg_names = [rindx] #-};
   1.106 +    Processor.rd2 :: ProcTypes.Rindx -> ¶Prelude®¶.¶Bit®¶ 32 {-# arg_names = [rindx] #-}
   1.107 +};
   1.108 + 
   1.109 +instance Processor ¶Prelude®¶.¶PrimMakeUndefined®¶ Processor.BRFile;
   1.110 +								   
   1.111 +instance Processor ¶Prelude®¶.¶PrimDeepSeqCond®¶ Processor.BRFile;
   1.112 +								 
   1.113 +instance Processor ¶Prelude®¶.¶PrimMakeUninitialized®¶ Processor.BRFile;
   1.114 +								       
   1.115 +Processor.mkBRFile :: (¶Prelude®¶.¶IsModule®¶ _m__ _c__) => _m__ Processor.BRFile;
   1.116 +										 
   1.117 +Processor.slt :: ¶Prelude®¶.¶Bit®¶ 32 -> ¶Prelude®¶.¶Bit®¶ 32 -> ¶Prelude®¶.¶Bit®¶ 32;
   1.118 +										     
   1.119 +Processor.sltu :: ¶Prelude®¶.¶Bit®¶ 32 -> ¶Prelude®¶.¶Bit®¶ 32 -> ¶Prelude®¶.¶Bit®¶ 32;
   1.120 +										      
   1.121 +Processor.rshft :: ¶Prelude®¶.¶Bit®¶ 32 -> ¶Prelude®¶.¶Bit®¶ 32;
   1.122 +							       
   1.123 +Processor.findwbf :: ProcTypes.Rindx -> ProcTypes.WBResult -> ¶Prelude®¶.¶Bool®¶;
   1.124 +										
   1.125 +Processor.stall :: ProcTypes.Instr ->
   1.126 +		   SFIFO.SFIFO ProcTypes.WBResult ProcTypes.Rindx -> ¶Prelude®¶.¶Bool®¶;
   1.127 +										       
   1.128 +Processor.mkProc :: (¶Prelude®¶.¶IsModule®¶ _m__ _c__) => _m__ Processor.Proc
   1.129 +}