Go to the documentation of this file.
29 #ifndef __DEV_8254_HH__
30 #define __DEV_8254_HH__
39 #include "debug/Intel8254Timer.hh"
115 void setTo(
int clocks);
175 void setRW(
int rw_val);
277 #endif // __DEV_8254_HH__
SubBitUnion(select, 3, 1) Bitfield< 3 > cnt2
void latchCount()
Latch the current count (if one is not already latched)
virtual ~Intel8254Timer()
uint8_t mode
Current mode of operation.
Programmable Interval Timer (Intel 8254)
void process()
Event process.
int currentCount()
Get the current count for this counter.
void startup()
Start ticking.
void writeCounter(unsigned int num, const uint8_t data)
Counter * counter
Pointer back to Counter.
const std::string & name() const
EndBitUnion(CtrlReg) BitUnion8(ReadBackCommandVal) Bitfield< 4 > status
BitUnion8(CtrlReg) Bitfield< 7
uint16_t initial_count
Initial count value.
std::array< Counter, 3 > counters
PIT has three seperate counters.
Intel8254Timer * parent
Pointer to container.
virtual const char * description() const
Event description.
void setMode(int mode_val)
Set operational mode.
uint64_t Tick
Tick count type.
EndSubBitUnion(select) EndBitUnion(ReadBackCommandVal) enum SelectVal
virtual void counterInterrupt(unsigned int num)
uint8_t readCounter(unsigned int num)
bool outputHigh(unsigned int num)
const std::string & name() const
void serialize(const std::string &base, CheckpointOut &cp) const
Serialize this object to the given output stream.
uint16_t latched_count
Latched count.
Event for counter interrupt.
uint8_t read()
Read a count byte.
Counter(Intel8254Timer *p, const std::string &name, unsigned int num)
bool output_high
Output goes high when the counter reaches zero.
void startup()
Start ticking.
unsigned int index() const
void unserialize(const std::string &base, CheckpointIn &cp)
Reconstruct the state of this object from a checkpoint.
void setRW(int rw_val)
Set the read/write mode.
Intel8254Timer(EventManager *em, const std::string &name)
void serialize(const std::string &base, CheckpointOut &cp) const
Serialize this object to the given output stream.
bool latch_on
State of the count latch.
std::ostream CheckpointOut
uint8_t read_byte
Determine which byte of a 16-bit count value to read/write.
bool outputHigh()
Is the output high?
void unserialize(const std::string &base, CheckpointIn &cp)
Reconstruct the state of this object from a checkpoint.
uint16_t period
Interrupt period.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void writeControl(const CtrlReg data)
Write control word.
void setBCD(int bcd_val)
Set count encoding.
void write(const uint8_t data)
Write a count byte.
Tick offset
When to start ticking.
bool running
True after startup is called.
Generated on Sun Jul 30 2023 01:56:55 for gem5 by doxygen 1.8.17