CPE129_hw13A_soln

CPE129_hw13A_soln - -- Handle the Enable_Low first if...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CPE 129 Homework 13 Solution W. Pilkington 1. Write the VHDL Code for a 3-to-8 Binary Decoder, with Active Low outputs (outputs are '1' for all channels, except the output is '0' for the channel number that matches the binary input code ); and with an Active Low strobe enable (ALL outputs are made to be inactive (ALL '1's) if a '1' is received on this input. THIS TIME USE A BEHAVIORAL MODEL (a "Process") FOR YOUR VHDL DESCRIPTION. ~EN B1 B1 B0 ~F0 ~F1 ~F2 ~F3 ~F4 ~F5 ~F6 ~F7 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 1 - - - 1 1 1 1 1 1 1 1 B0 B1 B2 3-to-8 Decoder EN F0 F1 F2 F3 F4 F5 F6 F7
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CPE 129 Homework 13 Solution W. Pilkington entity BinaryDecoder3to8 is Port ( Binary_In : in STD_LOGIC_VECTOR (2 downto 0); Enable_Low: in STD_LOGIC; Decode_Out : out STD_LOGIC_VECTOR (7 downto 0)); end BinaryDecoder3to8; architecture Behavioral of BinaryDecoder3to8 is begin -- Using a Behavioral Description (Process) decoder_behav: process (Binary_In, Enable_Low) is begin
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -- Handle the Enable_Low first if (Enable_Low = '1') then Decode_Out <= "11111111"; e l s e-- If enabled, decoder the input c a s e ( B i n a r y _ I n ) i s when "111" => Decode_Out <= "01111111"; when "110" => Decode_Out <= "10111111"; when "101" => Decode_Out <= "11011111"; when "100" => Decode_Out <= "11101111"; when "011" => Decode_Out <= "11110111"; when "010" => Decode_Out <= "11111011"; when "001" => Decode_Out <= "11111101"; when "000" => Decode_Out <= "11111110"; when others => Decode_Out <= "11111111";-- Just in case e n d c a s e ; end if; end process decoder_behav; end Behavioral; [NOTE: The Xilinx VHDL compiler produced an identical circuit implementation for this Behavioral VHDL code as was generated in Assignment #12 from a Concurrent (Data-Flow) VHDL model. (This is a "good" thing!)]...
View Full Document

This note was uploaded on 03/15/2009 for the course CPE 129 taught by Professor Mealy during the Spring '07 term at Cal Poly.

Page1 / 2

CPE129_hw13A_soln - -- Handle the Enable_Low first if...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online