Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include "ios_driver.h"
  2.  
  3. void ios_driver::test() {
  4.  
  5. //Variables
  6. sc_uint<4> sw_test;
  7. sc_uint<4> ctrl_test;
  8. sc_uint<4> led_result;
  9.  
  10. //Initialization
  11. sw_test = 0x0;
  12. ctrl_test = 0x0;
  13.  
  14. reset.write(true);
  15. wait();
  16. reset.write(false);
  17. wait();
  18.  
  19. ctrl.write(ctrl_test);
  20. outSwitch.write(sw_test);
  21.  
  22. wait();
  23. wait();
  24.  
  25. led_result = inLeds.read();
  26. wait();
  27.  
  28. if (sw_test == led_result)
  29. retval = 0;
  30. else
  31. retval = 1;
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement