📄 rom2_labirint.vhd
字号:
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 08:55:36 05/09/09
-- Design Name:
-- Module Name: rom2_labirint - Behavioral
-- Project Name:
-- Target Device:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
--------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity rom2_labirint is
port(row, col : in std_logic_vector(5 downto 0);
char : out std_logic_vector(2 downto 0)
);
end rom2_labirint;
architecture Behavioral of rom2_labirint is
type matrice is array(0 to 39) of std_logic_vector(2 downto 0);
type memorie is array (0 to 29) of matrice;
constant mem : memorie :=
( ("001","001","001","001","001","001","001","001","001","001",
"001","001","001","001","001","001","001","001","001","001",
"001","001","001","001","001","001","001","001","001","001",
"001","001","001","001","001","001","001","001","001","001"),
("001","000","000","000","001","000","000","000","001","000",
"000","000","001","000","000","000","001","000","000","000",
"001","000","000","000","000","000","000","000","000","001",
"000","000","000","000","000","001","001","001","001","001"),
("001","001","001","000","001","000","001","000","001","000",
"001","000","001","000","001","000","001","000","001","000",
"000","000","000","001","000","000","000","000","001","001",
"000","000","000","001","000","001","001","001","001","001"),
("001","000","000","000","000","000","001","000","001","000",
"001","000","001","000","001","000","001","000","001","000",
"000","000","000","000","001","001","000","000","000","000",
"001","000","000","000","000","001","001","001","001","001"),
("001","000","000","000","000","000","001","000","000","000",
"001","000","000","000","001","000","000","000","001","001",
"001","000","000","000","000","000","000","001","000","001",
"000","000","001","000","000","001","001","001","001","001"),
("001","001","000","000","001","001","001","001","001","000",
"001","001","001","001","001","001","001","001","001","000",
"000","000","001","001","000","000","000","000","000","000",
"000","000","001","000","000","001","001","001","001","001"),
("001","001","000","000","000","000","000","000","000","000",
"000","000","000","000","000","001","000","000","001","000",
"001","000","000","000","000","001","000","001","001","000",
"000","001","000","001","001","001","001","001","001","001"),
("001","001","000","001","001","001","001","001","000","001",
"001","001","001","001","001","001","001","000","001","000",
"000","000","000","001","000","001","000","000","000","001",
"000","000","000","000","000","001","000","001","000","001"),
("001","001","000","000","001","000","001","000","000","000",
"000","000","000","001","000","000","000","000","001","000",
"001","000","000","000","000","000","000","000","001","000",
"000","001","000","001","000","001","001","001","000","001"),
("001","000","000","000","001","000","001","000","000","000",
"001","000","000","000","000","001","000","001","001","000",
"001","000","001","000","001","000","000","000","000","001",
"000","000","000","001","000","001","000","000","000","001"),
("001","000","000","001","000","000","000","000","001","000",
"000","001","000","000","001","001","000","000","001","000",
"001","000","000","000","001","001","000","001","000","001",
"000","000","000","001","000","000","000","000","001","001"),
("001","000","000","000","000","000","001","001","000","001",
"000","001","001","000","000","001","000","000","000","000",
"000","001","000","001","001","001","000","001","000","000",
"000","000","000","001","001","001","001","000","000","001"),
("001","000","001","001","000","000","000","001","000","000",
"001","001","000","000","000","001","000","001","001","001",
"001","001","000","001","000","000","000","000","001","001",
"000","001","001","000","000","000","000","000","000","001"),
("001","000","000","000","001","000","000","001","000","001",
"001","000","000","000","001","000","000","000","001","000",
"000","000","000","001","001","001","001","000","001","000",
"000","001","000","000","001","000","000","000","001","001"),
("001","000","000","000","000","000","000","000","000","000",
"000","001","000","000","000","001","001","001","000","000",
"000","000","000","000","000","001","000","001","001","001",
"000","001","000","001","000","000","000","000","000","001"),
("001","001","001","001","000","001","000","001","001","000",
"001","001","001","001","001","001","000","000","001","000",
"000","000","000","000","001","000","001","000","001","000",
"001","001","001","001","001","000","001","000","000","001"),
("001","000","000","000","000","000","000","000","000","001",
"000","000","000","001","000","000","000","000","000","000",
"000","000","000","000","000","000","000","000","001","000",
"000","000","000","000","001","000","000","001","001","001"),
("001","000","000","001","001","001","000","001","001","001",
"000","001","000","001","001","001","001","001","001","001",
"001","000","001","000","000","001","000","001","000","001",
"001","000","001","000","001","000","001","000","000","001"),
("001","000","000","000","000","000","000","000","000","000",
"001","000","000","000","000","001","000","000","000","000",
"000","000","000","000","000","000","000","000","000","000",
"001","000","001","000","001","000","000","001","000","001"),
("001","000","001","001","000","001","001","001","001","001",
"000","001","000","000","000","001","001","000","000","000",
"001","000","000","000","000","000","001","000","000","000",
"001","000","000","000","001","000","000","001","000","001"),
("001","000","001","001","001","000","000","000","001","000",
"000","000","000","000","001","000","000","000","000","000",
"000","000","000","000","000","000","000","001","000","000",
"000","001","001","001","001","000","000","000","000","001"),
("001","000","000","000","001","000","000","000","000","000",
"000","000","001","001","001","001","001","001","001","000",
"000","000","000","001","000","000","000","000","001","001",
"001","000","000","001","001","000","001","000","001","001"),
("001","001","000","000","001","000","001","000","000","001",
"000","000","001","001","000","000","000","000","001","001",
"000","001","000","000","001","000","001","000","000","000",
"000","000","000","000","000","000","000","000","000","001"),
("001","000","000","000","000","000","000","000","000","000",
"000","001","001","000","000","001","001","000","000","001",
"001","000","001","001","000","000","000","001","000","000",
"001","001","001","001","001","000","000","000","000","001"),
("001","000","001","000","001","000","000","001","001","001",
"000","001","000","000","001","001","001","001","000","000",
"000","001","000","000","000","000","000","000","001","001",
"000","000","000","000","001","000","001","000","000","001"),
("001","000","001","001","001","000","000","000","000","001",
"000","000","000","001","001","000","000","001","001","001",
"000","001","000","001","001","000","001","000","000","001",
"000","000","000","000","000","000","001","001","000","001"),
("001","000","000","000","001","001","000","001","000","000",
"000","001","001","001","001","000","000","001","000","000",
"000","000","000","001","000","000","000","001","001","000",
"000","000","000","001","000","001","000","000","000","001"),
("001","000","000","000","000","000","000","000","000","000",
"001","000","000","000","000","000","000","001","000","000",
"000","001","000","000","001","000","000","000","000","000",
"001","000","000","000","001","000","000","000","000","001"),
("001","001","001","001","001","001","001","001","000","000",
"000","000","000","000","000","001","000","000","000","000",
"000","000","000","000","000","001","000","001","000","000",
"000","000","000","000","000","000","000","000","010","001"),
("001","001","001","001","001","001","001","001","001","001",
"001","001","001","001","001","001","001","001","001","001",
"001","001","001","001","001","001","001","001","001","001",
"001","001","001","001","001","001","001","001","001","001")
);
begin
char <= mem(conv_integer(row))(conv_integer(col));
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -