Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Irqmp Class Reference

#include <irqmp.h>

Inheritance diagram for Irqmp:
Collaboration diagram for Irqmp:

Public Member Functions

 SC_HAS_PROCESS (Irqmp)
 
 SR_HAS_SIGNALS (Irqmp)
 
 GC_HAS_CALLBACKS ()
 
 Irqmp (sc_module_name name, int32_t paddr=0, int32_t pmask=0xFFF, int32_t ncpu=2, int32_t eirq=1, uint32_t pindex=0, bool powmon=false)
 Constructor. More...
 
 ~Irqmp ()
 
void init_generics ()
 
void init_registers ()
 
void start_of_simulation ()
 Automatically called at start of simulation. More...
 
void end_of_elaboration ()
 SystemC end of elaboration implementation. More...
 
void end_of_simulation ()
 SystemC end of simulation. More...
 
void power_model ()
 Calculate power/energy values from normalized input data. More...
 
gs::cnf::callback_return_type sta_power_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason)
 Static power callback. More...
 
gs::cnf::callback_return_type int_power_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason)
 Dynamic/Internal power callback. More...
 
void launch_irq ()
 
void clear_write ()
 
void force_write ()
 
void mpstat_read ()
 Prepare reading of the MP status register. More...
 
void mpstat_write ()
 Write to MP status register. More...
 
void pending_write ()
 
void dorst ()
 
void incomming_irq (const std::pair< uint32_t, bool > &value, const sc_time &time)
 
void acknowledged_irq (const uint32_t &irq, const uint32_t &cpu, const sc_time &time)
 
- Public Member Functions inherited from APBSlave
 APBSlave (ModuleName mn, uint32_t bus_id, uint8_t vendorid, uint16_t deviceid, uint8_t version, uint8_t irq, AMBADeviceType type, uint16_t mask, bool cacheable, bool prefetchable, uint16_t address)
 
 APBSlave (ModuleName mn)
 
 ~APBSlave ()
 
- Public Member Functions inherited from APBDevice< BaseModule< DefaultBase > >
 APBDevice (ModuleName mn, uint32_t bus_id, uint8_t vendorid, uint16_t deviceid, uint8_t version, uint8_t irq, AMBADeviceType type, uint16_t mask, bool cacheable, bool prefetchable, uint16_t address)
 
 APBDevice (ModuleName mn)
 
void init_apb (uint32_t pindex, uint8_t vendorid, uint16_t deviceid, uint8_t version, uint8_t irq, AMBADeviceType type, uint16_t mask, bool cacheable, bool prefetchable, uint16_t address)
 
void init_apb_generics ()
 Initialize the APBDevice generics. More...
 
virtual ~APBDevice ()
 Empty destructor. More...
 
virtual uint16_t get_apb_device_id () const
 Returns the device id. More...
 
virtual uint8_t get_apb_vendor_id () const
 Returns the vendor id. More...
 
virtual const uint32_tget_apb_device_info ()
 
virtual const AMBADeviceType get_apb_type () const
 
virtual uint32_t get_apb_base () const
 
virtual uint32_t get_apb_mask () const
 
virtual sc_dt::uint64 get_apb_base_addr ()
 
virtual uint32_t get_apb_base_addr_ () const
 
virtual sc_dt::uint64 get_apb_size ()
 
virtual uint32_t get_apb_size_ () const
 
virtual uint32_t get_apb_relative_addr (uint32_t addr) const
 
virtual uint32_t get_apb_pindex () const
 Returns the bus id of the module (pindex) More...
 
virtual void print_apb_device_info (char *name) const
 Prints the device info of the device. More...
 
- Public Member Functions inherited from BaseModule< DefaultBase >
 BaseModule (ModuleName mn)
 
virtual ~BaseModule ()
 
virtual void init_counters ()
 
virtual void init_power ()
 
- Public Member Functions inherited from APBDeviceBase
virtual ~APBDeviceBase ()
 Empty destructor. More...
 
- Public Member Functions inherited from CLKDevice
 SR_HAS_SIGNALS (CLKDevice)
 
 CLKDevice ()
 
virtual ~CLKDevice ()
 
