1 / 7

EECE 320 Digital Systems Design Lecture 15: Combinational Logic Design Practices

EECE 320 Digital Systems Design Lecture 15: Combinational Logic Design Practices. Ali Chehab. 74x148 Priority Encoder. Inputs and Outputs are active low GS asserted if EI asserted and 1 or more Inputs are asserted

vshirley
Download Presentation

EECE 320 Digital Systems Design Lecture 15: Combinational Logic Design Practices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EECE 320Digital Systems DesignLecture 15: Combinational Logic Design Practices Ali Chehab

  2. 74x148 Priority Encoder • Inputs and Outputs are active low • GS asserted if EI asserted and 1 or more Inputs are asserted • EO asserted if EI is asserted but no input is asserted, could be connected to another EI (lower priority)

  3. 32-to-5 Priority Encoder – 4 (74x148) GS signals are used as a 4-to-2 encoder to set the values of RA4 and RA3 RA3 = GS1 + GS3 RA4 = GS2 + GS3 RGS is asserted if any GS is asserted The outputs A2-A0 of at most one 74x148 will be enabled at any time. They can be ORed to produce RA2-RA0 MSB 11 11000 11111 MSB 10 10000 10111 MSB 01 01000 01111 MSB 00 00000 00111

  4. VHDL 8-to-3 Priority Encoder library IEEE; use IEEE.std_logic_1164.all; entity encoder8to3 is port ( I: in STD_LOGIC_VECTOR (7 downto 0); A: out STD_LOGIC_VECTOR (2 downto 0) ); end encoder8to3; architecture encoder8to3 of encoder8to3 is

  5. VHDL 8-to-3 Priority Encoder function CONV_STD_LOGIC_VECTOR(arg: integer; size: integer) return std_logic_vector is variable result : std_logic_vector(size-1 downto 0); variable temp : integer; begin temp := arg; for i in 0 to size-1 loop if (temp mod 2) = 1 then result(i) := '1'; else result(i) := '0'; end if; temp := temp/2; end loop; return result; end;

  6. VHDL 8-to-3 Priority Encoder begin process (I) variable j: integer range 7 downto 0; begin for j in 7 downto 0 loop if I(j) = '1' then A <= CONV_STD_LOGIC_VECTOR(j, 3); exit; end if; end loop; end process; end encoder8to3;

  7. Next Lecture and Reminders • Next lecture • Reminders

More Related