data/full_repos/permissive/205055389/vlib/coke.v
 line:103: before: "$"
1: b'%Error: data/full_repos/permissive/205055389/vlib/coke.v:85: Unsupported or unknown PLI call: $tkg$post\n      $tkg$post("CokeMachine","%m");\n      ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:86: Unsupported or unknown PLI call: $tkg$exec\n      $tkg$exec("CokeMachine::setCost %m %d",COST);   \n      ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:87: Unsupported or unknown PLI call: $tkg$exec\n      $tkg$exec("CokeMachine::resetMachine %m %d",_RESET);   \n      ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:94: Unsupported or unknown PLI call: $tkg$exec\n    $tkg$exec("CokeMachine::setEmpty %m {%b %b %b %b %b %b}", ELIGHT[0],ELIGHT[1],ELIGHT[2],ELIGHT[3],ELIGHT[4],ELIGHT[5]);\n    ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:103: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::dispense %m 0");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:103: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::dispense %m 0");\n        ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:107: Unsupported: Ignoring delay on this delayed statement.\n      #10 DISPACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:113: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::dispense %m 1");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:113: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::dispense %m 1");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:117: Unsupported: Ignoring delay on this delayed statement.\n      #10 DISPACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:123: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::dispense %m 2");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:123: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::dispense %m 2");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:127: Unsupported: Ignoring delay on this delayed statement.\n      #10 DISPACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:133: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::dispense %m 3");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:133: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::dispense %m 3");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:137: Unsupported: Ignoring delay on this delayed statement.\n      #10 DISPACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:143: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::dispense %m 4");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:143: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::dispense %m 4");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:147: Unsupported: Ignoring delay on this delayed statement.\n      #10 DISPACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:153: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::dispense %m 5");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:153: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::dispense %m 5");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:157: Unsupported: Ignoring delay on this delayed statement.\n      #10 DISPACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:165: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::ejectChange %m 25");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:165: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::ejectChange %m 25");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:169: Unsupported: Ignoring delay on this delayed statement.\n    #10 CHGACK = 1\'b0;\n    ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:174: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::ejectChange %m 10");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:174: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::ejectChange %m 10");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:178: Unsupported: Ignoring delay on this delayed statement.\n      #10 CHGACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:183: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::ejectChange %m 5");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:183: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::ejectChange %m 5");\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:187: Unsupported: Ignoring delay on this delayed statement.\n      #10 CHGACK = 1\'b0;\n      ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:192: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::commitInserted %m");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:192: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::commitInserted %m");\n        ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:201: Unsupported or unknown PLI call: $tkg$exec\n        #10 $tkg$exec("CokeMachine::returnInserted %m");\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:201: Unsupported: Ignoring delay on this delayed statement.\n        #10 $tkg$exec("CokeMachine::returnInserted %m");\n        ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:210: Unsupported or unknown PLI call: $tkg$exec\n  always @ (INSACK) $tkg$exec("CokeMachine::insertAck %m -value %b",INSACK);   \n                    ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:213: Unsupported or unknown PLI call: $tkg$exec\n  always @ (COST) $tkg$exec("CokeMachine::setCost %m %d",COST);   \n                  ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:214: Unsupported or unknown PLI call: $tkg$exec\n  always @ (_RESET) $tkg$exec("CokeMachine::resetMachine %m %d",_RESET);   \n                    ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:221: Unsupported or unknown PLI call: $tkg$send\n  always @ (NOCHG) $tkg$send("%m.NOCHG",NOCHG);\n                   ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:222: Unsupported or unknown PLI call: $tkg$send\n  always @ (BILLLT) $tkg$send("%m.BILLLT",BILLLT);\n                    ^~~~~~~~~\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:230: Unsupported or unknown PLI call: $tkg$exec\n     #10 $tkg$exec("CokeMachine::billIn %m -value %b",BILLIN);\n         ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:230: Unsupported: Ignoring delay on this delayed statement.\n     #10 $tkg$exec("CokeMachine::billIn %m -value %b",BILLIN);\n     ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:233: Unsupported or unknown PLI call: $tkg$exec\n     #10 $tkg$exec("CokeMachine::billOut %m -value %b",BILLOUT);\n         ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:233: Unsupported: Ignoring delay on this delayed statement.\n     #10 $tkg$exec("CokeMachine::billOut %m -value %b",BILLOUT);\n     ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:235: Unsupported or unknown PLI call: $tkg$recv\n  always #10 EMPTY = $tkg$recv("%m.EMPTY");\n                     ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:235: Unsupported: Ignoring delay on this delayed statement.\n  always #10 EMPTY = $tkg$recv("%m.EMPTY");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:236: Unsupported or unknown PLI call: $tkg$recv\n  always #10 PRESS = $tkg$recv("%m.PRESS");\n                     ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:236: Unsupported: Ignoring delay on this delayed statement.\n  always #10 PRESS = $tkg$recv("%m.PRESS");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:237: Unsupported or unknown PLI call: $tkg$recv\n  always #10 INSQ = $tkg$recv("%m.INSQ");\n                    ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:237: Unsupported: Ignoring delay on this delayed statement.\n  always #10 INSQ = $tkg$recv("%m.INSQ");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:238: Unsupported or unknown PLI call: $tkg$recv\n  always #10 INSD = $tkg$recv("%m.INSD");\n                    ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:238: Unsupported: Ignoring delay on this delayed statement.\n  always #10 INSD = $tkg$recv("%m.INSD");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:239: Unsupported or unknown PLI call: $tkg$recv\n  always #10 INSN = $tkg$recv("%m.INSN");\n                    ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:239: Unsupported: Ignoring delay on this delayed statement.\n  always #10 INSN = $tkg$recv("%m.INSN");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:240: Unsupported or unknown PLI call: $tkg$recv\n  always #10 NUMQ = $tkg$recv("%m.NUMQ");\n                    ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:240: Unsupported: Ignoring delay on this delayed statement.\n  always #10 NUMQ = $tkg$recv("%m.NUMQ");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:241: Unsupported or unknown PLI call: $tkg$recv\n  always #10 NUMD = $tkg$recv("%m.NUMD");\n                    ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:241: Unsupported: Ignoring delay on this delayed statement.\n  always #10 NUMD = $tkg$recv("%m.NUMD");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:242: Unsupported or unknown PLI call: $tkg$recv\n  always #10 NUMN = $tkg$recv("%m.NUMN");\n                    ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:242: Unsupported: Ignoring delay on this delayed statement.\n  always #10 NUMN = $tkg$recv("%m.NUMN");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:243: Unsupported or unknown PLI call: $tkg$recv\n  always #10 BILLSNS = $tkg$recv("%m.BILLSNS");\n                       ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:243: Unsupported: Ignoring delay on this delayed statement.\n  always #10 BILLSNS = $tkg$recv("%m.BILLSNS");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:244: Unsupported or unknown PLI call: $tkg$recv\n  always #10 CNRET = $tkg$recv("%m.CNRET");\n                     ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:244: Unsupported: Ignoring delay on this delayed statement.\n  always #10 CNRET = $tkg$recv("%m.CNRET");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:245: Unsupported or unknown PLI call: $tkg$recv\n  always #10 BILLOK = $tkg$recv("%m.BILLOK");\n                      ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:245: Unsupported: Ignoring delay on this delayed statement.\n  always #10 BILLOK = $tkg$recv("%m.BILLOK");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:246: Unsupported or unknown PLI call: $tkg$recv\n  always #10 BILLNG = $tkg$recv("%m.BILLNG");\n                      ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:246: Unsupported: Ignoring delay on this delayed statement.\n  always #10 BILLNG = $tkg$recv("%m.BILLNG");\n         ^\n%Error: data/full_repos/permissive/205055389/vlib/coke.v:247: Unsupported or unknown PLI call: $tkg$recv\n  always #10 BILLACK = $tkg$recv("%m.BILLACK");\n                       ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/205055389/vlib/coke.v:247: Unsupported: Ignoring delay on this delayed statement.\n  always #10 BILLACK = $tkg$recv("%m.BILLACK");\n         ^\n%Error: Exiting due to 35 error(s), 35 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module cokemachine(DISP, ELIGHT, CHGCOM, CHGQ, CHGD, CHGN, NOCHG, BILLIN, BILLOUT, BILLLT, RETINS, INSACK, EMPTY, PRESS, INSQ, INSD, INSN, BILLSNS, BILLOK, BILLNG, COST,CNRET, BILLACK, DISPACK, CHGACK);

  input [5:0] DISP;
  input [5:0] ELIGHT;
  input CHGCOM;
  input CHGQ, CHGD, CHGN;
  input NOCHG;
  input BILLIN, BILLOUT;
  input BILLLT;
  input RETINS;
  input INSACK;
  input [7:0] COST;
  input _RESET;
  
  output [5:0] EMPTY, PRESS;
  output INSQ, INSD, INSN;
  output [2:0] NUMQ, NUMD, NUMN;
  output BILLSNS;
  output BILLOK, BILLNG;
  output CNRET;
  output BILLACK;
  output DISPACK;
  output CHGACK;

  reg [5:0] EMPTY, PRESS;
  reg INSQ, INSD, INSN;
  reg [2:0] NUMQ, NUMD, NUMN;
  reg BILLSNS;
  reg BILLOK, BILLNG;
  reg CNRET;
  reg BILLACK;
  reg DISPACK;
  reg CHGACK;
    
  initial
    begin
      CHGACK = 1'b0;
      DISPACK = 1'b0;
      $tkg$post("CokeMachine","%m");
      $tkg$exec("CokeMachine::setCost %m %d",COST);   
      $tkg$exec("CokeMachine::resetMachine %m %d",_RESET);   
    end




  always @ (ELIGHT)
    $tkg$exec("CokeMachine::setEmpty %m {%b %b %b %b %b %b}", ELIGHT[0],ELIGHT[1],ELIGHT[2],ELIGHT[3],ELIGHT[4],ELIGHT[5]);




  wire D0 = DISP[0];
  always @ (D0)
    if (D0 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 0");
        DISPACK = 1'b1;
      end
    else if (!D0)
      #10 DISPACK = 1'b0;

  wire D1 = DISP[1];
  always @ (D1)
    if (D1 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 1");
        DISPACK = 1'b1;
      end
    else if (!D1)
      #10 DISPACK = 1'b0;

  wire D2 = DISP[2];
  always @ (D2)
    if (D2 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 2");
        DISPACK = 1'b1;
      end
    else if (!D2)
      #10 DISPACK = 1'b0;

  wire D3 = DISP[3];
  always @ (D3)
    if (D3 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 3");
        DISPACK = 1'b1;
      end
    else if (!D3)
      #10 DISPACK = 1'b0;

  wire D4 = DISP[4];
  always @ (D4)
    if (D4 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 4");
        DISPACK = 1'b1;
      end
    else if (!D4)
      #10 DISPACK = 1'b0;

  wire D5 = DISP[5];
  always @ (D5)
    if (D5 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 5");
        DISPACK = 1'b1;
      end
    else if (!D5)
      #10 DISPACK = 1'b0;
  



  always @ (CHGQ) 
    if (CHGQ && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::ejectChange %m 25");
        CHGACK = 1'b1;
      end
    else if (!CHGQ)
    #10 CHGACK = 1'b0;

  always @ (CHGD) 
    if (CHGD && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::ejectChange %m 10");
        CHGACK = 1'b1;
      end
    else if (!CHGD)
      #10 CHGACK = 1'b0;

  always @ (CHGN) 
    if (CHGN && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::ejectChange %m 5");
        CHGACK = 1'b1;
      end
    else if (!CHGN)
      #10 CHGACK = 1'b0;

  always @ (CHGCOM) 
    if (CHGCOM && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::commitInserted %m");
        CHGACK = 1'b1;
      end
    else if (!CHGCOM)
      CHGACK = 1'b0;

  always @ (RETINS) 
    if (RETINS && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::returnInserted %m");
        CHGACK = 1'b1;
      end
    else if (!RETINS)
      CHGACK = 1'b0;




  always @ (INSACK) $tkg$exec("CokeMachine::insertAck %m -value %b",INSACK);   


  always @ (COST) $tkg$exec("CokeMachine::setCost %m %d",COST);   
  always @ (_RESET) $tkg$exec("CokeMachine::resetMachine %m %d",_RESET);   






  always @ (NOCHG) $tkg$send("%m.NOCHG",NOCHG);
  always @ (BILLLT) $tkg$send("%m.BILLLT",BILLLT);






  always @ (BILLIN)
     #10 $tkg$exec("CokeMachine::billIn %m -value %b",BILLIN);

  always @ (BILLOUT)
     #10 $tkg$exec("CokeMachine::billOut %m -value %b",BILLOUT);
  
  always #10 EMPTY = $tkg$recv("%m.EMPTY");
  always #10 PRESS = $tkg$recv("%m.PRESS");
  always #10 INSQ = $tkg$recv("%m.INSQ");
  always #10 INSD = $tkg$recv("%m.INSD");
  always #10 INSN = $tkg$recv("%m.INSN");
  always #10 NUMQ = $tkg$recv("%m.NUMQ");
  always #10 NUMD = $tkg$recv("%m.NUMD");
  always #10 NUMN = $tkg$recv("%m.NUMN");
  always #10 BILLSNS = $tkg$recv("%m.BILLSNS");
  always #10 CNRET = $tkg$recv("%m.CNRET");
  always #10 BILLOK = $tkg$recv("%m.BILLOK");
  always #10 BILLNG = $tkg$recv("%m.BILLNG");
  always #10 BILLACK = $tkg$recv("%m.BILLACK");

endmodule
module cokemachine(DISP, ELIGHT, CHGCOM, CHGQ, CHGD, CHGN, NOCHG, BILLIN, BILLOUT, BILLLT, RETINS, INSACK, EMPTY, PRESS, INSQ, INSD, INSN, BILLSNS, BILLOK, BILLNG, COST,CNRET, BILLACK, DISPACK, CHGACK);


  input [5:0] DISP;
  input [5:0] ELIGHT;
  input CHGCOM;
  input CHGQ, CHGD, CHGN;
  input NOCHG;
  input BILLIN, BILLOUT;
  input BILLLT;
  input RETINS;
  input INSACK;
  input [7:0] COST;
  input _RESET;
  
  output [5:0] EMPTY, PRESS;
  output INSQ, INSD, INSN;
  output [2:0] NUMQ, NUMD, NUMN;
  output BILLSNS;
  output BILLOK, BILLNG;
  output CNRET;
  output BILLACK;
  output DISPACK;
  output CHGACK;

  reg [5:0] EMPTY, PRESS;
  reg INSQ, INSD, INSN;
  reg [2:0] NUMQ, NUMD, NUMN;
  reg BILLSNS;
  reg BILLOK, BILLNG;
  reg CNRET;
  reg BILLACK;
  reg DISPACK;
  reg CHGACK;
    
  initial
    begin
      CHGACK = 1'b0;
      DISPACK = 1'b0;
      $tkg$post("CokeMachine","%m");
      $tkg$exec("CokeMachine::setCost %m %d",COST);   
      $tkg$exec("CokeMachine::resetMachine %m %d",_RESET);   
    end




  always @ (ELIGHT)
    $tkg$exec("CokeMachine::setEmpty %m {%b %b %b %b %b %b}", ELIGHT[0],ELIGHT[1],ELIGHT[2],ELIGHT[3],ELIGHT[4],ELIGHT[5]);




  wire D0 = DISP[0];
  always @ (D0)
    if (D0 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 0");
        DISPACK = 1'b1;
      end
    else if (!D0)
      #10 DISPACK = 1'b0;

  wire D1 = DISP[1];
  always @ (D1)
    if (D1 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 1");
        DISPACK = 1'b1;
      end
    else if (!D1)
      #10 DISPACK = 1'b0;

  wire D2 = DISP[2];
  always @ (D2)
    if (D2 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 2");
        DISPACK = 1'b1;
      end
    else if (!D2)
      #10 DISPACK = 1'b0;

  wire D3 = DISP[3];
  always @ (D3)
    if (D3 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 3");
        DISPACK = 1'b1;
      end
    else if (!D3)
      #10 DISPACK = 1'b0;

  wire D4 = DISP[4];
  always @ (D4)
    if (D4 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 4");
        DISPACK = 1'b1;
      end
    else if (!D4)
      #10 DISPACK = 1'b0;

  wire D5 = DISP[5];
  always @ (D5)
    if (D5 && !DISPACK)
      begin
        #10 $tkg$exec("CokeMachine::dispense %m 5");
        DISPACK = 1'b1;
      end
    else if (!D5)
      #10 DISPACK = 1'b0;
  



  always @ (CHGQ) 
    if (CHGQ && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::ejectChange %m 25");
        CHGACK = 1'b1;
      end
    else if (!CHGQ)
    #10 CHGACK = 1'b0;

  always @ (CHGD) 
    if (CHGD && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::ejectChange %m 10");
        CHGACK = 1'b1;
      end
    else if (!CHGD)
      #10 CHGACK = 1'b0;

  always @ (CHGN) 
    if (CHGN && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::ejectChange %m 5");
        CHGACK = 1'b1;
      end
    else if (!CHGN)
      #10 CHGACK = 1'b0;

  always @ (CHGCOM) 
    if (CHGCOM && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::commitInserted %m");
        CHGACK = 1'b1;
      end
    else if (!CHGCOM)
      CHGACK = 1'b0;

  always @ (RETINS) 
    if (RETINS && !CHGACK)
      begin
        #10 $tkg$exec("CokeMachine::returnInserted %m");
        CHGACK = 1'b1;
      end
    else if (!RETINS)
      CHGACK = 1'b0;




  always @ (INSACK) $tkg$exec("CokeMachine::insertAck %m -value %b",INSACK);   


  always @ (COST) $tkg$exec("CokeMachine::setCost %m %d",COST);   
  always @ (_RESET) $tkg$exec("CokeMachine::resetMachine %m %d",_RESET);   






  always @ (NOCHG) $tkg$send("%m.NOCHG",NOCHG);
  always @ (BILLLT) $tkg$send("%m.BILLLT",BILLLT);






  always @ (BILLIN)
     #10 $tkg$exec("CokeMachine::billIn %m -value %b",BILLIN);

  always @ (BILLOUT)
     #10 $tkg$exec("CokeMachine::billOut %m -value %b",BILLOUT);
  
  always #10 EMPTY = $tkg$recv("%m.EMPTY");
  always #10 PRESS = $tkg$recv("%m.PRESS");
  always #10 INSQ = $tkg$recv("%m.INSQ");
  always #10 INSD = $tkg$recv("%m.INSD");
  always #10 INSN = $tkg$recv("%m.INSN");
  always #10 NUMQ = $tkg$recv("%m.NUMQ");
  always #10 NUMD = $tkg$recv("%m.NUMD");
  always #10 NUMN = $tkg$recv("%m.NUMN");
  always #10 BILLSNS = $tkg$recv("%m.BILLSNS");
  always #10 CNRET = $tkg$recv("%m.CNRET");
  always #10 BILLOK = $tkg$recv("%m.BILLOK");
  always #10 BILLNG = $tkg$recv("%m.BILLNG");
  always #10 BILLACK = $tkg$recv("%m.BILLACK");

endmodule