-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdebug_interface.vhd
50 lines (39 loc) · 1.24 KB
/
debug_interface.vhd
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
------------------------------------------------------
-- Assignment SSDS, Andrea Floridia S224906
-- Debug Interface
------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
------------------------------------------------------
------------------------------------------------------
entity debug_interface is
port (
command : in std_logic_vector(1 downto 0);
number_of_errors : in std_logic_vector(15 downto 0);
data_out_ram : in std_logic_vector(31 downto 0);
debug_port : out std_logic_vector(31 downto 0)
);
end debug_interface;
------------------------------------------------------
------------------------------------------------------
architecture Behavioral of debug_interface is
begin
DBComb_Logic:process(command, number_of_errors, data_out_ram)
begin
case command is
when "00" =>
debug_port <= (others => 'Z');
when "01" =>
debug_port <= data_out_ram;
when "10" =>
debug_port(15 downto 0) <= number_of_errors;
debug_port(31 downto 16) <= (others => '0');
when "11" =>
debug_port <= (others => 'Z');
when others =>
debug_port <= (others => 'Z');
end case;
end process;
end Behavioral;