OpenCores
URL https://opencores.org/ocsvn/scan_based_serial_communication/scan_based_serial_communication/trunk

Subversion Repositories scan_based_serial_communication

[/] [scan_based_serial_communication/] [trunk/] [scan_testbench.perl.v] - Diff between revs 9 and 11

Show entire file | Details | Blame | View Log

Rev 9 Rev 11
Line 197... Line 197...
 
 
      rotate_chain();
      rotate_chain();
      load_chip();
      load_chip();
 
 
      // Make sure reset worked
      // Make sure reset worked
      if (chip_internal_write_data_array !== 0)
      if (chip_internal_write_data_1 !== 1'd0 ||
 
          chip_internal_write_data_2 !== 2'd3 ||
 
          chip_internal_write_data_3 !== 3'd0 ||
 
          chip_internal_write_data_array !== 16'hAA55
 
          ) begin
        $display("RESET TEST FAILED");
        $display("RESET TEST FAILED");
      else
         $finish;
 
      end else begin
        $display("RESET TEST PASSED");
        $display("RESET TEST PASSED");
 
      end
 
 
      // Write each variable
      // Write each variable
      scan_reset = 1'b0;
      scan_reset = 1'b0;
 
 
      write_data_1 = 1'd1;
      write_data_1 = 1'd1;
      write_data_2 = 2'd2;
      write_data_2 = 2'd2;
      write_data_3 = 3'd3;
      write_data_3 = 3'd3;
 
 
      write_data_array_addr = 2'd2;
      write_data_array_addr = 2'd2;
      write_data_array_data = 4'hA;
      write_data_array_data = 4'hB;
 
 
      rotate_chain();
      rotate_chain();
      load_chip();
      load_chip();
 
 
      // Check that the chip sees the new variables
      // Check that the chip sees the new variables
      if (chip_internal_write_data_1     !== 1'd1 ||
      if (chip_internal_write_data_1     !== 1'd1 ||
          chip_internal_write_data_2     !== 2'd2 ||
          chip_internal_write_data_2     !== 2'd2 ||
          chip_internal_write_data_3     !== 3'd3 ||
          chip_internal_write_data_3     !== 3'd3 ||
          chip_internal_write_data_array !== 15'h0A00) begin
          chip_internal_write_data_array !== 16'hAB55) begin
         $display("TEST 1 FAILED");
         $display("TEST 1 FAILED");
         $display("%d %d %d %h",
         $display("%d %d %d %h",
                  chip_internal_write_data_1,
                  chip_internal_write_data_1,
                  chip_internal_write_data_2,
                  chip_internal_write_data_2,
                  chip_internal_write_data_3,
                  chip_internal_write_data_3,
                  chip_internal_write_data_array);
                  chip_internal_write_data_array);
 
         $finish;
      end else
      end else
        $display("TEST 1 PASSED");
        $display("TEST 1 PASSED");
 
 
      // Set internal values to read out      
      // Set internal values to read out      
      chip_internal_read_data_1 = 1'd0;  // As if the chip had this value internally
      chip_internal_read_data_1 = 1'd0;  // As if the chip had this value internally
Line 260... Line 267...
                  write_data_3_read,
                  write_data_3_read,
                  read_data_1_read,
                  read_data_1_read,
                  read_data_2_read,
                  read_data_2_read,
                  read_data_3_read,
                  read_data_3_read,
                  read_data_array_data_read);
                  read_data_array_data_read);
 
         $finish;
      end else
      end else
        $display("TEST 2 PASSED");
        $display("TEST 2 PASSED");
 
 
      $finish;
      $finish;
   end
   end

powered by: WebSVN 2.1.0

© copyright 1999-2019 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.