CMA
Definition
CMA, acronym of Completeness Metric Analyzer, is a command-line tool for runtime monitoring of
timing and State Machine status. This tracing mechanisms uses software level acquisition of hardware timing and State Machine information, outputs operations are the tracing data of the processor such as the function timing execution combined with formal description of the system behaviour through the State Machine status and input operations. The trace protocol provides a real-time trace capability for the functionality. This tool was designed to providing data tracing of a processor in a not intrusive manner in embedded system.
How it works
When an event requires the acquisition of system-related information, the CMA tool operates a combination of three macro operations, both composed by a sequence of operations, as follow:
- data acquisition: in this operation the tool gets information about the system run, such as execution time, state machine status, etc
- data elaboration: previously acquired data are now formatted in an output trace and queued
- log generation: the queued traces are written to a log file and the queue is cleaned
Modules
The CMA is composed by two modules: the queue module and the capture module.
The queue module is called by the state machine in order to write the trace queue. The queue module compresses the trace information. When the timing data has been captured, queue module extracts the information from the state machine with the information about the code that was executed.
The capture module is running outside the system in listening, once the system is ready to write the capture module receives the information to be written from the queue module and generates the log file. Once the log file has been generated, the queue is empty waiting for new traces.
Traces
The trace has the following structure:
<timestamp> = system time in μs
<eventId> = 0 (running), 1 (ready), 2 (blocked), 3 (sleep), 4 (wakeup)
<instance_name> = according to the device
<port_name_providing_the_operation> = input/output node block port
<operation_name> = status of State Machine
Log File
The log file is composed having on each row a trace and is built to providing system execution information specifically for Tekne-Short Range Communication case study.