module tb;
   reg clock = 1;
   always #5 clock = !clock;

   //reg [7:0] io_in;
   reg [1:0] cmd;
   reg [3:0] cmdarg;

   wire [7:0] io_out;
   wire [7:0] io_in = {cmdarg, 1'b0, cmd, clock};
   user_module_341193419111006803 pdp0001(io_in, io_out);

   initial begin
      $monitor("%05d  pc %d acc %d", $time, pdp0001.pc, pdp0001.acc);
      cmd = `Reset; cmdarg = 0;
      @(negedge clock)
      cmd = `LoadCode;

      cmdarg = `Load; @(negedge clock)
      cmdarg = `Store; @(negedge clock)

      cmdarg = `Add; @(negedge clock)
      cmdarg = `Store; @(negedge clock)

      cmdarg = `Load; @(negedge clock)
      cmdarg = `Store; @(negedge clock)

      cmdarg = `Add; @(negedge clock)
      cmdarg = `Bz; @(negedge clock)

      cmd = `LoadData;

      cmdarg = 1; @(negedge clock)
      cmdarg = 4; @(negedge clock)

      cmdarg = 1; @(negedge clock)
      cmdarg = 0; @(negedge clock)

      cmdarg = 9; @(negedge clock)
      cmdarg = 2; @(negedge clock)

      cmdarg = 8; @(negedge clock)
      cmdarg = 7; @(negedge clock)

      cmd = `Reset; cmdarg = 0;

      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;
      @(negedge clock) cmd = `Run;

      #100 $display("The End");
      $finish;
   end
endmodule