Guest User

Untitled

a guest
Oct 1st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module test(x1,x2,x3,y1,y2);
  2.  
  3. input x1,x2,x3;
  4. output reg y1,y2;
  5.  
  6. // module 1
  7. always @ (x1 or y1)
  8. begin
  9.  
  10.     if (x1 == 0)
  11.         y1 = 0;
  12.     else
  13.         y1 = 1;
  14.    
  15. end
  16.  
  17. // module 2
  18. always @ (x2 or x3 or y2)
  19. begin
  20.  
  21.    y2 = x2 | ~x3;
  22.    
  23. end
  24.  
  25. endmodule
Advertisement
Add Comment
Please, Sign In to add comment