Advertisement
Guest User

Shema

a guest
Mar 22nd, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `timescale 1ns / 1ps
  2. module EightToThreeCoder(
  3. input x1,
  4. input x2,
  5. input x3,
  6. input x4,
  7. input x5,
  8. input x6,
  9. input x7,
  10. output y2,
  11. output y1,
  12. output y0
  13.     );
  14. wire not_x1, not_x2, not_x3, not_x4, not_x5, not_x6, not_x7, x76,
  15. not_x76, x54, not_x54, x32, not_x32, x75, not_x75, x31, not_x31;  
  16. nand(not_x1, x1,x1);
  17. nand(not_x2, x2,x2);
  18. nand(not_x3, x3,x3);
  19. nand(not_x4, x4,x4);
  20. nand(not_x5, x5,x5);
  21. nand(not_x6, x6, x6);
  22. nand(not_x7, x7,x7);
  23.  
  24. nand(x76,not_x7,not_x6);
  25. nand(not_x76, x76, x76);
  26. nand(x54, not_x5, not_x4);
  27. nand(not_x54, x54, x54);
  28. nand(y2, not_x76, not_x54);
  29.  
  30. nand(x32, not_x3, not_x2);
  31. nand(not_x32, x32, x32);
  32. nand(y1, not_x76, not_x32);
  33.  
  34. nand(x75, not_x7, not_x5);
  35. nand(not_x75, x75, x75);
  36. nand(x31, not_x3, not_x1);
  37. nand(not_x31, x31, x31);
  38. nand(y0, not_x75, not_x31);
  39.  
  40. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement