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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [testbench/] [acv_uart.c] - Diff between revs 380 and 381

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

Rev 380 Rev 381
Line 81... Line 81...
    ASSERT(getreg (UART_IER) == 0x00); //1
    ASSERT(getreg (UART_IER) == 0x00); //1
    ASSERT(getreg (UART_IIR) == 0xc1); //2
    ASSERT(getreg (UART_IIR) == 0xc1); //2
    ASSERT(getreg (UART_LCR) == 0x03); //3
    ASSERT(getreg (UART_LCR) == 0x03); //3
    ASSERT(getreg (UART_MCR) == 0x00); //4
    ASSERT(getreg (UART_MCR) == 0x00); //4
//    ASSERT(getreg (UART_LSR) == 0x60); //5
//    ASSERT(getreg (UART_LSR) == 0x60); //5
//    ASSERT(getreg (UART_MSR) == 0xff); //6
//    ASSERT(getreg (UART_MSR) == 0x00); //6
    ASSERT(getreg (UART_MSR) == 0x00); //6
 
 
 
    setreg(UART_LCR, LCR_DIVL); //enable latches
    setreg(UART_LCR, LCR_DIVL); //enable latches
    ASSERT(getreg (UART_DLL) == 0x00); //0
    ASSERT(getreg (UART_DLL) == 0x00); //0
    ASSERT(getreg (UART_DLH) == 0x00); //1
    ASSERT(getreg (UART_DLH) == 0x00); //1
    setreg(UART_LCR, 0x00); //disable latches
    setreg(UART_LCR, 0x00); //disable latches
  }
  }
 
 
  { /* test if status registers are read only */
  { /* test if status registers are read only */
    unsigned long tmp;
    /*unsigned long tmp;
    int i;
    int i;
    tmp = getreg (UART_LSR);
    tmp = getreg (UART_LSR);
    setreg (UART_LSR, ~tmp);
    setreg (UART_LSR, ~tmp);
    ASSERT(getreg (UART_LSR) == tmp);
    ASSERT(getreg (UART_LSR) == tmp);
 
 
    for (i = 0; i < 9; i++) {
 
      setreg (UART_LSR, 1 << i);
 
      ASSERT(getreg (UART_LSR) == tmp);
 
    }
 
 
 
 
    for (i = 0; i < 9; i++) {
 
      setreg (UART_LSR, 1 << i);
 
      ASSERT(getreg (UART_LSR) == tmp);
 
    }
 
    */
    /*tmp = getreg (UART_MSR);
    /*tmp = getreg (UART_MSR);
    setreg (UART_MSR, ~tmp);
    setreg (UART_MSR, ~tmp);
    ASSERT(getreg (UART_MSR) == tmp);
    ASSERT(getreg (UART_MSR) == tmp);
 
 
    for (i = 0; i < 9; i++) {
    for (i = 0; i < 9; i++) {

powered by: WebSVN 2.1.0

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