Clean up the code a bit more.
[matthijs/master-project/cλash.git] / Constants.hs
1 module Constants where
2   
3 import qualified ForSyDe.Backend.VHDL.AST as AST
4
5 --------------
6 -- Identifiers
7 --------------
8
9 -- | reset and clock signal identifiers in String form
10 resetStr, clockStr :: String
11 resetStr = "resetn"
12 clockStr = "clock"
13
14 -- | reset and clock signal identifiers in basic AST.VHDLId form
15 resetId, clockId :: AST.VHDLId
16 resetId = AST.unsafeVHDLBasicId resetStr
17 clockId = AST.unsafeVHDLBasicId clockStr
18
19
20 -- | \"types\" identifier
21 typesId :: AST.VHDLId
22 typesId = AST.unsafeVHDLBasicId "types"
23
24 -- | work identifier
25 workId :: AST.VHDLId
26 workId = AST.unsafeVHDLBasicId "work"
27
28 -- | std identifier
29 stdId :: AST.VHDLId
30 stdId = AST.unsafeVHDLBasicId "std"
31
32
33 -- | textio identifier
34 textioId :: AST.VHDLId
35 textioId = AST.unsafeVHDLBasicId "textio"
36
37 -- | range attribute identifier
38 rangeId :: AST.VHDLId
39 rangeId = AST.unsafeVHDLBasicId "range"
40
41
42 -- | high attribute identifier
43 highId :: AST.VHDLId
44 highId = AST.unsafeVHDLBasicId "high"
45
46 -- | range attribute identifier
47 imageId :: AST.VHDLId
48 imageId = AST.unsafeVHDLBasicId "image"
49
50 -- | event attribute identifie
51 eventId :: AST.VHDLId
52 eventId = AST.unsafeVHDLBasicId "event"
53
54
55 -- | default function identifier
56 defaultId :: AST.VHDLId
57 defaultId = AST.unsafeVHDLBasicId "default"
58
59 -- FSVec function identifiers
60
61 -- | ex (operator ! in original Haskell source) function identifier
62 exId :: AST.VHDLId
63 exId = AST.unsafeVHDLBasicId "ex"
64
65 -- | sel (function select in original Haskell source) function identifier
66 selId :: AST.VHDLId
67 selId = AST.unsafeVHDLBasicId "sel"
68
69
70 -- | ltplus (function (<+) in original Haskell source) function identifier
71 ltplusId :: AST.VHDLId
72 ltplusId = AST.unsafeVHDLBasicId "ltplus"
73
74
75 -- | plusplus (function (++) in original Haskell source) function identifier
76 plusplusId :: AST.VHDLId
77 plusplusId = AST.unsafeVHDLBasicId "plusplus"
78
79
80 -- | empty function identifier
81 emptyId :: AST.VHDLId
82 emptyId = AST.unsafeVHDLBasicId "empty"
83
84 -- | plusgt (function (+>) in original Haskell source) function identifier
85 plusgtId :: AST.VHDLId
86 plusgtId = AST.unsafeVHDLBasicId "plusgt"
87
88 -- | singleton function identifier
89 singletonId :: AST.VHDLId
90 singletonId = AST.unsafeVHDLBasicId "singleton"
91
92 -- | length function identifier
93 lengthId :: AST.VHDLId
94 lengthId = AST.unsafeVHDLBasicId "length"
95
96
97 -- | isnull (function null in original Haskell source) function identifier
98 isnullId :: AST.VHDLId
99 isnullId = AST.unsafeVHDLBasicId "isnull"
100
101
102 -- | replace function identifier
103 replaceId :: AST.VHDLId
104 replaceId = AST.unsafeVHDLBasicId "replace"
105
106
107 -- | head function identifier
108 headId :: AST.VHDLId
109 headId = AST.unsafeVHDLBasicId "head"
110
111
112 -- | last function identifier
113 lastId :: AST.VHDLId
114 lastId = AST.unsafeVHDLBasicId "last"
115
116
117 -- | init function identifier
118 initId :: AST.VHDLId
119 initId = AST.unsafeVHDLBasicId "init"
120
121
122 -- | tail function identifier
123 tailId :: AST.VHDLId
124 tailId = AST.unsafeVHDLBasicId "tail"
125
126
127 -- | take function identifier
128 takeId :: AST.VHDLId
129 takeId = AST.unsafeVHDLBasicId "take"
130
131
132 -- | drop function identifier
133 dropId :: AST.VHDLId
134 dropId = AST.unsafeVHDLBasicId "drop"
135
136 -- | shiftl function identifier
137 shiftlId :: AST.VHDLId
138 shiftlId = AST.unsafeVHDLBasicId "shiftl"
139
140 -- | shiftr function identifier
141 shiftrId :: AST.VHDLId
142 shiftrId = AST.unsafeVHDLBasicId "shiftr"
143
144 -- | rotl function identifier
145 rotlId :: AST.VHDLId
146 rotlId = AST.unsafeVHDLBasicId "rotl"
147
148 -- | reverse function identifier
149 rotrId :: AST.VHDLId
150 rotrId = AST.unsafeVHDLBasicId "rotr"
151
152 -- | reverse function identifier
153 reverseId :: AST.VHDLId
154 reverseId = AST.unsafeVHDLBasicId "reverse"
155
156 -- | copy function identifier
157 copyId :: AST.VHDLId
158 copyId = AST.unsafeVHDLBasicId "copy"
159
160 ------------------
161 -- VHDL type marks
162 ------------------
163
164 -- | The Bit type mark
165 bitTM :: AST.TypeMark
166 bitTM = AST.unsafeVHDLBasicId "Bit"
167
168 -- | Stardard logic type mark
169 std_logicTM :: AST.TypeMark
170 std_logicTM = AST.unsafeVHDLBasicId "std_logic"
171
172 -- | boolean type mark
173 booleanTM :: AST.TypeMark
174 booleanTM = AST.unsafeVHDLBasicId "boolean"
175
176 -- | fsvec_index AST. TypeMark
177 tfvec_indexTM :: AST.TypeMark
178 tfvec_indexTM = AST.unsafeVHDLBasicId "tfvec_index"
179
180 -- | natural AST. TypeMark
181 naturalTM :: AST.TypeMark
182 naturalTM = AST.unsafeVHDLBasicId "natural"
183
184 -- | integer TypeMark
185 integerTM :: AST.TypeMark
186 integerTM = AST.unsafeVHDLBasicId "integer"