Added "lengthT"
[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 :: String
63 exId = "!"
64
65 -- | sel (function select in original Haskell source) function identifier
66 selId :: String
67 selId = "select"
68
69
70 -- | ltplus (function (<+) in original Haskell source) function identifier
71 ltplusId :: String
72 ltplusId = "<+"
73
74
75 -- | plusplus (function (++) in original Haskell source) function identifier
76 plusplusId :: String
77 plusplusId = "++"
78
79
80 -- | empty function identifier
81 emptyId :: String
82 emptyId = "empty"
83
84 -- | plusgt (function (+>) in original Haskell source) function identifier
85 plusgtId :: String
86 plusgtId = "+>"
87
88 -- | singleton function identifier
89 singletonId :: String
90 singletonId = "singleton"
91
92 -- | length function identifier
93 lengthId :: String
94 lengthId = "length"
95
96
97 -- | isnull (function null in original Haskell source) function identifier
98 isnullId :: String
99 isnullId = "isnull"
100
101
102 -- | replace function identifier
103 replaceId :: String
104 replaceId = "replace"
105
106
107 -- | head function identifier
108 headId :: String
109 headId = "head"
110
111
112 -- | last function identifier
113 lastId :: String
114 lastId = "last"
115
116
117 -- | init function identifier
118 initId :: String
119 initId = "init"
120
121
122 -- | tail function identifier
123 tailId :: String
124 tailId = "tail"
125
126
127 -- | take function identifier
128 takeId :: String
129 takeId = "take"
130
131
132 -- | drop function identifier
133 dropId :: String
134 dropId = "drop"
135
136 -- | shiftl function identifier
137 shiftlId :: String
138 shiftlId = "shiftl"
139
140 -- | shiftr function identifier
141 shiftrId :: String
142 shiftrId = "shiftr"
143
144 -- | rotl function identifier
145 rotlId :: String
146 rotlId = "rotl"
147
148 -- | reverse function identifier
149 rotrId :: String
150 rotrId = "rotr"
151
152 -- | reverse function identifier
153 reverseId :: String
154 reverseId = "reverse"
155
156 -- | copy function identifier
157 copyId :: String
158 copyId = "copy"
159
160 -- | map function identifier
161 mapId :: String
162 mapId = "map"
163
164 -- | zipwith function identifier
165 zipWithId :: String
166 zipWithId = "zipWith"
167
168 -- | foldl function identifier
169 foldlId :: String
170 foldlId = "foldl"
171
172 -- | foldr function identifier
173 foldrId :: String
174 foldrId = "foldr"
175
176 -- | zip function identifier
177 zipId :: String
178 zipId = "zip"
179
180 -- | unzip function identifier
181 unzipId :: String
182 unzipId = "unzip"
183
184 -- | hwxor function identifier
185 hwxorId :: String
186 hwxorId = "hwxor"
187
188 -- | hwor function identifier
189 hworId :: String
190 hworId = "hwor"
191
192 -- | hwnot function identifier
193 hwnotId :: String
194 hwnotId = "hwnot"
195
196 -- | hwand function identifier
197 hwandId :: String
198 hwandId = "hwand"
199
200 lengthTId :: String
201 lengthTId = "lengthT"
202
203 ------------------
204 -- VHDL type marks
205 ------------------
206
207 -- | The Bit type mark
208 bitTM :: AST.TypeMark
209 bitTM = AST.unsafeVHDLBasicId "Bit"
210
211 -- | Stardard logic type mark
212 std_logicTM :: AST.TypeMark
213 std_logicTM = AST.unsafeVHDLBasicId "std_logic"
214
215 -- | boolean type mark
216 booleanTM :: AST.TypeMark
217 booleanTM = AST.unsafeVHDLBasicId "boolean"
218
219 -- | fsvec_index AST. TypeMark
220 tfvec_indexTM :: AST.TypeMark
221 tfvec_indexTM = AST.unsafeVHDLBasicId "tfvec_index"
222
223 -- | natural AST. TypeMark
224 naturalTM :: AST.TypeMark
225 naturalTM = AST.unsafeVHDLBasicId "natural"
226
227 -- | integer TypeMark
228 integerTM :: AST.TypeMark
229 integerTM = AST.unsafeVHDLBasicId "integer"