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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [testbench/] [kbdtest.c] - Diff between revs 970 and 971

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 970 Rev 971
Line 16... Line 16...
#define __LINE__  0
#define __LINE__  0
#endif
#endif
 
 
#if !INTERACTIVE
#if !INTERACTIVE
static const unsigned char incoming_scan[] = {
static const unsigned char incoming_scan[] = {
  0x2a, 0x14, 0x94, 0xaa, 0x12, 0x92, 0x1f, 0x9f, 0x14, 0x94, 0x02, 0x82, 0x03, 0x83, 0x04, 0x84,
  0x2a, 0x14, 0x94, 0xaa, 0x12, 0x92, 0x04, 0x84, 0x2a, 0x0d,
  0x2a, 0x0d, 0x8d, 0xaa, 0x0b, 0x8b, 0x0d, 0x8d, 0x0c, 0x8c, 0x2a, 0x33, 0xb3, 0xaa, 0x35, 0xb5,
  0x8d, 0xaa, 0x0d, 0x8d, 0x0c, 0x8c, 0x2a, 0x33, 0xb3, 0xaa,
  0x33, 0xb3, 0x2a, 0x34, 0xb4, 0xaa, 0x34, 0xb4, 0x2b, 0xab, 0x2a, 0x2b, 0xab, 0xaa, 0x2a, 0x28,
  0x35, 0xb5, 0x34, 0xb4, 0x2b, 0xab, 0x2a, 0x2b, 0xab, 0xaa,
  0xa8, 0xaa, 0x28, 0xa8, 0x29, 0xa9, 0x2a, 0x1b, 0x9b, 0xaa, 0x2a, 0x1a, 0x9a, 0xaa, 0x1a, 0x9a,
  0x2a, 0x28, 0xa8, 0xaa, 0x28, 0xa8, 0x29, 0xa9, 0x2a, 0x1b,
  0x1b, 0x9b, 0x0f, 0x8f, 0x39, 0xb9, 0x1c, 0x9c, 0x2a, 0x02, 0x82, 0xaa, 0x2a, 0x03, 0x83, 0xaa,
  0x9b, 0xaa, 0x1b, 0x9b, 0x0f, 0x8f, 0x39, 0xb9, 0x2a, 0x02,
  0x2a, 0x04, 0x84, 0xaa, 0x2a, 0x05, 0x85, 0xaa, 0x2a, 0x06, 0x86, 0xaa, 0x2a, 0x07, 0x87, 0xaa,
  0x82, 0xaa, 0x2a, 0x06, 0x86, 0xaa, 0x2a, 0x07, 0x87, 0xaa,
  0x2a, 0x08, 0x88, 0xaa, 0x2a, 0x09, 0x89, 0xaa, 0x2a, 0x0a, 0x8a, 0xaa, 0x2a, 0x0b, 0x8b, 0xaa,
  0x2a, 0x08, 0x88, 0xaa, 0x2a, 0x0b, 0x8b, 0xaa, 0x2a, 0x09,
  0x1c, 0x9c, 0x2a, 0x09, 0x89, 0xaa, 0x1c, 0x9c, 0x39, 0xb9, 0x00};
  0x89, 0xaa, 0x1c, 0x9c, 0x39, 0xb9, 0x00};
static int current_scan = 0;
static int current_scan = 0;
#endif
#endif
 
 
static volatile int done;
static volatile int done;
 
 
Line 60... Line 60...
    if (x) printf ("0x%02x, ", x);
    if (x) printf ("0x%02x, ", x);
    report(x);
    report(x);
    if (x == 1) done = 1;
    if (x == 1) done = 1;
#if !INTERACTIVE
#if !INTERACTIVE
    printf ("expecting (0x%02x), ", incoming_scan[current_scan]);
    printf ("expecting (0x%02x), ", incoming_scan[current_scan]);
 
    if (x) {
    ASSERT (incoming_scan[current_scan++] == x);
    ASSERT (incoming_scan[current_scan++] == x);
    if (x == 0) done = 1;
    }
 
    if ((current_scan + 1) >= sizeof (incoming_scan) / sizeof (char)) done = 1;
#endif
#endif
  } while (x);
  } while (x);
  printf ("%i", done);
  printf ("%i", done);
  mtspr(SPR_PICSR, 0);
  mtspr(SPR_PICSR, 0);
}
}

powered by: WebSVN 2.1.0

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