virtual void onrst (const bool &value, const sc_core::sc_time &time)
 
virtual void onclk (const sc_core::sc_time &value, const sc_core::sc_time &time)
 
void set_clk (sc_core::sc_clock &clk)
 
void set_clk (sc_core::sc_time period)
 
void set_clk (double period, sc_core::sc_time_unit base)
 
virtual void clkcng ()
 

Static Public Member Functions

static const uint32_t PROC_IR_MASK (int CPU_INDEX)
 
static const uint32_t PROC_IR_FORCE (int CPU_INDEX)
 
static const uint32_t PROC_EXTIR_ID (int CPU_INDEX)
 

Public Attributes

signal< bool >::selector cpu_rst
 CPU reset out signals. More...
 
signal< bool >::infield cpu_stat
 CPU reset out signals. More...
 
signal< std::pair< uint32_t,
bool > >::selector 
irq_req
 IRQ Request out signals. More...
 
signal< uint32_t >::infield irq_ack
 IRQ Acknowledge input signals. More...
 
signal< std::pair< uint32_t,
bool > >::in 
irq_in
 IRQ input signals from other devices. More...
 
sc_event e_signal
 Internal signal to decouple inputs and outputs. Furthermore it addes the needed delays. More...
 
sr_param< intg_ncpu
 
sr_param< uint32_tg_eirq
 
sr_param< doublesta_power_norm
 Normalized static power of controller. More...
 
sr_param< doubleint_power_norm
 Normalized dynamic power of controller. More...
 
sr_param< doublesta_power
 Controller static power. More...
 
sr_param< doubleint_power
 Controller dynamic power. More...
 
- Public Attributes inherited from APBSlave
sr_register_bank< unsigned int,
unsigned int
r
 
APBSlaveSocket< 32, unsigned
int, unsigned int
apb
 
- Public Attributes inherited from CLKDevice
signal< bool >::in rst
 Reset input signal. More...
 
signal< sc_core::sc_time >::in clk
 Clock input signal. More...
 

Static Public Attributes

static const uint32_t IR_LEVEL = 0x00
 
static const uint32_t IR_PENDING = 0x04
 
static const uint32_t IR_FORCE = 0x08
 
static const uint32_t IR_CLEAR = 0x0C
 
static const uint32_t MP_STAT = 0x10
 
static const uint32_t BROADCAST = 0x14
 
static const uint32_t IR_LEVEL_IL = 0x0000FFFE
 
static const uint32_t IR_PENDING_EIP = 0xFFFF0000
 
static const uint32_t IR_PENDING_IP = 0x0000FFFE
 interrupt pending (true or false) More...
 
static const uint32_t IR_FORCE_IF = 0x0000FFFE
 
static const uint32_t IR_CLEAR_IC = 0xFFFFFFFE
 
static const uint32_t MP_STAT_WMASK = 0x0000FFFF
 
static const uint32_t MP_STAT_NCPU = 0xF0000000
 number of CPUs in the system More...
 
static const uint32_t MP_STAT_EIRQ = 0x000F0000
 interrupt number used for extended interrupts More...
 
static const uint32_t BROADCAST_BM = 0x0000FFFE
 
static const uint32_t PROC_MASK_EIM = 0xFFFF0000
 
static const uint32_t PROC_MASK_IM = 0x0000FFFE
 interrupt mask (0 = masked) More...
 
static const uint32_t PROC_IR_FORCE_IFC = 0xFFFE0000
 
static const uint32_t PROC_IR_FORCE_IF = 0x0000FFFE
 interrupt force More...
 
static const uint32_t PROC_EXTIR_ID_EID = 0x0000001F
 
static const uint32_t LEVEL_DEFAULT = 0x00000000
 
static const uint32_t PENDING_DEFAULT = 0x00000000
 interrupt pending register More...
 
static const uint32_t FORCE_DEFAULT = 0x00000000
 interrupt force register More...
 
static const uint32_t CLEAR_DEFAULT = 0x00000000
 interrupt clear register More...
 
static const uint32_t MP_STAT_DEFAULT = 0x00000001
 multiprocessor status register More...
 
