GilsonMuniz

MODULO

Jun 11th, 2020
134
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.            w : in  STD_LOGIC;
  9.            y0 : out  STD_LOGIC;
  10.            y1 : out  STD_LOGIC;
  11.            y2 : out  STD_LOGIC;
  12.            y3 : out  STD_LOGIC);
  13. end modulo;
  14.  
  15. architecture Behavioral of modulo is
  16.  
  17. begin
  18.  
  19. process(w, a, b, e) is
  20.  
  21. begin
  22.  
  23.         y0 <= '0';
  24.         y1 <= '0';
  25.         y2 <= '0';
  26.         y3 <= '0';
  27.     if(e = '1')then
  28.  
  29.         if(a = '0' and b = '0')then
  30.             y0 <= w;
  31.         elsif(a = '0' and b = '1')then
  32.             y1 <= w;
  33.         elsif(a = '1' and b = '0')then
  34.             y2 <= w;
  35.         elsif(a = '1' and b = '1')then
  36.             y3 <= w;
  37.         end if;
  38.     end if;
  39. end process;
  40.  
  41. 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.

×