Mercurial > pygar
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:6d1ff93e3afa | 1:91a1f76ddd62 |
---|---|
1 signature BranchPred where { | |
2 import ¶Counter®¶; | |
3 | |
4 import ¶FIFOF_®¶; | |
5 | |
6 import ¶FIFOF®¶; | |
7 | |
8 import ¶FIFO®¶; | |
9 | |
10 import ¶Inout®¶; | |
11 | |
12 import ¶List®¶; | |
13 | |
14 import ¶Clocks®¶; | |
15 | |
16 import ¶ListN®¶; | |
17 | |
18 import ¶PrimArray®¶; | |
19 | |
20 import ¶RegFile®¶; | |
21 | |
22 import ¶Vector®¶; | |
23 | |
24 import ¶Connectable®¶; | |
25 | |
26 import ¶GetPut®¶; | |
27 | |
28 import ¶ClientServer®¶; | |
29 | |
30 import Trace; | |
31 | |
32 import ProcTypes; | |
33 | |
34 type (BranchPred.BrPred :: *) = ¶Prelude®¶.¶Maybe®¶ ProcTypes.Addr; | |
35 | |
36 type (BranchPred.BPindx :: *) = ¶Prelude®¶.¶Bit®¶ 4; | |
37 | |
38 struct (BranchPred.BrPair :: *) = { | |
39 BranchPred.brpc :: ProcTypes.Addr; | |
40 BranchPred.nextpc :: ProcTypes.Addr | |
41 }; | |
42 | |
43 instance BranchPred ¶Prelude®¶.¶PrimMakeUndefined®¶ BranchPred.BrPair; | |
44 | |
45 instance BranchPred ¶Prelude®¶.¶PrimDeepSeqCond®¶ BranchPred.BrPair; | |
46 | |
47 instance BranchPred ¶Prelude®¶.¶PrimMakeUninitialized®¶ BranchPred.BrPair; | |
48 | |
49 instance BranchPred ¶Prelude®¶.¶Bits®¶ BranchPred.BrPair 64; | |
50 | |
51 instance BranchPred ¶Prelude®¶.¶Eq®¶ BranchPred.BrPair; | |
52 | |
53 data (BranchPred.CBranchPath :: *) = BranchPred.Valid BranchPred.BrPair | BranchPred.Invalid (); | |
54 | |
55 instance BranchPred ¶Prelude®¶.¶PrimMakeUndefined®¶ BranchPred.CBranchPath; | |
56 | |
57 instance BranchPred ¶Prelude®¶.¶PrimDeepSeqCond®¶ BranchPred.CBranchPath; | |
58 | |
59 instance BranchPred ¶Prelude®¶.¶PrimMakeUninitialized®¶ BranchPred.CBranchPath; | |
60 | |
61 instance BranchPred ¶Prelude®¶.¶Bits®¶ BranchPred.CBranchPath 65; | |
62 | |
63 instance BranchPred ¶Prelude®¶.¶Eq®¶ BranchPred.CBranchPath; | |
64 | |
65 interface (BranchPred.BranchPred :: *) = { | |
66 BranchPred.get :: ProcTypes.Addr -> BranchPred.BrPred {-# arg_names = [pres] #-}; | |
67 BranchPred.upd :: ProcTypes.Addr -> ProcTypes.Addr -> ¶Prelude®¶.¶Action®¶ {-# arg_names = [pres, | |
68 next] #-} | |
69 }; | |
70 | |
71 instance BranchPred ¶Prelude®¶.¶PrimMakeUndefined®¶ BranchPred.BranchPred; | |
72 | |
73 instance BranchPred ¶Prelude®¶.¶PrimDeepSeqCond®¶ BranchPred.BranchPred; | |
74 | |
75 instance BranchPred ¶Prelude®¶.¶PrimMakeUninitialized®¶ BranchPred.BranchPred; | |
76 | |
77 BranchPred.mkBranchPred :: (¶Prelude®¶.¶IsModule®¶ _m__ _c__) => _m__ BranchPred.BranchPred | |
78 } |