Added support for copyn and copy
[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 -- | copyn function identifier
161 copynId :: String
162 copynId = "copyn"
163
164 -- | map function identifier
165 mapId :: String
166 mapId = "map"
167
168 -- | zipwith function identifier
169 zipWithId :: String
170 zipWithId = "zipWith"
171
172 -- | foldl function identifier
173 foldlId :: String
174 foldlId = "foldl"
175
176 -- | foldr function identifier
177 foldrId :: String
178 foldrId = "foldr"
179
180 -- | zip function identifier
181 zipId :: String
182 zipId = "zip"
183
184 -- | unzip function identifier
185 unzipId :: String
186 unzipId = "unzip"
187
188 -- | hwxor function identifier
189 hwxorId :: String
190 hwxorId = "hwxor"
191
192 -- | hwor function identifier
193 hworId :: String
194 hworId = "hwor"
195
196 -- | hwnot function identifier
197 hwnotId :: String
198 hwnotId = "hwnot"
199
200 -- | hwand function identifier
201 hwandId :: String
202 hwandId = "hwand"
203
204 lengthTId :: String
205 lengthTId = "lengthT"
206
207 ------------------
208 -- VHDL type marks
209 ------------------
210
211 -- | The Bit type mark
212 bitTM :: AST.TypeMark
213 bitTM = AST.unsafeVHDLBasicId "Bit"
214
215 -- | Stardard logic type mark
216 std_logicTM :: AST.TypeMark
217 std_logicTM = AST.unsafeVHDLBasicId "std_logic"
218
219 -- | boolean type mark
220 booleanTM :: AST.TypeMark
221 booleanTM = AST.unsafeVHDLBasicId "boolean"
222
223 -- | fsvec_index AST. TypeMark
224 tfvec_indexTM :: AST.TypeMark
225 tfvec_indexTM = AST.unsafeVHDLBasicId "tfvec_index"
226
227 -- | natural AST. TypeMark
228 naturalTM :: AST.TypeMark
229 naturalTM = AST.unsafeVHDLBasicId "natural"
230
231 -- | integer TypeMark
232 integerTM :: AST.TypeMark
233 integerTM = AST.unsafeVHDLBasicId "integer"