static const uint32_t BROADCAST_DEFAULT = 0x00000000
 broadcast register More...
 
static const uint32_t MASK_DEFAULT = 0xFFFFFFFE
 interrupt mask register More...
 
static const uint32_t PROC_FORCE_DEFAULT = 0x00000000
 processor interrupt force register More...
 
static const uint32_t EXTIR_ID_DEFAULT = 0x00000000
 extended interrupt identification register More...
 

Additional Inherited Members

- Protected Attributes inherited from APBDevice< BaseModule< DefaultBase > >
uint32_t m_register [2]
 Impementation of the device register file. More...
 
sr_param< uint32_tg_pindex
 
sr_param< uint8_tg_pvendorid
 
sr_param< uint16_tg_pdeviceid
 
sr_param< uint8_tg_pversion
 
sr_param< uint8_tg_pirq
 
sr_param< uint32_tg_paddr
 
sr_param< uint32_tg_pmask
 
sr_param< uint32_tg_ptype
 
sr_param< boolg_pcacheable
 
sr_param< boolg_pprefetchable
 
- Protected Attributes inherited from BaseModule< DefaultBase >
ParameterAPIm_api
 Internal module gs param api instance. More...
 
ParameterArray m_generics
 Configuration generic container. More...
 
ParameterArray m_counters
 Performance counter container. More...
 
ParameterArray m_power
 Power counters container. More...
 
- Protected Attributes inherited from CLKDevice
sc_core::sc_time clock_cycle
 

Member Function Documentation

Irqmp::GC_HAS_CALLBACKS ( )
static const uint32_t Irqmp::PROC_EXTIR_ID ( int  CPU_INDEX)
inlinestatic
static const uint32_t Irqmp::PROC_IR_FORCE ( int  CPU_INDEX)
inlinestatic
static const uint32_t Irqmp::PROC_IR_MASK ( int  CPU_INDEX)
inlinestatic

Referenced by dorst(), and launch_irq().

Irqmp::SC_HAS_PROCESS ( Irqmp  )
Irqmp::SR_HAS_SIGNALS ( Irqmp  )

Member Data Documentation

const uint32_t Irqmp::BROADCAST = 0x14
static

Referenced by dorst(), and incomming_irq().

const uint32_t Irqmp::BROADCAST_BM = 0x0000FFFE
static

broadcast register (applicable if NCPU>1) broadcast mask: if n=1, interrupt n is broadcasted

Referenced by init_registers().

const uint32_t Irqmp::BROADCAST_DEFAULT = 0x00000000
static

broadcast register

Referenced by dorst().

const uint32_t Irqmp::CLEAR_DEFAULT = 0x00000000
static

interrupt clear register

Referenced by dorst().

signal<bool>::selector Irqmp::cpu_rst

CPU reset out signals.

Referenced by dorst(), mpstat_write(), and sc_main().

signal<bool>::infield Irqmp::cpu_stat

CPU reset out signals.

Referenced by mpstat_read(), mpstat_write(), and sc_main().

sc_event Irqmp::e_signal

Internal signal to decouple inputs and outputs. Furthermore it addes the needed delays.

Referenced by acknowledged_irq(), clear_write(), force_write(), incomming_irq(), launch_irq(), and pending_write().

const uint32_t Irqmp::EXTIR_ID_DEFAULT = 0x00000000
static

extended interrupt identification register

Referenced by dorst().

const uint32_t Irqmp::FORCE_DEFAULT = 0x00000000
static

interrupt force register

Referenced by dorst().

sr_param<uint32_t> Irqmp::g_eirq

Extended Interrupt Number Behind this interrupt are all extended interrupt cascaded.

Referenced by acknowledged_irq(), clear_write(), dorst(), force_write(), init_generics(), launch_irq(), and mpstat_read().

sr_param<int> Irqmp::g_ncpu

Number of CPUs in the System Needet to determ the number of receiver lines.

Referenced by clear_write(), dorst(), end_of_simulation(), force_write(), incomming_irq(), init_generics(), init_registers(), Irqmp(), launch_irq(), mpstat_read(), and mpstat_write().

sr_param<double> Irqmp::int_power

Controller dynamic power.

