forked from salb545/VHDLWhizCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes_pck.vhd
More file actions
35 lines (22 loc) · 1.03 KB
/
types_pck.vhd
File metadata and controls
35 lines (22 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
library ieee;
use ieee.std_logic_1164.all;
library dot_matrix_sim;
package types is
subtype row_range is natural range 0 to 7;
subtype col_range is natural range 7 downto 0;
-- Represents the 8x8 LED matrix
type matrix_type is array (row_range) of std_logic_vector(col_range);
-- The addressable ASCII range
subtype char_range is natural range 0 to 127;
-- ROM type
type charmap_type is array (char_range) of matrix_type;
end package;
--- ESSENTIALLY AN ARRAY WITHIN AN ARRAY
--- The "INNER ARRAY" SHOWS WHICH 8 X 8 LED'S TO TURN ON & OFF
--- THE "OUTER ARRAY" ALLOWS THE PICKING OF ONE OF THE 128 OPTIONS (e.g A,B,;, :) TO PICK
--- REFERENCES:
--- https://www.vhdl-online.de/courses/system_design/vhdl_language_and_syntax/extended_data_types/arrays
--- https://surf-vhdl.com/vhdl-array/
---- NOTES:
---- Multidimensional arrays can simply be obtained by defining a new data type as array of another array data type (1).
---- When accessing its array elements, the selections are processed from left to right,