GilsonMuniz

Modulo/2

Jun 11th, 2020
127
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. entity modulo is
  5.     Port ( E : in  STD_LOGIC;
  6.            A : in  STD_LOGIC;
  7.            B : in  STD_LOGIC;
  8.            X0 : in  STD_LOGIC;
  9.            X1 : in  STD_LOGIC;
  10.            X2 : in  STD_LOGIC;
  11.            X3 : in  STD_LOGIC;
  12.            Y : out  STD_LOGIC);
  13. end modulo;
  14.  
  15. architecture Behavioral of modulo is
  16.  
  17. begin
  18.  
  19. process(X0, X1, X2, X3, A, B, E) is
  20.  
  21. begin
  22.     if(E = '0')then
  23.         if(A = '0' and B = '0')then
  24.             Y <= X0;
  25.         elsif(A = '0' and B = '1')then
  26.             Y <= X1;
  27.         elsif(A = '1' and B = '0')then
  28.             Y <= X2;
  29.         else
  30.             Y <= X3;
  31.         end if;
  32.     else
  33.         Y <= not E;
  34.     end if;
  35. end process;
  36. end Behavioral;
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.

×