-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMemParams.v
94 lines (83 loc) · 2.46 KB
/
MemParams.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
(*
Instantiates the memory system and device parameters.
*)
Require Import Kami.AllNotations.
Require Import ProcKami.FU.
Require Import ProcKami.Device.
Require Import ProcKami.MemRegion.
Require Import ProcKami.Devices.Debug.
Require Import ProcKami.Devices.BootRom.
Require Import ProcKami.Devices.PMem.
Require Import ProcKami.Devices.MMappedRegs.
Require Import ProcKami.Devices.Uart.
Require Import ProcKami.Pipeline.Mem.Ifc.
Import BinNat.
Section DeviceTree.
Context {procParams : ProcParams}.
Context {func_units : list FUEntry}.
Local Definition devicesInst
: list Device
:= [
@debug _;
@bootRom _;
@msip _;
@mtimecmp _;
@mtime _;
@pMem _;
@uart _
].
Local Definition memTableInst
: list (MemTableEntry (length devicesInst))
:= [
{|
addr := hex"0";
width := hex"1000";
device := Fin.F1: Fin.t (length devicesInst) (* debug *)
|};
{|
addr := hex"1000";
width := hex"1000";
device := Fin.FS Fin.F1: Fin.t (length devicesInst) (* boot rom *)
|};
{|
addr := hex"2000000";
width := hex"8";
device := Fin.FS (Fin.FS Fin.F1): Fin.t (length devicesInst) (* msip *)
|};
{|
addr := hex"2004000";
width := hex"8";
device := Fin.FS (Fin.FS (Fin.FS Fin.F1)): Fin.t (length devicesInst) (* mtimecmp *)
|};
{|
addr := hex"200bff8";
width := hex"8";
device := Fin.FS (Fin.FS (Fin.FS (Fin.FS Fin.F1))): Fin.t (length devicesInst) (* mtime *)
|};
{|
addr := hex"80000000";
width := hex"100000";
device := Fin.FS (Fin.FS (Fin.FS (Fin.FS (Fin.FS Fin.F1)))): Fin.t (length devicesInst)
|};
{|
addr := hex"C0000000";
width := hex"80";
device := Fin.FS (Fin.FS (Fin.FS (Fin.FS (Fin.FS (Fin.FS Fin.F1))))): Fin.t (length devicesInst)
|}
].
Definition deviceTree
: DeviceTree
:= {|
devices := devicesInst;
memTable := memTableInst;
memTableIsValid := ltac:(discriminate)
|}.
Definition memParams
: Mem.Ifc.Params
:= {|
fetcherLgSize := 4;
completionBufferLgSize := 4;
tlbSize := 16;
memUnitTagLgSize := 0;
|}.
End DeviceTree.