Hi,

I just had a quick look at the PL050 documentation and the code. I think you 
might be correct in that the register shouldn’t be reset to zero after reading 
the last byte in a transmission. The gem5 implementation of the PL050 is 
somewhat simplified since it doesn’t implement any timing on the receive end — 
the next byte will be available immediately after reading the KMIDATA register. 
A real device would update this register whenever a new byte is received on the 
serial line.

Is this causing any issues for you?

I had a look at the PL011 issue you raised as well. The manual specifies the 
UARTFR reset value as 0bX10010XXX (0x90 assuming X is zero). This’d imply that 
the TX and RX FIFOs are empty and all the other bits are defined from the input 
lines to the UART.

The the reset value in gem5 should be 0x91 (RX and TX FIFOs empty, CTS 
asserted). If you’re seeing 0x81, it is probably because you have data pending 
from the simulated terminal.

//Andreas

On 01/08/2015 04:20, "Tingting Yu" 
<[email protected]<mailto:[email protected]>> wrote:

I am not sure I am at the right place to post messages. But I have question 
about  kmi.cc<http://kmi.cc/>:

case kmiData:
        if (rxQueue.empty()) {
            data = 0;
        } else {
            data = rxQueue.front();
            rxQueue.pop_front();
       }

When the receive queue is empty, Why is the KMIDATA register reset to 0?

The documentation for the PL050 at
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0143c/i1014040.html

just says that when KMIDATA is read you get the value in the
receive data register. The implication is that if you read
it multiple times you'll just continue to read the same
value?

My second question is, in pl011.cc<http://pl011.cc/>:

 case UART_FR:
        data =
            UART_FR_CTS | // Clear To Send
            (!term->dataAvailable() ? UART_FR_RXFE : 0) | // RX FIFO Empty
            UART_FR_TXFE; // TX FIFO empty

The initial value of UART_FR is 0x81.

Thanks.

-Tingting

-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No: 2548782
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to