32#include "debug/LupioTTY.hh"
35#include "params/LupioTTY.hh"
37#define LUPIO_TTY_INVAL 0x80000000
40#define LUPIO_TTY_WBIT (1 << 0)
41#define LUPIO_TTY_RBIT (1 << 1)
79 fprintf(stderr,
"Dropping characters\n");
130 panic(
"Unexpected read to the LupioTTY device at address %d!",
141 uint32_t
val = val64;
160 panic(
"Unexpected write to the LupioTTY device at address %d!",
172 "Read request - addr: %#x, size: %#x\n", tty_addr, pkt->
getSize());
187 "Write request - addr: %#x pktAddr: %#x value: %c\n", tty_addr,
Addr pioAddr
Address that the device listens to.
BasicPioDevice(const Params &p, Addr size)
Tick pioDelay
Delay that the device experinces on an access.
Tick read(PacketPtr pkt) override
Implement BasicPioDevice virtual functions.
LupioTTY(const Params &p)
uint64_t lupioTTYRead(const uint8_t addr)
void dataAvailable()
Inform the LupIO-TTY there is data available.
const ByteOrder byteOrder
void lupioTTYWrite(const uint8_t addr, uint64_t c)
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void lupioTTYUpdateIRQ()
IRQ management.
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
#define panic(...)
This implements a cprintf based panic() function.
#define gem5_assert(cond,...)
The assert macro will function like a normal assert, but will use panic instead of straight abort().
const Params & params() const
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.