Go to the documentation of this file.
44 I8237::Register::ReadFunc
45 readUnimpl(
const std::string &label)
48 panic(
"Read from i8237 %s unimplemented.", label);
52 I8237::Register::WriteFunc
53 writeUnimpl(
const std::string &label)
56 panic(
"Write to i8237 %s unimplemented.", label);
65 reader(readUnimpl(
name()));
80 panic(
"Illegal read from i8237 register %d.",
offset);
86 statusCommandReg(
"status/command"),
87 requestReg(
"request", 0x9),
88 setMaskBitReg(
"set mask bit", 0xa),
90 clearFlipFlopReg(
"clear flip-flop", 0xc),
91 temporaryMasterClearReg(
"temporary/maskter clear"),
92 clearMaskReg(
"clear mask", 0
xe),
93 writeMaskReg(
"write mask", 0xf)
96 for (
auto &channel: channels)
97 regs.addRegisters({ channel.addrReg, channel.remainingReg });
102 reader(readUnimpl(
"status register")).
103 writer(writeUnimpl(
"command register")),
106 writer(writeUnimpl(
"request register")),
112 writer(writeUnimpl(
"mode register")),
115 writer(writeUnimpl(
"clear LSB/MSB flip-flop register")),
117 temporaryMasterClearReg.
118 reader(readUnimpl(
"temporary register")).
119 writer(writeUnimpl(
"master clear register")),
122 writer(writeUnimpl(
"clear mask register")),
125 writer(writeUnimpl(
"write all mask register bits"))
132 uint8_t select =
bits(command, 1, 0);
133 uint8_t bitVal =
bits(command, 2);
135 panic(
"Turning on i8237 channels unimplemented.");
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Addr pioAddr
Address that the device listens to.
#define UNSERIALIZE_SCALAR(scalar)
constexpr void replaceBits(T &val, unsigned first, unsigned last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
void serialize(CheckpointOut &cp) const override
Serialize an object.
virtual void write(Addr addr, const void *buf, Addr bytes)
WriteOnlyReg(const std::string &new_name, Addr offset)
std::string csprintf(const char *format, const Args &...args)
void makeAtomicResponse()
std::array< Channel, 4 > channels
virtual const std::string & name() const
virtual std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint64_t Tick
Tick count type.
ChannelAddrReg(Channel &)
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
ChannelRemainingReg(Channel &)
#define SERIALIZE_SCALAR(scalar)
virtual void read(Addr addr, void *buf, Addr bytes)
constexpr This & reader(const ReadFunc &new_reader)
std::ostream CheckpointOut
RegisterBankLE::Register8 Register
void setMaskBit(Register ®, const uint8_t &command)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
constexpr This & writer(const WriteFunc &new_writer)
#define panic(...)
This implements a cprintf based panic() function.
T * getPtr()
get a pointer to the data ptr.
Generated on Wed May 4 2022 12:13:58 for gem5 by doxygen 1.8.17