SHARE
TWEET

Untitled

a guest Jan 14th, 2016 119 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. check_response(ins: instruction_s) is only {
  2.             // Check for overflow
  3.             if (ins.din2 > ins.din1) {
  4.                 // Underflow occurs
  5.                 check that ins.resp == 2 else
  6.                     dut_error(appendf("[R==>Port %s invalid response.<==R]\n \
  7.                                Instruction %s %u %u,\n \
  8.                                expected resp: %d \n \
  9.                                recieved resp: %d \n ",
  10.                                 ins.port, ins.cmd_in, ins.din1, ins.din2, 2, ins.resp));
  11.             } else {
  12.                 // Check correct subtraction occurs
  13.                 check that ins.resp == 01;
  14.                 check that (ins.dout == (ins.din1 - ins.din2)) else
  15.                     dut_error(appendf("[R==>Port %s invalid output.<==R]\n \
  16.                                Instruction %s %u %u,\n \
  17.                                expected %032.32b \t %u,\n \
  18.                                received %032.32b \t %u.\n",
  19.                                 ins.port, ins.cmd_in, ins.din1, ins.din2,
  20.                                 (ins.din1 - ins.din2),
  21.                                 (ins.din1 - ins.din2),
  22.                                 ins.dout,ins.dout));
  23.             };
  24.         };
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