daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Apr 20th, 2018 55 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. ENTITY FA IS PORT(
  5.     a: IN STD_LOGIC_VECTOR(1 DOWNTO 0);
  6.     b: IN STD_LOGIC_VECTOR(1 DOWNTO 0);
  7.     cin: IN STD_LOGIC;
  8.     r: OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
  9.     cout: OUT STD_LOGIC
  10. );
  11. END FA;
  12.  
  13. ARCHITECTURE arch OF FA IS
  14.  
  15. BEGIN
  16. cout <=( (a(0) and b(0)) or
  17.     (b(1) and b(0) and cin) or
  18.     (a(1) and a(0) and b(1)) or
  19.     (a(1) and b(0) and cin) or
  20.     (a(1) and a(0) and cin) or
  21.     (a(1) and b(1) and b(0)) or
  22.     (a(0) and b(1) and cin)
  23. ) after 10 ns;
  24.  
  25.  
  26. r(1) <=((not a(1) and b(1) and not cin) or
  27.     (not a(1) and not b(1) and cin) or
  28.     (a(1) and not b(1) and not cin) or
  29.     ( a(1) and b(1) and cin)
  30. ) after 10 ns;
  31.          
  32.  
  33.  
  34. r(0) <=( (not a(0) and b(1) and not b(0) and cin) or
  35.     (not a(1) and not a(0) and b(0) and not cin) or
  36.     (a(1) and a(0) and b(1) and b(0) ) or
  37.     (a(1) and not a(0) and not b(0) and cin) or
  38.     (not a(0) and not b(1) and b(0) and not cin) or
  39.     (a(1) and a(0) and b(0) and cin) or
  40.     (a(1) and not a(0) and b(1) and not b(0)) or
  41.     (not a(1) and not a(0) and not b(1) and b(0)) or
  42.     (a(0) and not b(1) and not b(0) and not cin) or
  43.     (not a(1) and a(0) and not b(1) and not b(0)) or
  44.     (a(0) and b(1) and b(0) and cin) or
  45.     (not a(1) and a(0) and not b(0) and not cin)
  46. ) after 10 ns;
  47. END arch;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top