OtavioMonteiro

decodificador

May 27th, 2020
152
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --decodificador
  2.  
  3. library IEEE;
  4. use IEEE.std_logic_1164.all;
  5. use ieee.numeric_std.all;
  6.  
  7. entity decodificador is
  8.     port (
  9.         escolha:      in std_logic_vector(2 downto 0);
  10.         modulo22, modulo19, modulo16, modulo13, modulo10, modulo7, modulo4, modulo1:  out std_logic;   
  11.     );
  12. end decodificador;
  13.  
  14.  
  15. ----------------------------------------------------------
  16. -------------- Arquitetura --------------------------------
  17. architecture comportamental of decodificador is
  18.  
  19.  
  20.     --------- Declaracao de sinais usados -------
  21.     signal output :  std_logic_vector(7 downto 0);
  22.     ---------------------------------------------------
  23.    
  24.  
  25. ---------------------------------------------
  26. -------- Descricao do comportamento
  27. begin
  28.  
  29.     saidaoutput: with escolha select
  30.       output <=     "00000001" when "000",
  31.                     "00000010" when "001",
  32.                     "00000100" when "010",
  33.                     "00001000" when "011",
  34.                     "00010000" when "100",
  35.                     "00100000" when "101",
  36.                     "01000000" when "110",
  37.                     "10000000" when "111",
  38.                     "00000000" when others;
  39.                    
  40.    
  41.     --- Saidas para os modulos com alcapao 
  42.     modulo1  <= output(0);
  43.     modulo4  <= output(1);
  44.     modulo7  <= output(2);
  45.     modulo10 <= output(3);
  46.     modulo13 <= output(4);
  47.     modulo16 <= output(5);
  48.     modulo19 <= output(6);
  49.     modulo22 <= output(7);
  50.    
  51.    
  52. end architecture;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×