Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

AHBMem - AHB Memory

Table of Contents

Overview

The AHBMEM model provides a simple flat memory implementation bound to an AHB slave interface. The class inherits from the AHBSlave and CLKDevice classes.

Interface

In the manner of the GRLIB VHDL models this component provides the typical AHB Slave Generics refactored as Constructor parameters of the class AHBMem. An overview about the available parameters is given in table 42.

Table 42 - AHBMEM Constructor Parameters
ParameterDescription
nmSystemC name of the module
haddrAHB address of the AHB slave socket (12 bit)
hmaskAHB address mask (12 bit)
ambaLayerAbstraction layer used (AT/LT)
slave_idThe AHB slave bus index
cachableDevice cacheable or not
wait_statesNumber of wait states to be inserted for each transfer
pow_monEnable power monitoring

Example Instantiation

This example shows how to instantiate the module AHBMEM. In line 547 the constructor is called to create the new object. In line 559 the module is connected to the bus and in the next line the clock is set.

AHBMem *ahbmem = new AHBMem("ahbmem",
p_ahbmem_addr,
p_ahbmem_mask,
ambaLayer,
p_ahbmem_index,
p_ahbmem_cacheable,
p_ahbmem_waitstates,
p_report_power
);
// Connect to ahbctrl and clock
ahbctrl.ahbOUT(ahbmem->ahb);
ahbmem->set_clk(p_system_clock, SC_NS);