-- vhdl model for the 3 to 8 decoder --************************************************************************* -- IO Interface Declaration --************************************************************************* library ieee; use ieee.std_logic_1164.all; entity dec3to8_bad is port ( -- inputs signal sel: in std_logic_vector(2 downto 0); -- selector signal en: in std_logic; -- enable -- outputs signal y: out std_logic_vector(7 downto 0) -- outputs are low true ); end dec3to8_bad; --************************************************************************* -- Architecture body --************************************************************************* architecture behavior of dec3to8_bad is begin process (sel,en) begin --- y <= "11111111"; 'y' does not have default assignment if (en = '1') then case sel is when "000" => y(0) <= '0'; when "001" => y(1) <= '0'; when "010" => y(2) <= '0'; when "011" => y(3) <= '0'; when "100" => y(4) <= '0'; when "101" => y(5) <= '0'; when "110" => y(6) <= '0'; when "111" => y(7) <= '0'; when others => y(7) <= '0'; end case; end if; end process; end behavior; <div align="center"><br /><script type="text/javascript"><!-- google_ad_client = "pub-7293844627074885"; //468x60, Created at 07. 11. 25 google_ad_slot = "8619794253"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><br /> </div>