VHDL has a built-in character type that can represent ASCII and Latin-1 characters. It’s in the standard (STD) library, which is loaded by default. You don’t need to import it.
Below, you can find the character type definition from the Language Reference Manual (LRM) and tables that list and explain all 256 values.
ASCII (0-127)
The first 128 values precisely match the ASCII table. Note that non-printable characters are defined as uppercase enumeration literals. You can still use them in VHDL code together with regular text. For example: report "Hello" & LF & "World!";
|
Decimal |
Hex |
Binary |
VHDL |
Description |
|---|---|---|---|---|
|
0 |
00 |
00000000 |
NUL |
Null |
|
1 |
01 |
00000001 |
SOH |
Start of Heading |
|
2 |
02 |
00000010 |
STX |
Start of Text |
|
3 |
03 |
00000011 |
ETX |
End of Text |
|
4 |
04 |
00000100 |
EOT |
End of Transmission |
|
5 |
05 |
00000101 |
ENQ |
Enquiry |
|
6 |
06 |
00000110 |
ACK |
Acknowledge |
|
7 |
07 |
00000111 |
BEL |
Bell |
|
8 |
08 |
00001000 |
BS |
Backspace |
|
9 |
09 |
00001001 |
HT |
Horizontal Tab |
|
10 |
0A |
00001010 |
LF |
Line Feed |
|
11 |
0B |
00001011 |
VT |
Vertical Tab |
|
12 |
0C |
00001100 |
FF |
Form Feed |
|
13 |
0D |
00001101 |
CR |
Carriage Return |
|
14 |
0E |
00001110 |
SO |
Shift Out |
|
15 |
0F |
00001111 |
SI |
Shift In |
|
16 |
10 |
00010000 |
DLE |
Data Link Escape |
|
17 |
11 |
00010001 |
DC1 |
Device Control 1 |
|
18 |
12 |
00010010 |
DC2 |
Device Control 2 |
|
19 |
13 |
00010011 |
DC3 |
Device Control 3 |
|
20 |
14 |
00010100 |
DC4 |
Device Control 4 |
|
21 |
15 |
00010101 |
NAK |
Negative Acknowledge |
|
22 |
16 |
00010110 |
SYN |
Synchronous Idle |
|
23 |
17 |
00010111 |
ETB |
End of Block |
|
24 |
18 |
00011000 |
CAN |
Cancel |
|
25 |
19 |
00011001 |
EM |
End of Medium |
|
26 |
1A |
00011010 |
SUB |
Substitute |
|
27 |
1B |
00011011 |
ESC |
Escape |
|
28 |
1C |
00011100 |
FSP |
File Separator |
|
29 |
1D |
00011101 |
GSP |
Group Separator |
|
30 |
1E |
00011110 |
RSP |
Record Separator |
|
31 |
1F |
00011111 |
USP |
Unit Separator |
|
32 |
20 |
00100000 |
|
Space |
|
33 |
21 |
00100001 |
|
Exclamation Mark |
|
34 |
22 |
00100010 |
|
Quotation Mark |
|
35 |
23 |
00100011 |
|
Number Sign |
|
36 |
24 |
00100100 |
|
Dollar Sign |
|
37 |
25 |
00100101 |
|
Percent Sign |
|
38 |
26 |
00100110 |
|
Ampersand |
|
39 |
27 |
00100111 |
|
Apostrophe |
|
40 |
28 |
00101000 |
|
Left Parenthesis |
|
41 |
29 |
00101001 |
|
Right Parenthesis |
|
42 |
2A |
00101010 |
|
Asterisk |
|
43 |
2B |
00101011 |
|
Plus Sign |
|
44 |
2C |
00101100 |
|
Comma |
|
45 |
2D |
00101101 |
|
Hyphen/Minus |
|
46 |
2E |
00101110 |
|
Period |
|
47 |
2F |
00101111 |
|
Slash |
|
48 |
30 |
00110000 |
|
Digit Zero |
|
49 |
31 |
00110001 |
|
Digit One |
|
50 |
32 |
00110010 |
|
Digit Two |
|
51 |
33 |
00110011 |
|
Digit Three |
|
52 |
34 |
00110100 |
|
Digit Four |
|
53 |
35 |
00110101 |
|
Digit Five |
|
54 |
36 |
00110110 |
|
Digit Six |
|
55 |
37 |
00110111 |
|
Digit Seven |
|
56 |
38 |
00111000 |
|
Digit Eight |
|
57 |
39 |
00111001 |
|
Digit Nine |
|
58 |
3A |
00111010 |
|
Colon |
|
59 |
3B |
00111011 |
|
Semicolon |
|
60 |
3C |
00111100 |
|
Less-Than Sign |
|
61 |
3D |
00111101 |
|
Equals Sign |
|
62 |
3E |
00111110 |
|
Greater-Than Sign |
|
63 |
3F |
00111111 |
|
Question Mark |
|
64 |
40 |
01000000 |
|
At Sign |
|
65 |
41 |
01000001 |
|
Capital Letter A |
|
66 |
42 |
01000010 |
|
Capital Letter B |
|
67 |
43 |
01000011 |
|
Capital Letter C |
|
68 |
44 |
01000100 |
|
Capital Letter D |
|
69 |
45 |
01000101 |
|
Capital Letter E |
|
70 |
46 |
01000110 |
|
Capital Letter F |
|
71 |
47 |
01000111 |
|
Capital Letter G |
|
72 |
48 |
01001000 |
|
Capital Letter H |
|
73 |
49 |
01001001 |
|
Capital Letter I |
|
74 |
4A |
01001010 |
|
Capital Letter J |
|
75 |
4B |
01001011 |
|
Capital Letter K |
|
76 |
4C |
01001100 |
|
Capital Letter L |
|
77 |
4D |
01001101 |
|
Capital Letter M |
|
78 |
4E |
01001110 |
|
Capital Letter N |
|
79 |
4F |
01001111 |
|
Capital Letter O |
|
80 |
50 |
01010000 |
|
Capital Letter P |
|
81 |
51 |
01010001 |
|
Capital Letter Q |
|
82 |
52 |
01010010 |
|
Capital Letter R |
|
83 |
53 |
01010011 |
|
Capital Letter S |
|
84 |
54 |
01010100 |
|
Capital Letter T |
|
85 |
55 |
01010101 |
|
Capital Letter U |
|
86 |
56 |
01010110 |
|
Capital Letter V |
|
87 |
57 |
01010111 |
|
Capital Letter W |
|
88 |
58 |
01011000 |
|
Capital Letter X |
|
89 |
59 |
01011001 |
|
Capital Letter Y |
|
90 |
5A |
01011010 |
|
Capital Letter Z |
|
91 |
5B |
01011011 |
|
Left Square Bracket |
|
92 |
5C |
01011100 |
|
Backslash |
|
93 |
5D |
01011101 |
|
Right Square Bracket |
|
94 |
5E |
01011110 |
|
Circumflex Accent |
|
95 |
5F |
01011111 |
|
Underscore |
|
96 |
60 |
01100000 |
|
Grave Accent/Backtick |
|
97 |
61 |
01100001 |
|
Small Letter a |
|
98 |
62 |
01100010 |
|
Small Letter b |
|
99 |
63 |
01100011 |
|
Small Letter c |
|
100 |
64 |
01100100 |
|
Small Letter d |
|
101 |
65 |
01100101 |
|
Small Letter e |
|
102 |
66 |
01100110 |
|
Small Letter f |
|
103 |
67 |
01100111 |
|
Small Letter g |
|
104 |
68 |
01101000 |
|
Small Letter h |
|
105 |
69 |
01101001 |
|
Small Letter i |
|
106 |
6A |
01101010 |
|
Small Letter j |
|
107 |
6B |
01101011 |
|
Small Letter k |
|
108 |
6C |
01101100 |
|
Small Letter l |
|
109 |
6D |
01101101 |
|
Small Letter m |
|
110 |
6E |
01101110 |
|
Small Letter n |
|
111 |
6F |
01101111 |
|
Small Letter o |
|
112 |
70 |
01110000 |
|
Small Letter p |
|
113 |
71 |
01110001 |
|
Small Letter q |
|
114 |
72 |
01110010 |
|
Small Letter r |
|
115 |
73 |
01110011 |
|
Small Letter s |
|
116 |
74 |
01110100 |
|
Small Letter t |
|
117 |
75 |
01110101 |
|
Small Letter u |
|
118 |
76 |
01110110 |
|
Small Letter v |
|
119 |
77 |
01110111 |
|
Small Letter w |
|
120 |
78 |
01111000 |
|
Small Letter x |
|
121 |
79 |
01111001 |
|
Small Letter y |
|
122 |
7A |
01111010 |
|
Small Letter z |
|
123 |
7B |
01111011 |
|
Left Curly Brace |
|
124 |
7C |
01111100 |
|
Vertical Bar/Pipe |
|
125 |
7D |
01111101 |
|
Right Curly Brace |
|
126 |
7E |
01111110 |
|
Tilde |
|
127 |
7F |
01111111 |
DEL |
Delete |
Extended ASCII (128-255)
The upper 128 values of VHDL’s character type correspond to the ISO/IEC 8859-1:1998 “Latin-1” code set.
Since the range 128–159 (decimal) is reserved for control codes in Latin-1, VHDL defines the placeholder enumeration literals C128–C159 to occupy those positions. These can still be used in VHDL code, even though they do not represent printable characters.
|
Decimal |
Hex |
Binary |
VHDL |
Description |
|---|---|---|---|---|
|
128 |
80 |
10000000 |
C128 |
VHDL-Specific |
|
129 |
81 |
10000001 |
C129 |
VHDL-Specific |
|
130 |
82 |
10000010 |
C130 |
VHDL-Specific |
|
131 |
83 |
10000011 |
C131 |
VHDL-Specific |
|
132 |
84 |
10000100 |
C132 |
VHDL-Specific |
|
133 |
85 |
10000101 |
C133 |
VHDL-Specific |
|
134 |
86 |
10000110 |
C134 |
VHDL-Specific |
|
135 |
87 |
10000111 |
C135 |
VHDL-Specific |
|
136 |
88 |
10001000 |
C136 |
VHDL-Specific |
|
137 |
89 |
10001001 |
C137 |
VHDL-Specific |
|
138 |
8A |
10001010 |
C138 |
VHDL-Specific |
|
139 |
8B |
10001011 |
C139 |
VHDL-Specific |
|
140 |
8C |
10001100 |
C140 |
VHDL-Specific |
|
141 |
8D |
10001101 |
C141 |
VHDL-Specific |
|
142 |
8E |
10001110 |
C142 |
VHDL-Specific |
|
143 |
8F |
10001111 |
C143 |
VHDL-Specific |
|
144 |
90 |
10010000 |
C144 |
VHDL-Specific |
|
145 |
91 |
10010001 |
C145 |
VHDL-Specific |
|
146 |
92 |
10010010 |
C146 |
VHDL-Specific |
|
147 |
93 |
10010011 |
C147 |
VHDL-Specific |
|
148 |
94 |
10010100 |
C148 |
VHDL-Specific |
|
149 |
95 |
10010101 |
C149 |
VHDL-Specific |
|
150 |
96 |
10010110 |
C150 |
VHDL-Specific |
|
151 |
97 |
10010111 |
C151 |
VHDL-Specific |
|
152 |
98 |
10011000 |
C152 |
VHDL-Specific |
|
153 |
99 |
10011001 |
C153 |
VHDL-Specific |
|
154 |
9A |
10011010 |
C154 |
VHDL-Specific |
|
155 |
9B |
10011011 |
C155 |
VHDL-Specific |
|
156 |
9C |
10011100 |
C156 |
VHDL-Specific |
|
157 |
9D |
10011101 |
C157 |
VHDL-Specific |
|
158 |
9E |
10011110 |
C158 |
VHDL-Specific |
|
159 |
9F |
10011111 |
C159 |
VHDL-Specific |
|
160 |
A0 |
10100000 |
|
Non-breaking Space |
|
161 |
A1 |
10100001 |
|
Inverted Exclamation |
|
162 |
A2 |
10100010 |
|
Cent Sign |
|
163 |
A3 |
10100011 |
|
Pound Sign |
|
164 |
A4 |
10100100 |
|
Currency Sign |
|
165 |
A5 |
10100101 |
|
Yen Sign |
|
166 |
A6 |
10100110 |
|
Broken Bar |
|
167 |
A7 |
10100111 |
|
Section Sign |
|
168 |
A8 |
10101000 |
|
Diaeresis |
|
169 |
A9 |
10101001 |
|
Copyright Sign |
|
170 |
AA |
10101010 |
|
Feminine Ordinal |
|
171 |
AB |
10101011 |
|
Left Angle Quote |
|
172 |
AC |
10101100 |
|
Not Sign |
|
173 |
AD |
10101101 |
|
Soft Hyphen |
|
174 |
AE |
10101110 |
|
Registered Sign |
|
175 |
AF |
10101111 |
|
Macron |
|
176 |
B0 |
10110000 |
|
Degree Sign |
|
177 |
B1 |
10110001 |
|
Plus-Minus Sign |
|
178 |
B2 |
10110010 |
|
Superscript Two |
|
179 |
B3 |
10110011 |
|
Superscript Three |
|
180 |
B4 |
10110100 |
|
Acute Accent |
|
181 |
B5 |
10110101 |
|
Micro Sign |
|
182 |
B6 |
10110110 |
|
Paragraph/Pilcrow Sign |
|
183 |
B7 |
10110111 |
|
Middle Dot/Interpunct |
|
184 |
B8 |
10111000 |
|
Cedilla/Cedille |
|
185 |
B9 |
10111001 |
|
Superscript One |
|
186 |
BA |
10111010 |
|
Masculine Ordinal |
|
187 |
BB |
10111011 |
|
Right Angle Quote |
|
188 |
BC |
10111100 |
|
One Quarter |
|
189 |
BD |
10111101 |
|
One Half |
|
190 |
BE |
10111110 |
|
Three Quarters |
|
191 |
BF |
10111111 |
|
Inverted Question Mark |
|
192 |
C0 |
11000000 |
|
Capital A with Grave |
|
193 |
C1 |
11000001 |
|
Capital A with Acute |
|
194 |
C2 |
11000010 |
|
Capital A with Circumflex |
|
195 |
C3 |
11000011 |
|
Capital A with Tilde |
|
196 |
C4 |
11000100 |
|
Capital A with Diaeresis |
|
197 |
C5 |
11000101 |
|
Capital A with Ring |
|
198 |
C6 |
11000110 |
|
Capital AE Ligature |
|
199 |
C7 |
11000111 |
|
Capital C with Cedilla |
|
200 |
C8 |
11001000 |
|
Capital E with Grave |
|
201 |
C9 |
11001001 |
|
Capital E with Acute |
|
202 |
CA |
11001010 |
|
Capital E with Circumflex |
|
203 |
CB |
11001011 |
|
Capital E with Diaeresis |
|
204 |
CC |
11001100 |
|
Capital I with Grave |
|
205 |
CD |
11001101 |
|
Capital I with Acute |
|
206 |
CE |
11001110 |
|
Capital I with Circumflex |
|
207 |
CF |
11001111 |
|
Capital I with Diaeresis |
|
208 |
D0 |
11010000 |
|
Capital Eth |
|
209 |
D1 |
11010001 |
|
Capital N with Tilde |
|
210 |
D2 |
11010010 |
|
Capital O with Grave |
|
211 |
D3 |
11010011 |
|
Capital O with Acute |
|
212 |
D4 |
11010100 |
|
Capital O with Circumflex |
|
213 |
D5 |
11010101 |
|
Capital O with Tilde |
|
214 |
D6 |
11010110 |
|
Capital O with Diaeresis |
|
215 |
D7 |
11010111 |
|
Multiplication Sign |
|
216 |
D8 |
11011000 |
|
Capital O with Stroke |
|
217 |
D9 |
11011001 |
|
Capital U with Grave |
|
218 |
DA |
11011010 |
|
Capital U with Acute |
|
219 |
DB |
11011011 |
|
Capital U with Circumflex |
|
220 |
DC |
11011100 |
|
Capital U with Diaeresis |
|
221 |
DD |
11011101 |
|
Capital Y with Acute |
|
222 |
DE |
11011110 |
|
Capital Thorn |
|
223 |
DF |
11011111 |
|
Small Sharp S (Eszett) |
|
224 |
E0 |
11100000 |
|
Small a with Grave |
|
225 |
E1 |
11100001 |
|
Small a with Acute |
|
226 |
E2 |
11100010 |
|
Small a with Circumflex |
|
227 |
E3 |
11100011 |
|
Small a with Tilde |
|
228 |
E4 |
11100100 |
|
Small a with Diaeresis |
|
229 |
E5 |
11100101 |
|
Small a with Ring |
|
230 |
E6 |
11100110 |
|
Small ae Ligature |
|
231 |
E7 |
11100111 |
|
Small c with Cedilla |
|
232 |
E8 |
11101000 |
|
Small e with Grave |
|
233 |
E9 |
11101001 |
|
Small e with Acute |
|
234 |
EA |
11101010 |
|
Small e with Circumflex |
|
235 |
EB |
11101011 |
|
Small e with Diaeresis |
|
236 |
EC |
11101100 |
|
Small i with Grave |
|
237 |
ED |
11101101 |
|
Small i with Acute |
|
238 |
EE |
11101110 |
|
Small i with Circumflex |
|
239 |
EF |
11101111 |
|
Small i with Diaeresis |
|
240 |
F0 |
11110000 |
|
Small Eth |
|
241 |
F1 |
11110001 |
|
Small n with Tilde |
|
242 |
F2 |
11110010 |
|
Small o with Grave |
|
243 |
F3 |
11110011 |
|
Small o with Acute |
|
244 |
F4 |
11110100 |
|
Small o with Circumflex |
|
245 |
F5 |
11110101 |
|
Small o with Tilde |
|
246 |
F6 |
11110110 |
|
Small o with Diaeresis |
|
247 |
F7 |
11110111 |
|
Division Sign |
|
248 |
F8 |
11111000 |
|
Small o with Stroke |
|
249 |
F9 |
11111001 |
|
Small u with Grave |
|
250 |
FA |
11111010 |
|
Small u with Acute |
|
251 |
FB |
11111011 |
|
Small u with Circumflex |
|
252 |
FC |
11111100 |
|
Small u with Diaeresis |
|
253 |
FD |
11111101 |
|
Small y with Acute |
|
254 |
FE |
11111110 |
|
Small Thorn |
|
255 |
FF |
11111111 |
|
Small y with Diaeresis |
