From 3697990c27243f0c454f2fab0f12ed06759c97b9 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 16 Oct 2014 05:49:39 -0400 Subject: arm: Add a model of an ARM PMUv3 This class implements a subset of the ARM PMU v3 specification as described in the ARMv8 reference manual. It supports most of the features of the PMU, however the following features are known to be missing: * Event filtering (e.g., from different privilege levels). * Access controls (the PMU currently ignores the execution level). * The chain counter (event no. 0x1E) is unimplemented. The PMU itself does not implement any events, it merely provides an interface for the configuration scripts to hook up probes that drive events. Configuration scripts should call addEventProbe() to configure custom events or high-level methods to configure architected events. The Python implementation of addEventProbe() automatically delays event type registration until after instantiation. In order to support CPU switching and some combined counters (e.g., memory references synthesized from loads and stores), the PMU allows multiple probes per event type. When creating a system that switches between CPU models that share the same PMU, PMU events for all of the CPU models can be registered with the PMU. Kudos to Matt Horsnell for the initial gem5 implementation of the PMU. --- src/arch/arm/ArmISA.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arch/arm/ArmISA.py') diff --git a/src/arch/arm/ArmISA.py b/src/arch/arm/ArmISA.py index eaec92f4d..f5c56cfd5 100644 --- a/src/arch/arm/ArmISA.py +++ b/src/arch/arm/ArmISA.py @@ -40,6 +40,8 @@ from m5.params import * from m5.proxy import * from m5.SimObject import SimObject +from ArmPMU import ArmPMU + class ArmISA(SimObject): type = 'ArmISA' cxx_class = 'ArmISA::ISA' @@ -47,6 +49,8 @@ class ArmISA(SimObject): system = Param.System(Parent.any, "System this ISA object belongs to") + pmu = Param.ArmPMU(NULL, "Performance Monitoring Unit") + midr = Param.UInt32(0x410fc0f0, "MIDR value") # See section B4.1.93 - B4.1.94 of the ARM ARM -- cgit v1.2.3