Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Member Functions | Public Attributes | List of all members
GPCounter Class Reference

This class implements an internal counter of a gptimer. More...

#include <gpcounter.h>

Inheritance diagram for GPCounter:
Collaboration diagram for GPCounter:

Public Member Functions

 GC_HAS_CALLBACKS ()
 
 SC_HAS_PROCESS (GPCounter)
 
 GPCounter (GPTimer *_parent, unsigned int nr, ModuleName name)
 Creates a new Counter instance. Only usfull if its called from inside of a GPTimer instance. More...
 
 ~GPCounter ()
 Destroies a Counter instance. More...
 
void end_of_elaboration ()
 Execute the callback registering when systemc reaches the end of elaboration. More...
 
void end_of_simulation ()
 Execute the callback registering when systemc reaches the end of simulation. More...
 
void ctrl_read ()
 
void ctrl_write ()
 
void value_read ()
 
void value_write ()
 
void do_reset ()
 Performs the reset code for the Counter. This function is executed by the Timer::do_reset() function. More...
 
void chaining ()
 This function prepares the Counter for chaining. More...
 
sc_core::sc_time nextzero ()
 
sc_core::sc_time cycletime ()
 
void calculate ()
 Function calculating the waiting time for the next timer event. More...
 
void start ()
 Start a Counter from dhalt or to enable it etc. More...
 
void stop ()
 Stop a Counter from dhalt or to enable it etc. More...
 
void ticking ()
 

Public Attributes

GPTimerp
 A pointer to the parent GPTimer. This is needed to acces common functions and register. More...
 
bool m_pirq
 The interrupt state of the counter. Might be get deprecated. More...
 
sc_core::sc_time lasttime
 
unsigned int lastvalue
 
sc_core::sc_event e_wait
 
unsigned int nr
 
bool stopped
 Stores wether a timer is stoped or not. More...
 
bool chain_run
 Stores wether a timer is running in chain mode or not. More...
 

Detailed Description

This class implements an internal counter of a gptimer.

Member Function Documentation

GPCounter::GC_HAS_CALLBACKS ( )
GPCounter::SC_HAS_PROCESS ( GPCounter  )

Member Data Documentation

bool GPCounter::chain_run

Stores wether a timer is running in chain mode or not.

Referenced by chaining(), ctrl_write(), do_reset(), and start().

sc_core::sc_event GPCounter::e_wait

The event which implements the corefunctionality. It gets set by calculate() and ticking() is waiting with it.

See Also
calculate()
ticking()

Referenced by calculate(), stop(), and ticking().

sc_core::sc_time GPCounter::lasttime

The Time when lastvalue was set.

See Also
lastvalue

Referenced by do_reset(), start(), stop(), value_read(), and value_write().

unsigned int GPCounter::lastvalue

A defined value to calculate the value of the value register. It gets set whether a write of the value register happens or stop() gets executet

See Also
lasttime
stop()

Referenced by do_reset(), stop(), value_read(), and value_write().

bool GPCounter::m_pirq

The interrupt state of the counter. Might be get deprecated.

Referenced by ctrl_read(), ctrl_write(), and ticking().

unsigned int GPCounter::nr

The number of the counter. This variable is needed to calculate the right delay slot and to find the corresponding registers.

Referenced by calculate(), chaining(), ctrl_read(), ctrl_write(), cycletime(), do_reset(), nextzero(), start(), stop(), ticking(), value_read(), and value_write().

GPTimer* GPCounter::p

A pointer to the parent GPTimer. This is needed to acces common functions and register.

Referenced by calculate(), ctrl_read(), ctrl_write(), cycletime(), do_reset(), nextzero(), start(), stop(), ticking(), value_read(), and value_write().

bool GPCounter::stopped

Stores wether a timer is stoped or not.

Referenced by ctrl_write(), do_reset(), start(), stop(), value_read(), and value_write().


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