-
Notifications
You must be signed in to change notification settings - Fork 0
/
wide_alu.hjson
102 lines (101 loc) · 3.38 KB
/
wide_alu.hjson
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
95
96
97
98
99
100
101
102
{
name: "wide_alu",
clock_primary: "clk_i",
reset_primary: "rst_ni",
bus_device: "reg",
bus_host: "",
regwidth: "32",
registers: [
{ multireg:
{ name: "OP_A",
desc: "Subword of Operand A.",
count: "8",
cname: "OP_A",
swaccess: "wo",
hwext: "false",
fields: [
{ bits: "31:0"
}
],
}
},
{ multireg:
{ name: "OP_B",
desc: "Subword of Operand B.",
count: "8",
cname: "OP_B",
swaccess: "wo",
fields: [
{ bits: "31:0"
}
],
}
},
{ multireg:
{ name: "RESULT",
desc: "Subword of results.",
count: "16",
cname: "RESULT",
swaccess: "ro",
hwaccess: "hwo",
hwext: "true",
fields: [
{ bits: "31:0"
}
],
}
},
{ name: "CTRL1",
desc: "Controls clear and trigger signal of the deaccelerator.",
swaccess: "wo",
hwaccess: "hro",
hwext: "true",
fields: [
{ bits: "0", name: "TRIGGER",
desc: "Trigger operation on rising edge."
}
{ bits: "1", name: "CLEAR_ERR",
desc: "Clear a pending ERROR in the deaccelerator."
}
]
},
{ name: "CTRL2",
desc: "Configures the operation and its delay within the deaccelerator.",
swaccess: "rw",
hwaccess: "hrw",
hwext: "true",
fields: [
{ bits: "2:0", name: "OPSEL",
desc: "Select the operation to perform.",
enum: [
{ value: "0", name: "ADD", desc: "Perform add operation." },
{ value: "1", name: "SUB", desc: "Perform sub operation." },
{ value: "2", name: "MUL", desc: "Perform mul operation." },
{ value: "3", name: "XOR", desc: "Perform xor operation." },
{ value: "4", name: "AND", desc: "Perform and operation." },
{ value: "5", name: "OR", desc: "Perform or operation." },
]
}
{ bits: "23:16", name: "DELAY",
desc: "Configures the number of cycles the deaccelerator requires to finishe the operation. "
}
]
},
{ name: "STATUS",
desc: "Contains the current status of the Deaccelerator.",
swaccess: "ro",
hwaccess: "hwo",
hwext: "true",
fields: [
{ bits: "1:0", name: "CODE",
desc: "The current status code of the accelerator.",
enum: [
{ value: "0", name: "IDLE", desc: "Accelerator is idle, results are avaialble for read."},
{ value: "1", name: "PENDING", desc: "Pending operation. Chaning configuration while pending results in an error."},
{ value: "2", name: "ERROR_WRITE", desc: "A configuration change was attempted during pending operation."},
{ value: "3", name: "ERROR_OPCODE", desc: "The accelerator was supplied with an unknown opcode."}
]}
]
}
],
}