diff core/sim/bdir_dut/DataCacheBlocking.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/DataCacheBlocking.bi	Tue Apr 13 17:34:33 2010 -0400
     1.3 @@ -0,0 +1,106 @@
     1.4 +signature DataCacheBlocking where {
     1.5 +import ¶Assert®¶;
     1.6 +		
     1.7 +import ¶Counter®¶;
     1.8 +		 
     1.9 +import ¶FIFOF_®¶;
    1.10 +		
    1.11 +import ¶FIFOF®¶;
    1.12 +	       
    1.13 +import ¶FIFO®¶;
    1.14 +	      
    1.15 +import ¶Inout®¶;
    1.16 +	       
    1.17 +import ¶List®¶;
    1.18 +	      
    1.19 +import BFIFO;
    1.20 +	    
    1.21 +import ¶Clocks®¶;
    1.22 +		
    1.23 +import ¶ListN®¶;
    1.24 +	       
    1.25 +import ¶PrimArray®¶;
    1.26 +		   
    1.27 +import ¶RegFile®¶;
    1.28 +		 
    1.29 +import ¶Vector®¶;
    1.30 +		
    1.31 +import ¶Connectable®¶;
    1.32 +		     
    1.33 +import ¶GetPut®¶;
    1.34 +		
    1.35 +import ¶ClientServer®¶;
    1.36 +		      
    1.37 +import Trace;
    1.38 +	    
    1.39 +import MemTypes;
    1.40 +	       
    1.41 +import ProcTypes;
    1.42 +		
    1.43 +interface (DataCacheBlocking.DCacheStats :: *) = {
    1.44 +    DataCacheBlocking.num_accesses :: ¶GetPut®¶.¶Get®¶ ProcTypes.Stat;
    1.45 +    DataCacheBlocking.num_misses :: ¶GetPut®¶.¶Get®¶ ProcTypes.Stat;
    1.46 +    DataCacheBlocking.num_writebacks :: ¶GetPut®¶.¶Get®¶ ProcTypes.Stat
    1.47 +};
    1.48 + 
    1.49 +instance DataCacheBlocking ¶Prelude®¶.¶PrimMakeUndefined®¶ DataCacheBlocking.DCacheStats;
    1.50 +											
    1.51 +instance DataCacheBlocking ¶Prelude®¶.¶PrimDeepSeqCond®¶ DataCacheBlocking.DCacheStats;
    1.52 +										      
    1.53 +instance DataCacheBlocking ¶Prelude®¶.¶PrimMakeUninitialized®¶ DataCacheBlocking.DCacheStats;
    1.54 +											    
    1.55 +interface (DataCacheBlocking.DCache :: * -> * -> *) req_t resp_t = {
    1.56 +    DataCacheBlocking.proc_server :: ¶ClientServer®¶.¶Server®¶ req_t resp_t;
    1.57 +    DataCacheBlocking.mmem_client :: ¶ClientServer®¶.¶Client®¶ MemTypes.MainMemReq MemTypes.MainMemResp;
    1.58 +    DataCacheBlocking.statsEn_put :: ¶GetPut®¶.¶Put®¶ ¶Prelude®¶.¶Bool®¶;
    1.59 +    DataCacheBlocking.stats :: DataCacheBlocking.DCacheStats
    1.60 +};
    1.61 + 
    1.62 +instance DataCacheBlocking (¶Prelude®¶.¶PrimMakeUndefined®¶ resp_t) =>
    1.63 +			   ¶Prelude®¶.¶PrimMakeUndefined®¶ (DataCacheBlocking.DCache req_t resp_t);
    1.64 +												  
    1.65 +instance DataCacheBlocking (¶Prelude®¶.¶PrimDeepSeqCond®¶ resp_t) =>
    1.66 +			   ¶Prelude®¶.¶PrimDeepSeqCond®¶ (DataCacheBlocking.DCache req_t resp_t);
    1.67 +												
    1.68 +instance DataCacheBlocking ¶Prelude®¶.¶PrimMakeUninitialized®¶
    1.69 +			   (DataCacheBlocking.DCache req_t resp_t);
    1.70 +								  
    1.71 +type (DataCacheBlocking.CacheLineIndexSz :: #) = 10;
    1.72 +						   
    1.73 +type (DataCacheBlocking.CacheLineTagSz :: #) = 20;
    1.74 +						 
    1.75 +type (DataCacheBlocking.CacheLineSz :: #) = 32;
    1.76 +					      
    1.77 +type (DataCacheBlocking.CacheLineIndex :: *) = ¶Prelude®¶.¶Bit®¶ DataCacheBlocking.CacheLineIndexSz;
    1.78 +												   
    1.79 +type (DataCacheBlocking.CacheLineTag :: *) = ¶Prelude®¶.¶Bit®¶ DataCacheBlocking.CacheLineTagSz;
    1.80 +											       
    1.81 +type (DataCacheBlocking.CacheLine :: *) = ¶Prelude®¶.¶Bit®¶ DataCacheBlocking.CacheLineSz;
    1.82 +											 
    1.83 +data (DataCacheBlocking.CacheStage :: *) =
    1.84 +    DataCacheBlocking.Init () |
    1.85 +    DataCacheBlocking.Access () |
    1.86 +    DataCacheBlocking.RefillReq () |
    1.87 +    DataCacheBlocking.RefillResp ();
    1.88 +				   
    1.89 +instance DataCacheBlocking ¶Prelude®¶.¶PrimMakeUndefined®¶ DataCacheBlocking.CacheStage;
    1.90 +										       
    1.91 +instance DataCacheBlocking ¶Prelude®¶.¶PrimDeepSeqCond®¶ DataCacheBlocking.CacheStage;
    1.92 +										     
    1.93 +instance DataCacheBlocking ¶Prelude®¶.¶PrimMakeUninitialized®¶ DataCacheBlocking.CacheStage;
    1.94 +											   
    1.95 +instance DataCacheBlocking ¶Prelude®¶.¶Eq®¶ DataCacheBlocking.CacheStage;
    1.96 +									
    1.97 +instance DataCacheBlocking ¶Prelude®¶.¶Bits®¶ DataCacheBlocking.CacheStage 2;
    1.98 +									    
    1.99 +DataCacheBlocking.getAddr :: MemTypes.DataReq -> ¶Prelude®¶.¶Bit®¶ MemTypes.AddrSz;
   1.100 +										  
   1.101 +DataCacheBlocking.getCacheLineIndex :: MemTypes.DataReq -> DataCacheBlocking.CacheLineIndex;
   1.102 +											   
   1.103 +DataCacheBlocking.getCacheLineTag :: MemTypes.DataReq -> DataCacheBlocking.CacheLineTag;
   1.104 +										       
   1.105 +DataCacheBlocking.getCacheLineAddr :: MemTypes.DataReq -> ¶Prelude®¶.¶Bit®¶ MemTypes.AddrSz;
   1.106 +											   
   1.107 +DataCacheBlocking.mkDataCache :: (¶Prelude®¶.¶IsModule®¶ _m__ _c__) =>
   1.108 +				 _m__ (DataCacheBlocking.DCache MemTypes.DataReq MemTypes.DataResp)
   1.109 +}