From a4ddd4bf8e12f8c15bb6766afc87601a72bcd2e0 Mon Sep 17 00:00:00 2001 From: Vladimir Burian Date: Thu, 14 Apr 2011 23:27:41 +0200 Subject: [PATCH] MCC execution control unit added --- mcc_exec.vhd | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 mcc_exec.vhd diff --git a/mcc_exec.vhd b/mcc_exec.vhd new file mode 100644 index 0000000..8c39167 --- /dev/null +++ b/mcc_exec.vhd @@ -0,0 +1,49 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; + +-------------------------------------------------------------------------------- + +entity mcc_exec is + port ( + -- Clock & reset + CLK_I : in std_logic; + RST_I : in std_logic; + -- MCC execution + MCC_EN_I : in std_logic; + MCC_EXEC_I : in std_logic; + MCC_ERR_O : out std_logic; + -- MCC master interface + MCC_ACK_I : in std_logic; + MCC_STB_O : out std_logic); +end entity mcc_exec; + +-------------------------------------------------------------------------------- + +architecture behavioral of mcc_exec is + + signal mcc_stb : std_logic := '0'; + +-------------------------------------------------------------------------------- + +begin + + MCC_STB_O <= mcc_stb; + + MCC_ERR_O <= MCC_EXEC_I and (mcc_stb or MCC_ACK_I); + + + process (CLK_I, RST_I) is + begin + if rising_edge(CLK_I) then + if RST_I = '1' or MCC_ACK_I = '1' then + mcc_stb <= '0'; + elsif MCC_EN_I = '1' and MCC_EXEC_I = '1' then + mcc_stb <= '1'; + end if; + end if; + end process; + +end architecture behavioral; + -- 2.39.2