gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Intel8254Timer Class Reference

Programmable Interval Timer (Intel 8254) More...

#include <intel_8254_timer.hh>

Inheritance diagram for Intel8254Timer:
EventManager X86ISA::I8254::X86Intel8254Timer

Classes

class  Counter
 Counter element for PIT. More...
 

Public Member Functions

virtual ~Intel8254Timer ()
 
 Intel8254Timer (EventManager *em, const std::string &name, Counter *counter0, Counter *counter1, Counter *counter2)
 
 Intel8254Timer (EventManager *em, const std::string &name)
 
void writeControl (const CtrlReg data)
 Write control word. More...
 
uint8_t readCounter (unsigned int num)
 
void writeCounter (unsigned int num, const uint8_t data)
 
bool outputHigh (unsigned int num)
 
void serialize (const std::string &base, CheckpointOut &cp) const
 Serialize this object to the given output stream. More...
 
void unserialize (const std::string &base, CheckpointIn &cp)
 Reconstruct the state of this object from a checkpoint. More...
 
void startup ()
 Start ticking. More...
 
- Public Member Functions inherited from EventManager
 EventManager (EventManager &em)
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick)-1)
 
void setCurTick (Tick newVal)
 

Protected Types

enum  ReadWriteVal { LatchCommand, LsbOnly, MsbOnly, TwoPhase }
 
enum  ModeVal {
  InitTc, OneShot, RateGen, SquareWave,
  SoftwareStrobe, HardwareStrobe
}
 

Protected Member Functions

 BitUnion8 (CtrlReg) Bitfield<7
 
 EndBitUnion (CtrlReg) enum SelectVal
 
const std::string & name () const
 
virtual void counterInterrupt (unsigned int num)
 

Protected Attributes

 sel
 
Bitfield< 5, 4 > rw
 
Bitfield< 3, 1 > mode
 
Bitfield< 0 > bcd
 
std::string _name
 
Countercounter [3]
 PIT has three seperate counters. More...
 
- Protected Attributes inherited from EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Detailed Description

Programmable Interval Timer (Intel 8254)

Definition at line 47 of file intel_8254_timer.hh.

Member Enumeration Documentation

enum Intel8254Timer::ModeVal
protected
Enumerator
InitTc 
OneShot 
RateGen 
SquareWave 
SoftwareStrobe 
HardwareStrobe 

Definition at line 71 of file intel_8254_timer.hh.

Enumerator
LatchCommand 
LsbOnly 
MsbOnly 
TwoPhase 

Definition at line 64 of file intel_8254_timer.hh.

Constructor & Destructor Documentation

virtual Intel8254Timer::~Intel8254Timer ( )
inlinevirtual

Definition at line 212 of file intel_8254_timer.hh.

Intel8254Timer::Intel8254Timer ( EventManager em,
const std::string &  name,
Counter counter0,
Counter counter1,
Counter counter2 
)
Intel8254Timer::Intel8254Timer ( EventManager em,
const std::string &  name 
)

Member Function Documentation

Intel8254Timer::BitUnion8 ( CtrlReg  )
protected
virtual void Intel8254Timer::counterInterrupt ( unsigned int  num)
inlineprotectedvirtual

Reimplemented in X86ISA::I8254::X86Intel8254Timer.

Definition at line 204 of file intel_8254_timer.hh.

References DPRINTF.

Referenced by Intel8254Timer::Counter::CounterEvent::process().

Intel8254Timer::EndBitUnion ( CtrlReg  )
inlineprotected

Definition at line 55 of file intel_8254_timer.hh.

const std::string& Intel8254Timer::name ( ) const
inlineprotected

Definition at line 198 of file intel_8254_timer.hh.

References _name.

bool Intel8254Timer::outputHigh ( unsigned int  num)
inline
uint8_t Intel8254Timer::readCounter ( unsigned int  num)
inline

Definition at line 224 of file intel_8254_timer.hh.

References counter, and Intel8254Timer::Counter::read().

Referenced by TsunamiIO::read(), and X86ISA::I8254::readCounter().

void Intel8254Timer::serialize ( const std::string &  base,
CheckpointOut cp 
) const

Serialize this object to the given output stream.

Parameters
baseThe base name of the counter object.
osThe stream to serialize to.

Definition at line 75 of file intel_8254_timer.cc.

References counter, and Intel8254Timer::Counter::serialize().

Referenced by MaltaIO::serialize(), and TsunamiIO::serialize().

void Intel8254Timer::startup ( )

Start ticking.

Definition at line 93 of file intel_8254_timer.cc.

References counter, and Intel8254Timer::Counter::startup().

Referenced by MaltaIO::startup(), and TsunamiIO::startup().

void Intel8254Timer::unserialize ( const std::string &  base,
CheckpointIn cp 
)

Reconstruct the state of this object from a checkpoint.

Parameters
baseThe base name of the counter object.
cpThe checkpoint use.
sectionThe section name of this object

Definition at line 84 of file intel_8254_timer.cc.

References counter, and Intel8254Timer::Counter::unserialize().

Referenced by MaltaIO::unserialize(), and TsunamiIO::unserialize().

void Intel8254Timer::writeControl ( const CtrlReg  data)
void Intel8254Timer::writeCounter ( unsigned int  num,
const uint8_t  data 
)
inline

Definition at line 231 of file intel_8254_timer.hh.

References counter, and Intel8254Timer::Counter::write().

Referenced by TsunamiIO::write(), and X86ISA::I8254::writeCounter().

Member Data Documentation

std::string Intel8254Timer::_name
protected

Definition at line 197 of file intel_8254_timer.hh.

Referenced by name().

Bitfield<0> Intel8254Timer::bcd
protected

Definition at line 54 of file intel_8254_timer.hh.

Counter* Intel8254Timer::counter[3]
protected
Bitfield<3, 1> Intel8254Timer::mode
protected
Bitfield<5, 4> Intel8254Timer::rw
protected

Definition at line 52 of file intel_8254_timer.hh.

Intel8254Timer::sel
protected

Definition at line 51 of file intel_8254_timer.hh.

Referenced by writeControl().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:13 for gem5 by doxygen 1.8.6