29#ifndef __DEV_X86_CMOS_HH__
30#define __DEV_X86_CMOS_HH__
36#include "params/Cmos.hh"
72 for (
int i = 0;
i < int_pin_count;
i++) {
85 rtc(this,
name() +
".rtc",
p.time, true, 5000000000ULL,
86 p.port_int_pin_connection_count)
95 if (if_name ==
"int_pin")
uint64_t frequency() const
Real-Time Clock (MC146818)
virtual std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Ports are used to interface objects to each other.
X86RTC(EventManager *em, const std::string &n, const struct tm time, bool bcd, Tick frequency, int int_pin_count)
std::vector< IntSourcePin< X86RTC > * > intPin
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void startup() override
startup() is the final initialization call before simulation.
gem5::X86ISA::Cmos::X86RTC rtc
void unserialize(CheckpointIn &cp) override
Unserialize an object.
BitUnion8(CmosAddress) Bitfield< 6
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void writeRegister(uint8_t reg, uint8_t val)
uint8_t readRegister(uint8_t reg)
void serialize(CheckpointOut &cp) const override
Serialize an object.
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
std::ostream CheckpointOut
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
std::string csprintf(const char *format, const Args &...args)