Referenced by Irqmp(), and power_model().

sr_param<double> Irqmp::int_power_norm

Normalized dynamic power of controller.

Referenced by power_model().

const uint32_t Irqmp::IR_CLEAR = 0x0C
static

Referenced by clear_write(), and dorst().

const uint32_t Irqmp::IR_CLEAR_IC = 0xFFFFFFFE
static

interrupt clear register n=1 to clear interrupt n

Referenced by init_registers().

const uint32_t Irqmp::IR_FORCE = 0x08
static
const uint32_t Irqmp::IR_FORCE_IF = 0x0000FFFE
static

interrupt force register force interrupt (true or false)

Referenced by init_registers(), and launch_irq().

const uint32_t Irqmp::IR_LEVEL = 0x00
static

Referenced by dorst(), and launch_irq().

const uint32_t Irqmp::IR_LEVEL_IL = 0x0000FFFE
static

register contents (config bit masks) interrupt level register interrupt priority level (0 or 1)

Referenced by init_registers().

const uint32_t Irqmp::IR_PENDING = 0x04
static
const uint32_t Irqmp::IR_PENDING_EIP = 0xFFFF0000
static

interrupt pending register extended interrupt pending (true or false)

Referenced by init_registers(), and launch_irq().

const uint32_t Irqmp::IR_PENDING_IP = 0x0000FFFE
static

interrupt pending (true or false)

Referenced by init_registers(), and launch_irq().

signal<uint32_t>::infield Irqmp::irq_ack

IRQ Acknowledge input signals.

Referenced by sc_main().

signal<std::pair<uint32_t,bool> >::in Irqmp::irq_in

IRQ input signals from other devices.

Referenced by sc_main().

signal<std::pair<uint32_t, bool> >::selector Irqmp::irq_req

IRQ Request out signals.

Referenced by acknowledged_irq(), clear_write(), force_write(), launch_irq(), and sc_main().

const uint32_t Irqmp::LEVEL_DEFAULT = 0x00000000
static

register default values interrupt level register

Referenced by dorst().

const uint32_t Irqmp::MASK_DEFAULT = 0xFFFFFFFE
static

interrupt mask register

Referenced by dorst().

const uint32_t Irqmp::MP_STAT = 0x10
static

Referenced by dorst(), mpstat_read(), and mpstat_write().

const uint32_t Irqmp::MP_STAT_DEFAULT = 0x00000001
static

multiprocessor status register

const uint32_t Irqmp::MP_STAT_EIRQ = 0x000F0000
static

interrupt number used for extended interrupts

const uint32_t Irqmp::MP_STAT_NCPU = 0xF0000000
static

number of CPUs in the system

const uint32_t Irqmp::MP_STAT_WMASK = 0x0000FFFF
static

multiprocessor status register multiprocessor status register write mask

Referenced by init_registers().

const uint32_t Irqmp::PENDING_DEFAULT = 0x00000000
static

interrupt pending register

Referenced by dorst().

const uint32_t Irqmp::PROC_EXTIR_ID_EID = 0x0000001F
static

extended interrupt identification register ID of the acknowledged extended interrupt (16..31)

Referenced by init_registers().

const uint32_t Irqmp::PROC_FORCE_DEFAULT = 0x00000000
static

processor interrupt force register

Referenced by dorst().

const uint32_t Irqmp::PROC_IR_FORCE_IF = 0x0000FFFE
static

interrupt force

Referenced by force_write(), and init_registers().

const uint32_t Irqmp::PROC_IR_FORCE_IFC = 0xFFFE0000
static

processor interrupt force register interrupt force clear

Referenced by init_registers().

const uint32_t Irqmp::PROC_MASK_EIM = 0xFFFF0000
static

processor mask register interrupt mask for extended interrupts

Referenced by init_registers().

const uint32_t Irqmp::PROC_MASK_IM = 0x0000FFFE
static

interrupt mask (0 = masked)

Referenced by init_registers().

sr_param<double> Irqmp::sta_power

Controller static power.

Referenced by Irqmp(), and power_model().

sr_param<double> Irqmp::sta_power_norm

Normalized static power of controller.

Referenced by power_model().


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