Merge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
[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 -- | range attribute identifier
43 imageId :: AST.VHDLId
44 imageId = AST.unsafeVHDLBasicId "image"
45
46 -- | event attribute identifie
47 eventId :: AST.VHDLId
48 eventId = AST.unsafeVHDLBasicId "event"
49
50
51 -- | default function identifier
52 defaultId :: AST.VHDLId
53 defaultId = AST.unsafeVHDLBasicId "default"
54
55 -- FSVec function identifiers
56
57 -- | ex (operator ! in original Haskell source) function identifier
58 exId :: AST.VHDLId
59 exId = AST.unsafeVHDLBasicId "ex"
60
61 -- | sel (function select in original Haskell source) function identifier
62 selId :: AST.VHDLId
63 selId = AST.unsafeVHDLBasicId "sel"
64
65
66 -- | ltplus (function (<+) in original Haskell source) function identifier
67 ltplusId :: AST.VHDLId
68 ltplusId = AST.unsafeVHDLBasicId "ltplus"
69
70
71 -- | plusplus (function (++) in original Haskell source) function identifier
72 plusplusId :: AST.VHDLId
73 plusplusId = AST.unsafeVHDLBasicId "plusplus"
74
75
76 -- | empty function identifier
77 emptyId :: AST.VHDLId
78 emptyId = AST.unsafeVHDLBasicId "empty"
79
80 -- | plusgt (function (+>) in original Haskell source) function identifier
81 plusgtId :: AST.VHDLId
82 plusgtId = AST.unsafeVHDLBasicId "plusgt"
83
84 -- | singleton function identifier
85 singletonId :: AST.VHDLId
86 singletonId = AST.unsafeVHDLBasicId "singleton"
87
88 -- | length function identifier
89 lengthId :: AST.VHDLId
90 lengthId = AST.unsafeVHDLBasicId "length"
91
92
93 -- | isnull (function null in original Haskell source) function identifier
94 isnullId :: AST.VHDLId
95 isnullId = AST.unsafeVHDLBasicId "isnull"
96
97
98 -- | replace function identifier
99 replaceId :: AST.VHDLId
100 replaceId = AST.unsafeVHDLBasicId "replace"
101
102
103 -- | head function identifier
104 headId :: AST.VHDLId
105 headId = AST.unsafeVHDLBasicId "head"
106
107
108 -- | last function identifier
109 lastId :: AST.VHDLId
110 lastId = AST.unsafeVHDLBasicId "last"
111
112
113 -- | init function identifier
114 initId :: AST.VHDLId
115 initId = AST.unsafeVHDLBasicId "init"
116
117
118 -- | tail function identifier
119 tailId :: AST.VHDLId
120 tailId = AST.unsafeVHDLBasicId "tail"
121
122
123 -- | take function identifier
124 takeId :: AST.VHDLId
125 takeId = AST.unsafeVHDLBasicId "take"
126
127
128 -- | drop function identifier
129 dropId :: AST.VHDLId
130 dropId = AST.unsafeVHDLBasicId "drop"
131
132 -- | shiftl function identifier
133 shiftlId :: AST.VHDLId
134 shiftlId = AST.unsafeVHDLBasicId "shiftl"
135
136 -- | shiftr function identifier
137 shiftrId :: AST.VHDLId
138 shiftrId = AST.unsafeVHDLBasicId "shiftr"
139
140 -- | rotl function identifier
141 rotlId :: AST.VHDLId
142 rotlId = AST.unsafeVHDLBasicId "rotl"
143
144 -- | reverse function identifier
145 rotrId :: AST.VHDLId
146 rotrId = AST.unsafeVHDLBasicId "rotr"
147
148 -- | reverse function identifier
149 reverseId :: AST.VHDLId
150 reverseId = AST.unsafeVHDLBasicId "reverse"
151
152 -- | copy function identifier
153 copyId :: AST.VHDLId
154 copyId = AST.unsafeVHDLBasicId "copy"
155
156 ------------------
157 -- VHDL type marks
158 ------------------
159
160 -- | Stardard logic type mark
161 std_logicTM :: AST.TypeMark
162 std_logicTM = AST.unsafeVHDLBasicId "std_logic"
163
164 -- | boolean type mark
165 booleanTM :: AST.TypeMark
166 booleanTM = AST.unsafeVHDLBasicId "boolean"
167
168 -- | fsvec_index AST. TypeMark
169 tfvec_indexTM :: AST.TypeMark
170 tfvec_indexTM = AST.unsafeVHDLBasicId "tfvec_index"
171
172 -- | natural AST. TypeMark
173 naturalTM :: AST.TypeMark
174 naturalTM = AST.unsafeVHDLBasicId "natural"