HWMapper

This class is used for the mapping of periphery to hardware addresses and vice versa. It essentially contains a pointer to a pointer field of HWMapDpPa objects, which establish the connection of DP identifiers to peripheral addresses (sorted once by the DPID and once by the peripheral address strings) as well as a pointer field of HW objects, which establish the connection of hardware addresses to peripheral address strings (sorted once by peripheral address strings and once by hardware addresses).

Generally, it is necessary to implement the following functions in a derived class:

  • The function addDpPa(DpIdentifier& dpId, PeriphAddr* confPtr) is called when a new address is created. In this function an appropriate transformation object in the address config is set, a HWObject is set and the HWObject Listen is added using addHWObject().

  • The function clrDpPa(DpIdentifier& dpId, PeriphAddr* confPtr) is called when an address is deleted. In this function the corresponding HWObject with clrHWObject is deleted from the lists.

  • int compare_HWHW(...) - Compares two HW objects with each other, used for sorting new HW objects into the pointer table.

  • int compare_HWComponent(...) - used for sorting into the table on the basis of association with a hardware component.