Mercurial > pygar
diff core/sim/bdir_dut/BranchPred.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/BranchPred.bi Tue Apr 13 17:34:33 2010 -0400 1.3 @@ -0,0 +1,78 @@ 1.4 +signature BranchPred where { 1.5 +import ¶Counter®¶; 1.6 + 1.7 +import ¶FIFOF_®¶; 1.8 + 1.9 +import ¶FIFOF®¶; 1.10 + 1.11 +import ¶FIFO®¶; 1.12 + 1.13 +import ¶Inout®¶; 1.14 + 1.15 +import ¶List®¶; 1.16 + 1.17 +import ¶Clocks®¶; 1.18 + 1.19 +import ¶ListN®¶; 1.20 + 1.21 +import ¶PrimArray®¶; 1.22 + 1.23 +import ¶RegFile®¶; 1.24 + 1.25 +import ¶Vector®¶; 1.26 + 1.27 +import ¶Connectable®¶; 1.28 + 1.29 +import ¶GetPut®¶; 1.30 + 1.31 +import ¶ClientServer®¶; 1.32 + 1.33 +import Trace; 1.34 + 1.35 +import ProcTypes; 1.36 + 1.37 +type (BranchPred.BrPred :: *) = ¶Prelude®¶.¶Maybe®¶ ProcTypes.Addr; 1.38 + 1.39 +type (BranchPred.BPindx :: *) = ¶Prelude®¶.¶Bit®¶ 4; 1.40 + 1.41 +struct (BranchPred.BrPair :: *) = { 1.42 + BranchPred.brpc :: ProcTypes.Addr; 1.43 + BranchPred.nextpc :: ProcTypes.Addr 1.44 +}; 1.45 + 1.46 +instance BranchPred ¶Prelude®¶.¶PrimMakeUndefined®¶ BranchPred.BrPair; 1.47 + 1.48 +instance BranchPred ¶Prelude®¶.¶PrimDeepSeqCond®¶ BranchPred.BrPair; 1.49 + 1.50 +instance BranchPred ¶Prelude®¶.¶PrimMakeUninitialized®¶ BranchPred.BrPair; 1.51 + 1.52 +instance BranchPred ¶Prelude®¶.¶Bits®¶ BranchPred.BrPair 64; 1.53 + 1.54 +instance BranchPred ¶Prelude®¶.¶Eq®¶ BranchPred.BrPair; 1.55 + 1.56 +data (BranchPred.CBranchPath :: *) = BranchPred.Valid BranchPred.BrPair | BranchPred.Invalid (); 1.57 + 1.58 +instance BranchPred ¶Prelude®¶.¶PrimMakeUndefined®¶ BranchPred.CBranchPath; 1.59 + 1.60 +instance BranchPred ¶Prelude®¶.¶PrimDeepSeqCond®¶ BranchPred.CBranchPath; 1.61 + 1.62 +instance BranchPred ¶Prelude®¶.¶PrimMakeUninitialized®¶ BranchPred.CBranchPath; 1.63 + 1.64 +instance BranchPred ¶Prelude®¶.¶Bits®¶ BranchPred.CBranchPath 65; 1.65 + 1.66 +instance BranchPred ¶Prelude®¶.¶Eq®¶ BranchPred.CBranchPath; 1.67 + 1.68 +interface (BranchPred.BranchPred :: *) = { 1.69 + BranchPred.get :: ProcTypes.Addr -> BranchPred.BrPred {-# arg_names = [pres] #-}; 1.70 + BranchPred.upd :: ProcTypes.Addr -> ProcTypes.Addr -> ¶Prelude®¶.¶Action®¶ {-# arg_names = [pres, 1.71 + next] #-} 1.72 +}; 1.73 + 1.74 +instance BranchPred ¶Prelude®¶.¶PrimMakeUndefined®¶ BranchPred.BranchPred; 1.75 + 1.76 +instance BranchPred ¶Prelude®¶.¶PrimDeepSeqCond®¶ BranchPred.BranchPred; 1.77 + 1.78 +instance BranchPred ¶Prelude®¶.¶PrimMakeUninitialized®¶ BranchPred.BranchPred; 1.79 + 1.80 +BranchPred.mkBranchPred :: (¶Prelude®¶.¶IsModule®¶ _m__ _c__) => _m__ BranchPred.BranchPred 1.81 +}