Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. module myphoto(O1,O2,O3,O4,I1,I2,I3,I4,I5,I6);
  2. //parameter delay = 5;
  3. output O1,O2,O3,O4; //OUTPUT: ~CAPTURE, ~OUTOFFOCUS, ~FLASH, ~THERMONUCLEAR DEVICE;
  4. input I1,I2,I3,I4,I5,I6; //INPUT: SYSON, TAKE, SELFLASH, NOFLASH, ~INFOCUS, ~LOWLIGHT;
  5.  
  6. not n1(nI1,I1);
  7. not n2(nI2,I2);
  8. not n3(nI3,I3);
  9. not n4(nI4,I4);
  10. not n5(nI5,I5);
  11. not n6(nI6,I6);
  12.  
  13. or group11(o11,nI1,nI2,I3,I3,I5,nI6);
  14. or group12(o12,nI1,nI2,nI3,I4,I5,I6);
  15. and and1(O1,o11,o12);
  16.  
  17. or o2(O2,nI1,nI2,nI5);
  18.  
  19. or group31(o31,nI1,nI2,nI3,I4,I5,I5);
  20. or group32(o32,nI1,nI2,I4,I5,I6,I6);
  21. and and3(O3,o31,o32);
  22.  
  23. or o4(O4,nI1,nI2,nI3,nI4);
  24.  
  25. endmodule
  26.  
  27. module testModule(I1, I2, I3, I4, I5, I6, O1, O2, O3, O4);
  28. input O1, O2, O3, O4;
  29. output I1, I2, I3, I4, I5, I6;
  30. reg I1, I2, I3, I4, I5, I6;
  31. parameter delay=5;
  32. integer i;
  33.  
  34. initial
  35. begin
  36. I1 = 0; I2 = 0; I3 = 0; I4 = 0; I5 = 0; I6 = 0;
  37. for(i=0;i<64;i=i+1)
  38. begin
  39. #delay {I1,I2,I3,I4,I5,I6} = i;
  40. end
  41. $stop;
  42. $finish;
  43. end
  44. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement