Merge "Feature extension of adding the BTF trace code generation functionality to existing CdGen tool"
diff --git a/eclipse-tools/cdgen/bin/.gitignore b/eclipse-tools/cdgen/bin/.gitignore
deleted file mode 100644
index cf1db2e..0000000
--- a/eclipse-tools/cdgen/bin/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/org/
diff --git a/eclipse-tools/cdgen/models/democarMulticoreRaspberryPi/AMALTHEA_Democar_Multi_RASPBERRYPI_TRACE.amxmi b/eclipse-tools/cdgen/models/democarMulticoreRaspberryPi/AMALTHEA_Democar_Multi_RASPBERRYPI_TRACE.amxmi
new file mode 100644
index 0000000..0b66ae7
--- /dev/null
+++ b/eclipse-tools/cdgen/models/democarMulticoreRaspberryPi/AMALTHEA_Democar_Multi_RASPBERRYPI_TRACE.amxmi
@@ -0,0 +1,1085 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<am:Amalthea xmlns:am="http://app4mc.eclipse.org/amalthea/0.9.7" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
+ <commonElements>
+ <tags name="SwcEngineController" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcActuators" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcBrakeForceArbiter" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcABSCalculation" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcSensors" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcSensorPostprocessing" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcCylNumObserver" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcBrakeForceCalculation" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcEngineSensors" tagType="SOFTWARE_COMPONENT" />
+ <tags name="SwcInjIgnActuation" tagType="SOFTWARE_COMPONENT" />
+ <coreClassifiers name="FPU" />
+ </commonElements>
+ <swModel>
+ <tasks name="Task_ESSP0" stimuli="Timer_5MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintExclude] Exclude Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="EcuVehicleSpeedSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="VehicleSpeedSensorTranslation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="VehicleSpeedSensorVoter?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP1" stimuli="Timer_10MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintExclude] Exclude Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="CylNumObserver?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="DecelerationSensorDiagnosis?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP2" stimuli="Timer_10MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintExclude] Exclude Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="WheelSpeedSensorDiagnosis?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakePedalSensorDiagnosis?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP3" stimuli="Timer_5MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintExclude] Exclude Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="MassAirFlowSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BaseFuelMass?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="TransientFuelMass?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="TotalFuelMass?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="InjectionTimeActuation?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP4" stimuli="Timer_5MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintExclude] Exclude Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="APedSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="APedVoter?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="ThrottleController?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="ThrottleActuator?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP5" stimuli="Timer_5MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintInclude] Requires Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="ThrottleSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="EcuBrakePedalSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakePedalSensorTranslation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakePedalSensorVoter?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="CheckPlausability?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakeSafetyMonitor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakeForceCalculation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakeForceArbiter?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="StopLightActuator?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="EcuStopLightActuator?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP6" stimuli="Timer_10MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <customProperties key="[ConstraintInclude] Requires Targets with FPU">
+ <value xsi:type="am:ReferenceObject" value="FPU?type=CoreClassifier" />
+ </customProperties>
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="VehicleStateMonitor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="EcuDecelerationSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="DecelerationSensorTranslation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="DecelerationSensorVoter?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="ABSCalculation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakeForceActuation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="CaliperPositionCalculation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="BrakeActuator?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="EcuBrakeActuator?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP8" stimuli="Timer_10MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="DiagnosisArbiter?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="IgnitionTiming?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="IgnitionTimeActuation?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <tasks name="Task_ESSP9" stimuli="Timer_5MS?type=PeriodicStimulus" multipleTaskActivationLimit="0">
+ <activityGraph>
+ <items xsi:type="am:Group" name="CallSequence" ordered="true">
+ <items xsi:type="am:RunnableCall" runnable="EcuWheelSpeedSensor?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="WheelSpeedSensorTranslation?type=Runnable" />
+ <items xsi:type="am:RunnableCall" runnable="WheelSpeedSensorVoter?type=Runnable" />
+ </items>
+ </activityGraph>
+ </tasks>
+ <runnables name="ABSCalculation" tags="SwcABSCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="VotedDecelerationRate?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VotedVehicleSpeed?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VotedWheelSpeed?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ArbitratedBrakeForce?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="ABSActivation?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ABSMode?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="APedSensor" tags="SwcEngineSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="APedSensor1Voltage?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="APedSensor2Voltage?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="APedPosition1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="APedPosition2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="APedVoter" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="APedPosition1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="APedPosition2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VotedAPedPosition?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BaseFuelMass" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="MassAirFlow?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BaseFuelMassPerStroke?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="MAFRate?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakeActuator" tags="SwcABSCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="CaliperPosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakeForceVoltage?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakeActuatorMonitor" tags="SwcBrakeForceCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakeForce?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeForceFeedback?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakeForceActuation" tags="SwcABSCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="ABSActivation?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ABSMode?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakeForce?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeForceCurrent?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakeForceArbiter" tags="SwcBrakeForceArbiter?type=Tag" activations="Timer_20MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="CalculatedBrakeForce?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeSafetyState?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="ArbitratedBrakeForce?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakeForceCalculation" tags="SwcBrakeForceCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeForceFeedback?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ArbitratedDiagnosisRequest?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="MonitoredVehicleState?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeSafetyLevel?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="CalculatedBrakeForce?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeMonitorLevel?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakePedalSensorDiagnosis" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPositionVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakePedalPositionVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakePedalSensorTranslation" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPositionVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakePedalPositionVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakePedalSensorVoter" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VotedBrakePedalPosition?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="BrakeSafetyMonitor" tags="SwcBrakeForceCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeForceFeedback?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ArbitratedDiagnosisRequest?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="MonitoredVehicleState?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeMonitorLevel?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakeSafetyLevel?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeSafetyState?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="CaliperPositionCalculation" tags="SwcABSCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="CaliperPosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakeForceCurrent?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="CaliperPosition?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="CheckPlausability" tags="SwcBrakeForceCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="VotedBrakePedalPosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPosition?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="CylNumObserver" tags="SwcCylNumObserver?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="CylinderNumber?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="TriggeredCylinderNumber?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="DecelerationSensorDiagnosis" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="DecelerationVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="DecelerationVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="DecelerationSensorTranslation" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="DecelerationVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="DecelerationVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="DecelerationRate1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="DecelerationRate2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="DecelerationSensorVoter" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="DecelerationRate1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="DecelerationRate2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VotedDecelerationRate?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="DiagnosisArbiter" tags="SwcBrakeForceCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="ArbitratedDiagnosisRequest?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="EcuBrakeActuator" tags="SwcActuators?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakeForceVoltage?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="EcuBrakePedalSensor" tags="SwcSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="144000" upperBound="176000" average="160000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakePedalPositionVoltage1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="BrakePedalPositionVoltage2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="EcuDecelerationSensor" tags="SwcSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="144000" upperBound="176000" average="160000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="DecelerationVoltage1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="DecelerationVoltage2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="EcuStopLightActuator" tags="SwcActuators?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BrakeApplication?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="EcuVehicleSpeedSensor" tags="SwcSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VehicleSpeedVoltage1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VehicleSpeedVoltage2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="EcuWheelSpeedSensor" tags="SwcSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="WheelSpeedVoltage1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="WheelSpeedVoltage2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="IgnitionTimeActuation" tags="SwcInjIgnActuation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="TriggeredCylinderNumber?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime3?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime4?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime5?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime6?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="IgnitionTime7?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="IgnitionTime8?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="IgnitionTiming" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="MAFRate?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="IgnitionTime?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="InjectionTimeActuation" tags="SwcInjIgnActuation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="TriggeredCylinderNumber?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="TotalFuelMassPerStroke?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime3?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime4?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime5?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime6?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime7?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="InjectionTime8?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="MassAirFlowSensor" tags="SwcEngineSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="MAFSensorVoltage?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="MassAirFlow?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="StopLightActuator" tags="SwcABSCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="ArbitratedBrakeForce?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="BrakeApplication?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="ThrottleActuator" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="DesiredThrottlePosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="DesiredThrottlePositionVoltage?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="ThrottleController" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="VotedAPedPosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ThrottlePosition?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="DesiredThrottlePosition?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="ThrottleSensor" tags="SwcEngineSensors?type=Tag" activations="Timer_5MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="ThrottleSensor1Voltage?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="ThrottleSensor2Voltage?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="ThrottlePosition?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="TotalFuelMass" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="TransientFuelMassPerStroke?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="TotalFuelMassPerStroke?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="TransientFuelMass" tags="SwcEngineController?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="BaseFuelMassPerStroke?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="TransientFuelMassPerStroke?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="VehicleSpeedSensorDiagnosis" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="VehicleSpeedVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VehicleSpeedVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="VehicleSpeedSensorTranslation" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="VehicleSpeedVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VehicleSpeedVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VehicleSpeed1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VehicleSpeed2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="VehicleSpeedSensorVoter" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="VehicleSpeed1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="VehicleSpeed2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VotedVehicleSpeed?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="VehicleStateMonitor" tags="SwcBrakeForceCalculation?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="MonitoredVehicleState?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="WheelSpeedSensorDiagnosis" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="WheelSpeedVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="WheelSpeedVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ </activityGraph>
+ </runnables>
+ <runnables name="WheelSpeedSensorTranslation" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="WheelSpeedVoltage1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="WheelSpeedVoltage2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="WheelSpeed1?type=Label" access="write" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="WheelSpeed2?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <runnables name="WheelSpeedSensorVoter" tags="SwcSensorPostprocessing?type=Tag" activations="Timer_10MS?type=PeriodicActivation" callback="false" service="false">
+ <activityGraph>
+ <items xsi:type="am:LabelAccess" data="WheelSpeed1?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:LabelAccess" data="WheelSpeed2?type=Label" access="read" dataStability="inherited" />
+ <items xsi:type="am:Ticks">
+ <default xsi:type="am:DiscreteValueWeibullEstimatorsDistribution" lowerBound="72000" upperBound="88000" average="80000.0" pRemainPromille="0.5" />
+ </items>
+ <items xsi:type="am:LabelAccess" data="VotedWheelSpeed?type=Label" access="write" dataStability="inherited" />
+ </activityGraph>
+ </runnables>
+ <labels name="ABSActivation" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="ABSMode" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="APedPosition1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="APedPosition2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="APedSensor1Voltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="APedSensor2Voltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="ArbitratedBrakeForce" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="ArbitratedDiagnosisRequest" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BaseFuelMassPerStroke" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="BrakeApplication" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakeForce" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakeForceCurrent" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakeForceFeedback" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakeForceVoltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="BrakeMonitorLevel" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakePedalPosition" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakePedalPosition1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakePedalPosition2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakePedalPositionVoltage1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="BrakePedalPositionVoltage2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="BrakeSafetyLevel" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="BrakeSafetyState" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="CalculatedBrakeForce" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="CaliperPosition" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="CylinderNumber" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="DecelerationRate1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="DecelerationRate2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="DecelerationVoltage1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="DecelerationVoltage2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="DesiredThrottlePosition" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="DesiredThrottlePositionVoltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime3" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime4" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime5" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime6" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime7" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="IgnitionTime8" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime3" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime4" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime5" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime6" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime7" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="InjectionTime8" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="MAFRate" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="MAFSensorVoltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="MassAirFlow" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="MonitoredVehicleState" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="ThrottlePosition" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="ThrottleSensor1Voltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="ThrottleSensor2Voltage" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="TotalFuelMassPerStroke" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="TransientFuelMassPerStroke" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="TriggeredCylinderNumber" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VehicleSpeed1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VehicleSpeed2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VehicleSpeedVoltage1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="VehicleSpeedVoltage2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="VotedAPedPosition" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VotedBrakePedalPosition" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VotedDecelerationRate" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VotedVehicleSpeed" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="VotedWheelSpeed" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="WheelSpeed1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="WheelSpeed2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="8" unit="bit" />
+ </labels>
+ <labels name="WheelSpeedVoltage1" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <labels name="WheelSpeedVoltage2" constant="false" bVolatile="false" dataStability="noProtection">
+ <size value="16" unit="bit" />
+ </labels>
+ <processPrototypes name="ESSP0" firstRunnable="EcuVehicleSpeedSensor?type=Runnable" lastRunnable="VehicleSpeedSensorVoter?type=Runnable" activation="Timer_5MS?type=PeriodicActivation">
+ <runnableCalls runnable="EcuVehicleSpeedSensor?type=Runnable" />
+ <runnableCalls runnable="VehicleSpeedSensorTranslation?type=Runnable" />
+ <runnableCalls runnable="VehicleSpeedSensorVoter?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP1" firstRunnable="CylNumObserver?type=Runnable" lastRunnable="DecelerationSensorDiagnosis?type=Runnable" activation="Timer_10MS?type=PeriodicActivation">
+ <runnableCalls runnable="CylNumObserver?type=Runnable" />
+ <runnableCalls runnable="DecelerationSensorDiagnosis?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP2" firstRunnable="WheelSpeedSensorDiagnosis?type=Runnable" lastRunnable="BrakePedalSensorDiagnosis?type=Runnable" activation="Timer_10MS?type=PeriodicActivation">
+ <runnableCalls runnable="WheelSpeedSensorDiagnosis?type=Runnable" />
+ <runnableCalls runnable="BrakePedalSensorDiagnosis?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP3" firstRunnable="MassAirFlowSensor?type=Runnable" lastRunnable="InjectionTimeActuation?type=Runnable" activation="Timer_5MS?type=PeriodicActivation">
+ <runnableCalls runnable="MassAirFlowSensor?type=Runnable" />
+ <runnableCalls runnable="BaseFuelMass?type=Runnable" />
+ <runnableCalls runnable="TransientFuelMass?type=Runnable" />
+ <runnableCalls runnable="TotalFuelMass?type=Runnable" />
+ <runnableCalls runnable="InjectionTimeActuation?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP4" firstRunnable="APedSensor?type=Runnable" lastRunnable="ThrottleActuator?type=Runnable" activation="Timer_5MS?type=PeriodicActivation">
+ <runnableCalls runnable="APedSensor?type=Runnable" />
+ <runnableCalls runnable="APedVoter?type=Runnable" />
+ <runnableCalls runnable="ThrottleController?type=Runnable" />
+ <runnableCalls runnable="ThrottleActuator?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP5" firstRunnable="ThrottleSensor?type=Runnable" lastRunnable="EcuStopLightActuator?type=Runnable" activation="Timer_5MS?type=PeriodicActivation">
+ <runnableCalls runnable="ThrottleSensor?type=Runnable" />
+ <runnableCalls runnable="EcuBrakePedalSensor?type=Runnable" />
+ <runnableCalls runnable="BrakePedalSensorTranslation?type=Runnable" />
+ <runnableCalls runnable="BrakePedalSensorVoter?type=Runnable" />
+ <runnableCalls runnable="CheckPlausability?type=Runnable" />
+ <runnableCalls runnable="BrakeSafetyMonitor?type=Runnable" />
+ <runnableCalls runnable="BrakeForceCalculation?type=Runnable" />
+ <runnableCalls runnable="BrakeForceArbiter?type=Runnable" />
+ <runnableCalls runnable="StopLightActuator?type=Runnable" />
+ <runnableCalls runnable="EcuStopLightActuator?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP6" firstRunnable="VehicleStateMonitor?type=Runnable" lastRunnable="EcuBrakeActuator?type=Runnable" activation="Timer_10MS?type=PeriodicActivation">
+ <runnableCalls runnable="VehicleStateMonitor?type=Runnable" />
+ <runnableCalls runnable="EcuDecelerationSensor?type=Runnable" />
+ <runnableCalls runnable="DecelerationSensorTranslation?type=Runnable" />
+ <runnableCalls runnable="DecelerationSensorVoter?type=Runnable" />
+ <runnableCalls runnable="ABSCalculation?type=Runnable" />
+ <runnableCalls runnable="BrakeForceActuation?type=Runnable" />
+ <runnableCalls runnable="CaliperPositionCalculation?type=Runnable" />
+ <runnableCalls runnable="BrakeActuator?type=Runnable" />
+ <runnableCalls runnable="EcuBrakeActuator?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP8" firstRunnable="DiagnosisArbiter?type=Runnable" lastRunnable="IgnitionTimeActuation?type=Runnable" activation="Timer_10MS?type=PeriodicActivation">
+ <runnableCalls runnable="DiagnosisArbiter?type=Runnable" />
+ <runnableCalls runnable="IgnitionTiming?type=Runnable" />
+ <runnableCalls runnable="IgnitionTimeActuation?type=Runnable" />
+ </processPrototypes>
+ <processPrototypes name="ESSP9" firstRunnable="EcuWheelSpeedSensor?type=Runnable" lastRunnable="WheelSpeedSensorVoter?type=Runnable" activation="Timer_5MS?type=PeriodicActivation">
+ <runnableCalls runnable="EcuWheelSpeedSensor?type=Runnable" />
+ <runnableCalls runnable="WheelSpeedSensorTranslation?type=Runnable" />
+ <runnableCalls runnable="WheelSpeedSensorVoter?type=Runnable" />
+ </processPrototypes>
+ <activations xsi:type="am:PeriodicActivation" name="Timer_10MS">
+ <min value="10" unit="ms" />
+ <max value="10" unit="ms" />
+ <offset value="0" unit="ms" />
+ </activations>
+ <activations xsi:type="am:PeriodicActivation" name="Timer_20MS">
+ <min value="20" unit="ms" />
+ <max value="20" unit="ms" />
+ <offset value="0" unit="ms" />
+ </activations>
+ <activations xsi:type="am:PeriodicActivation" name="Timer_5MS">
+ <min value="5" unit="ms" />
+ <max value="5" unit="ms" />
+ <offset value="0" unit="ms" />
+ </activations>
+ </swModel>
+ <hwModel>
+ <definitions xsi:type="am:ProcessingUnitDefinition" name="ARM Cortex-A53" puType="CPU" features="Instructions/IPC_1.0?type=HwFeature" />
+ <featureCategories name="Instructions" featureType="performance">
+ <features name="IPC_1.0" value="1.0" />
+ </featureCategories>
+ <structures name="Homogeneous Example System" structureType="System">
+ <structures name="RPI3" structureType="ECU">
+ <structures name="ARM Cortex-A53" structureType="Microcontroller">
+ <modules xsi:type="am:ProcessingUnit" name="RPI_0" frequencyDomain="ClockARM0?type=FrequencyDomain" definition="ARM+Cortex-A53?type=ProcessingUnitDefinition" />
+ <modules xsi:type="am:ProcessingUnit" name="RPI_1" frequencyDomain="ClockARM1?type=FrequencyDomain" definition="ARM+Cortex-A53?type=ProcessingUnitDefinition" />
+ <modules xsi:type="am:ProcessingUnit" name="RPI_2" frequencyDomain="ClockARM2?type=FrequencyDomain" definition="ARM+Cortex-A53?type=ProcessingUnitDefinition" />
+ <modules xsi:type="am:ProcessingUnit" name="RPI_3" frequencyDomain="ClockARM3?type=FrequencyDomain" definition="ARM+Cortex-A53?type=ProcessingUnitDefinition" />
+ </structures>
+ </structures>
+ </structures>
+ <domains xsi:type="am:FrequencyDomain" name="ClockARM2" clockGating="false">
+ <defaultValue value="1.2" unit="GHz" />
+ </domains>
+ <domains xsi:type="am:FrequencyDomain" name="ClockARM3" clockGating="false">
+ <defaultValue value="1.2" unit="GHz" />
+ </domains>
+ <domains xsi:type="am:FrequencyDomain" name="ClockARM0" clockGating="false">
+ <defaultValue value="1.2" unit="GHz" />
+ </domains>
+ <domains xsi:type="am:FrequencyDomain" name="ClockARM1" clockGating="false">
+ <defaultValue value="1.2" unit="GHz" />
+ </domains>
+ </hwModel>
+ <osModel>
+ <operatingSystems name="OS">
+ <taskSchedulers name="SCHED_RPI_0 #1" />
+ <taskSchedulers name="SCHED_RPI_1 #2" />
+ <taskSchedulers name="SCHED_RPI_2 #3" />
+ <taskSchedulers name="SCHED_RPI_3 #4" />
+ </operatingSystems>
+ </osModel>
+ <stimuliModel>
+ <stimuli xsi:type="am:PeriodicStimulus" name="Timer_10MS">
+ <offset value="0" unit="ms" />
+ <recurrence value="10" unit="ms" />
+ </stimuli>
+ <stimuli xsi:type="am:PeriodicStimulus" name="Timer_20MS">
+ <offset value="0" unit="ms" />
+ <recurrence value="20" unit="ms" />
+ </stimuli>
+ <stimuli xsi:type="am:PeriodicStimulus" name="Timer_5MS">
+ <offset value="0" unit="ms" />
+ <recurrence value="5" unit="ms" />
+ </stimuli>
+ </stimuliModel>
+ <constraintsModel>
+ <runnableSequencingConstraints name="ABSCalculation-->BrakeForceActuation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="ABSCalculation?type=Runnable" />
+ <runnableGroups runnables="BrakeForceActuation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeForceArbiter-->ABSCalculation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeForceArbiter?type=Runnable" />
+ <runnableGroups runnables="ABSCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="DecelerationSensorVoter-->ABSCalculation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="DecelerationSensorVoter?type=Runnable" />
+ <runnableGroups runnables="ABSCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="VehicleSpeedSensorVoter-->ABSCalculation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="VehicleSpeedSensorVoter?type=Runnable" />
+ <runnableGroups runnables="ABSCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="WheelSpeedSensorVoter-->ABSCalculation" orderType="successor" processScope="ESSP9?type=ProcessPrototype">
+ <runnableGroups runnables="WheelSpeedSensorVoter?type=Runnable" />
+ <runnableGroups runnables="ABSCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="APedSensor-->APedVoter" orderType="successor" processScope="ESSP4?type=ProcessPrototype">
+ <runnableGroups runnables="APedSensor?type=Runnable" />
+ <runnableGroups runnables="APedVoter?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="APedVoter-->ThrottleController" orderType="successor" processScope="ESSP4?type=ProcessPrototype">
+ <runnableGroups runnables="APedVoter?type=Runnable" />
+ <runnableGroups runnables="ThrottleController?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BaseFuelMass-->IgnitionTiming" orderType="successor" processScope="ESSP8?type=ProcessPrototype">
+ <runnableGroups runnables="BaseFuelMass?type=Runnable" />
+ <runnableGroups runnables="IgnitionTiming?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="MassAirFlowSensor-->BaseFuelMass" orderType="successor" processScope="ESSP3?type=ProcessPrototype">
+ <runnableGroups runnables="MassAirFlowSensor?type=Runnable" />
+ <runnableGroups runnables="BaseFuelMass?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BaseFuelMass-->TransientFuelMass" orderType="successor" processScope="ESSP3?type=ProcessPrototype">
+ <runnableGroups runnables="BaseFuelMass?type=Runnable" />
+ <runnableGroups runnables="TransientFuelMass?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="CaliperPositionCalculation-->BrakeActuator" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="CaliperPositionCalculation?type=Runnable" />
+ <runnableGroups runnables="BrakeActuator?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeActuator-->EcuBrakeActuator" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeActuator?type=Runnable" />
+ <runnableGroups runnables="EcuBrakeActuator?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeForceActuation-->CaliperPositionCalculation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeForceActuation?type=Runnable" />
+ <runnableGroups runnables="CaliperPositionCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeForceCalculation-->BrakeForceArbiter" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeForceCalculation?type=Runnable" />
+ <runnableGroups runnables="BrakeForceArbiter?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeSafetyMonitor-->BrakeForceArbiter" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeSafetyMonitor?type=Runnable" />
+ <runnableGroups runnables="BrakeForceArbiter?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeForceArbiter-->StopLightActuator" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeForceArbiter?type=Runnable" />
+ <runnableGroups runnables="StopLightActuator?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakeSafetyMonitor-->BrakeForceCalculation" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="BrakeSafetyMonitor?type=Runnable" />
+ <runnableGroups runnables="BrakeForceCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="CheckPlausability-->BrakeForceCalculation" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="CheckPlausability?type=Runnable" />
+ <runnableGroups runnables="BrakeForceCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="VehicleStateMonitor-->BrakeForceCalculation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="VehicleStateMonitor?type=Runnable" />
+ <runnableGroups runnables="BrakeForceCalculation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuBrakePedalSensor-->BrakePedalSensorDiagnosis" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="EcuBrakePedalSensor?type=Runnable" />
+ <runnableGroups runnables="BrakePedalSensorDiagnosis?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakePedalSensorTranslation-->BrakePedalSensorVoter" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="BrakePedalSensorTranslation?type=Runnable" />
+ <runnableGroups runnables="BrakePedalSensorVoter?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuBrakePedalSensor-->BrakePedalSensorTranslation" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="EcuBrakePedalSensor?type=Runnable" />
+ <runnableGroups runnables="BrakePedalSensorTranslation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="BrakePedalSensorVoter-->CheckPlausability" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="BrakePedalSensorVoter?type=Runnable" />
+ <runnableGroups runnables="CheckPlausability?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="CheckPlausability-->BrakeSafetyMonitor" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="CheckPlausability?type=Runnable" />
+ <runnableGroups runnables="BrakeSafetyMonitor?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="VehicleStateMonitor-->BrakeSafetyMonitor" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="VehicleStateMonitor?type=Runnable" />
+ <runnableGroups runnables="BrakeSafetyMonitor?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="CylNumObserver-->IgnitionTimeActuation" orderType="successor" processScope="ESSP8?type=ProcessPrototype">
+ <runnableGroups runnables="CylNumObserver?type=Runnable" />
+ <runnableGroups runnables="IgnitionTimeActuation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="CylNumObserver-->InjectionTimeActuation" orderType="successor" processScope="ESSP3?type=ProcessPrototype">
+ <runnableGroups runnables="CylNumObserver?type=Runnable" />
+ <runnableGroups runnables="InjectionTimeActuation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuDecelerationSensor-->DecelerationSensorDiagnosis" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="EcuDecelerationSensor?type=Runnable" />
+ <runnableGroups runnables="DecelerationSensorDiagnosis?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="DecelerationSensorTranslation-->DecelerationSensorVoter" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="DecelerationSensorTranslation?type=Runnable" />
+ <runnableGroups runnables="DecelerationSensorVoter?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuDecelerationSensor-->DecelerationSensorTranslation" orderType="successor" processScope="ESSP6?type=ProcessPrototype">
+ <runnableGroups runnables="EcuDecelerationSensor?type=Runnable" />
+ <runnableGroups runnables="DecelerationSensorTranslation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="StopLightActuator-->EcuStopLightActuator" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="StopLightActuator?type=Runnable" />
+ <runnableGroups runnables="EcuStopLightActuator?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuVehicleSpeedSensor-->VehicleSpeedSensorTranslation" orderType="successor" processScope="ESSP0?type=ProcessPrototype">
+ <runnableGroups runnables="EcuVehicleSpeedSensor?type=Runnable" />
+ <runnableGroups runnables="VehicleSpeedSensorTranslation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuWheelSpeedSensor-->WheelSpeedSensorDiagnosis" orderType="successor" processScope="ESSP9?type=ProcessPrototype">
+ <runnableGroups runnables="EcuWheelSpeedSensor?type=Runnable" />
+ <runnableGroups runnables="WheelSpeedSensorDiagnosis?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="EcuWheelSpeedSensor-->WheelSpeedSensorTranslation" orderType="successor" processScope="ESSP9?type=ProcessPrototype">
+ <runnableGroups runnables="EcuWheelSpeedSensor?type=Runnable" />
+ <runnableGroups runnables="WheelSpeedSensorTranslation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="IgnitionTiming-->IgnitionTimeActuation" orderType="successor" processScope="ESSP8?type=ProcessPrototype">
+ <runnableGroups runnables="IgnitionTiming?type=Runnable" />
+ <runnableGroups runnables="IgnitionTimeActuation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="TotalFuelMass-->InjectionTimeActuation" orderType="successor" processScope="ESSP3?type=ProcessPrototype">
+ <runnableGroups runnables="TotalFuelMass?type=Runnable" />
+ <runnableGroups runnables="InjectionTimeActuation?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="ThrottleController-->ThrottleActuator" orderType="successor" processScope="ESSP4?type=ProcessPrototype">
+ <runnableGroups runnables="ThrottleController?type=Runnable" />
+ <runnableGroups runnables="ThrottleActuator?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="ThrottleSensor-->ThrottleController" orderType="successor" processScope="ESSP5?type=ProcessPrototype">
+ <runnableGroups runnables="ThrottleSensor?type=Runnable" />
+ <runnableGroups runnables="ThrottleController?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="TransientFuelMass-->TotalFuelMass" orderType="successor" processScope="ESSP3?type=ProcessPrototype">
+ <runnableGroups runnables="TransientFuelMass?type=Runnable" />
+ <runnableGroups runnables="TotalFuelMass?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="VehicleSpeedSensorTranslation-->VehicleSpeedSensorVoter" orderType="successor" processScope="ESSP0?type=ProcessPrototype">
+ <runnableGroups runnables="VehicleSpeedSensorTranslation?type=Runnable" />
+ <runnableGroups runnables="VehicleSpeedSensorVoter?type=Runnable" />
+ </runnableSequencingConstraints>
+ <runnableSequencingConstraints name="WheelSpeedSensorTranslation-->WheelSpeedSensorVoter" orderType="successor" processScope="ESSP9?type=ProcessPrototype">
+ <runnableGroups runnables="WheelSpeedSensorTranslation?type=Runnable" />
+ <runnableGroups runnables="WheelSpeedSensorVoter?type=Runnable" />
+ </runnableSequencingConstraints>
+ </constraintsModel>
+ <mappingModel>
+ <schedulerAllocation scheduler="SCHED_RPI_0+%231?type=TaskScheduler" responsibility="RPI_0?type=ProcessingUnit" />
+ <schedulerAllocation scheduler="SCHED_RPI_1+%232?type=TaskScheduler" responsibility="RPI_1?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP0?type=Task" scheduler="SCHED_RPI_1+%232?type=TaskScheduler" affinity="RPI_1?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP1?type=Task" scheduler="SCHED_RPI_1+%232?type=TaskScheduler" affinity="RPI_1?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP2?type=Task" scheduler="SCHED_RPI_0+%231?type=TaskScheduler" affinity="RPI_0?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP3?type=Task" scheduler="SCHED_RPI_0+%231?type=TaskScheduler" affinity="RPI_0?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP4?type=Task" scheduler="SCHED_RPI_1+%232?type=TaskScheduler" affinity="RPI_1?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP5?type=Task" scheduler="SCHED_RPI_0+%231?type=TaskScheduler" affinity="RPI_0?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP6?type=Task" scheduler="SCHED_RPI_1+%232?type=TaskScheduler" affinity="RPI_1?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP8?type=Task" scheduler="SCHED_RPI_0+%231?type=TaskScheduler" affinity="RPI_0?type=ProcessingUnit" />
+ <taskAllocation task="Task_ESSP9?type=Task" scheduler="SCHED_RPI_0+%231?type=TaskScheduler" affinity="RPI_0?type=ProcessingUnit" />
+ </mappingModel>
+</am:Amalthea>
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ArmCodeFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ArmCodeFileCreation.java
index b689ea5..08d0c4c 100644
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ArmCodeFileCreation.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ArmCodeFileCreation.java
@@ -82,19 +82,34 @@
@SuppressWarnings("resource")
final FileWriter fw = new FileWriter(fn, true);
try {
+ fileUtil.fileMainHeader(f1);
+ runFileHeader(f1);
if (0x3110 == (configFlag & 0xFFF0)) {
- fileUtil.fileMainHeader(f1);
- runFileHeader(f1);
- headerIncludesArmCode(f1);
- nsleep(f1);
- zynqmain(model, f1);
+ if (0x0001 == (0x0001 & configFlag)) {
+ headerIncludesArmCodeforBTF(f1);
+ constructTraceHeader(f1);
+ parseTraceData(f1);
+ zynqmainBTF(model, f1);
+ }
+ else {
+ headerIncludesArmCode(f1);
+ nsleep(f1);
+ zynqmain(model, f1);
+ }
+
}
else {
- fileUtil.fileMainHeader(f1);
- runFileHeader(f1);
- headerIncludesArmCode(f1);
- nsleep(f1);
- zynqmain(model, f1);
+ if (0x0001 == (0x0001 & configFlag)) {
+ headerIncludesArmCodeforBTF(f1);
+ constructTraceHeader(f1);
+ parseTraceData(f1);
+ zynqmainBTF(model, f1);
+ }
+ else {
+ headerIncludesArmCode(f1);
+ nsleep(f1);
+ zynqmain(model, f1);
+ }
}
}
finally {
@@ -317,6 +332,355 @@
}
+
+ /**
+ * main function for the zynq in which we deploy the epiphany binaries
+ * and read the shared and distributed memory area in a loop
+ *
+ * @param model
+ * @param file
+ */
+ private static void zynqmainBTF(final Amalthea model, final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ final MappingModel mappingModel = model.getMappingModel();
+ if (mappingModel != null) {
+ final EList<SchedulerAllocation> processingUnits = model.getMappingModel().getSchedulerAllocation();
+ final ArrayList<SchedulerAllocation> localPU = new ArrayList<SchedulerAllocation>();
+ localPU.addAll(processingUnits);
+ final HashMap<SchedulerAllocation, Long> CoreMap = new HashMap<SchedulerAllocation, Long>();
+ long count = 0;
+ for (final SchedulerAllocation pu : localPU) {
+ CoreMap.put(pu, count);
+ count++;
+ }
+ fw.write("int main(int argc, char *argv[])\n{\n");
+ fw.write("\te_platform_t epiphany;\n");
+ fw.write("\te_epiphany_t dev;\n");
+ fw.write("\te_mem_t emem;\n");
+ fw.write("\tint index = 0;\n");
+ fw.write("\tbtf_trace_info trace_info;\n");
+ fw.write("\ttrace_info.length = 0;\n");
+ fw.write("\ttrace_info.core_write = 0;\n");
+ fw.write("\ttrace_info.offset = 0;\n");
+ fw.write("\ttrace_info.core_id = 0;\n");
+ fw.write("\t/* File pointer to store the BTF data which will be used for\n" +
+ "\tfurther processing. The file generated will be deleted after the processing is done */\n" +
+ "\tFILE *fp_temp = NULL;\n");
+ fw.write("\t/* File pointer to store the BTF trace file */\n" +
+ "\tFILE *fp_to_trace = NULL;\n");
+ fw.write("\tint scale_factor = parse_btf_trace_arguments(argc, argv);\n");
+ fw.write("\tchar trace_file_path[512] = {0};\n");
+ fw.write("\tget_btf_trace_file_path(trace_file_path);\n");
+ fw.write("\tif (strlen((const char *)trace_file_path) != 0)\n" +
+ "\t{\n" +
+ "\t\tfp_to_trace = fopen((const char *)trace_file_path, \"w+\");\n" +
+ "\t\tif (fp_to_trace == NULL)\n" +
+ "\t\t{\n" +
+ "\t\t\tfprintf(stderr,\"Output redirected to stderr\\n\");\n" +
+ "\t\t\tfp_to_trace = stderr;\n" +
+ "\t\t}\n" +
+ "\t}\n" +
+ "\telse\n" +
+ "\t{\n" +
+ "\t\tfprintf(stderr,\"Output redirected to stderr\\n\");\n" +
+ "\t\tfp_to_trace = stderr;\n" +
+ "\t}\n");
+ fw.write("\tconstruct_btf_trace_header(fp_to_trace);\n");
+ fw.write("\tfp_temp = fopen((const char *)\"temp.txt\", \"w+\");\n");
+ fw.write("\tif (fp_temp == NULL)\n");
+ fw.write("\t{\n");
+ fw.write("\t\texit(0);\n");
+ fw.write("\t}\n");
+ fw.write("\te_init(NULL);\n");
+ fw.write("\t/* Reserve the memory for the data in the shared dram region to be shared between\n" +
+ "\t * host and epiphany core. The dram offset starts at 0x01000000 which corresponds\n" +
+ "\t * to the global address as 0x8F000000. */\n" +
+ "\tif (E_OK != e_alloc(&emem, (unsigned int)shared_dram_start_address , SHARED_DRAM_SIZE))\n" +
+ "\t{\n" +
+ "\t\tfprintf(stderr, \"Error in reserving the shared dram buffer\\n\");\n" +
+ "\t}\n");
+ fw.write("\te_reset_system();\n");
+ fw.write("\te_get_platform_info(&epiphany);\n");
+ int coreGroup = 0;
+ if (processingUnits.size() == 1) {
+ coreGroup = 0;
+ }
+ else if (processingUnits.size() > 1 && processingUnits.size() < 5) {
+ coreGroup = 2;
+ }
+ else if (processingUnits.size() > 4 && processingUnits.size() < 10) {
+ coreGroup = 3;
+ }
+ else if (processingUnits.size() > 9 && processingUnits.size() < 17) {
+ coreGroup = 4;
+ }
+ fw.write("\te_open(&dev,0,0," + coreGroup + "," + coreGroup + ");\n");
+ /* Core 1 */
+ // 00
+ /* Core 2 */
+ // 00 10
+ // 01 11
+ /* Core 3 */
+ // 00 10 20
+ // 01 11 21
+ // 02 12 22
+ /* Core 4 */
+ // 00 10 20 30
+ // 01 11 21 31
+ // 02 12 22 32
+ // 03 13 23 33
+
+ fw.write("\te_reset_group(&dev);\n");
+ int k = 0;
+ final ArrayList<String> result = new ArrayList<String>();
+ for (int i = 0; i < localPU.size(); i++) {
+ for (int j = 0; j < localPU.size(); j++) {
+ if (k < localPU.size()) {
+ fw.write("\te_return_stat_t\tresult" + k + ";\n");
+ k++;
+ }
+
+ }
+ }
+ int k3 = 0;
+ for (int rowCoreGroup = 0; rowCoreGroup < localPU.size(); rowCoreGroup++) {
+ for (int columnCoreGroup = 0; columnCoreGroup < localPU.size(); columnCoreGroup++) {
+ if (k3 < localPU.size()) {
+ fw.write("\tunsigned int ecore" + k3 + "[RTF_DEBUG_TRACE_COUNT];\n");
+ k3++;
+ }
+ }
+ }
+ int coreIndex = 0;
+ for (int rowCoreGroup = 0; rowCoreGroup < coreGroup; rowCoreGroup++) {
+ for (int columnCoreGroup = 0; columnCoreGroup < coreGroup; columnCoreGroup++) {
+ if (coreIndex < localPU.size()) {
+ fw.write("\tresult" + coreIndex + "= e_load(\"main" + coreIndex + ".elf\",&dev,"
+ + columnCoreGroup + "," + rowCoreGroup + ",E_FALSE);\n");
+ result.add("result" + coreIndex + "!=E_OK");
+ coreIndex++;
+ }
+ }
+ }
+ String resultFinal = "";
+ for (int k2 = 0; k2 < result.size(); k2++) {
+ // System.out.println("Size ==> "+result.size());
+ resultFinal = resultFinal + (result.get(k2) + "||");
+ if (k2 == (result.size() - 2)) {
+ k2++;
+ resultFinal = resultFinal + result.get(k2);
+ break;
+ }
+ }
+ coreIndex = 0;
+ for (int rowCoreGroup = 0; rowCoreGroup < localPU.size() & rowCoreGroup < 4; rowCoreGroup++) {
+ for (int columnCore = 0; columnCore < localPU.size() & columnCore < 4; columnCore++) {
+ if (coreIndex < localPU.size()) {
+ if (coreIndex == 0) {
+ fw.write("\tif (result" + coreIndex + "!=E_OK){\n");
+ }
+ else {
+ fw.write("\telse if (result" + coreIndex + "!=E_OK){\n");
+ }
+ fw.write("\t\tfprintf(stderr,\"Error Loading the Epiphany Application " + coreIndex
+ + " %i\\n\", result" + coreIndex + ");");
+ fw.write("\n\t}\n");
+ coreIndex++;
+ }
+ }
+ }
+ fw.write("\t/* Write the time unit used for the configuration of the clock cycle per tick */\n" +
+ "\tif (sizeof(int) != e_write(&emem, 0, 0, INPUT_TIMESCALE_OFFSET, &scale_factor, sizeof(int)))\n" +
+ "\t{\n" +
+ "\t\tfprintf(stderr, \"Error in writing to the shared dram buffer\\n\");\n" +
+ "\t}\n");
+ fw.write("\t/* Write the initialized trace buffer values to the shared memory */\n" +
+ "\tif (sizeof(btf_trace_info) != e_write(&emem, 0, 0, SHARED_BTF_DATA_OFFSET, &trace_info,\n" +
+ "\t\t\tsizeof(btf_trace_info)))\n" +
+ "\t{\n" +
+ "\t\tfprintf(stderr, \"Error in writing to the shared dram buffer\\n\");\n" +
+ "\t}\n");
+
+ fw.write("\te_start_group(&dev);\n");
+ fw.write("\tfprintf(stderr,\"RMS Multicore on FreeRTOS started \\n\");\n");
+ fw.write("\tint pollLoopCounter = 0;\n");
+ fw.write("\tunsigned int btf_trace[BTF_TRACE_BUFFER_SIZE * 6] = {0};\n");
+ fw.write("\tunsigned int core_id = 0;\n");
+ fw.write("\tunsigned char btf_data_index = 0;\n");
+ fw.write("\tunsigned int btf_data_start_offset = (SHARED_BTF_DATA_OFFSET + sizeof(btf_trace_info));\n");
+ fw.write("\tfor (pollLoopCounter=0;pollLoopCounter<=100000;pollLoopCounter++){\n");
+ fw.write("\t\te_read(&emem, 0, 0, SHARED_BTF_DATA_OFFSET , &trace_info, sizeof(btf_trace_info));\n");
+ fw.write("\t\tif (trace_info.core_write == 1)\r\n\t\t{\n");
+ fw.write("\t\t\te_read(&emem, 0, 0, SHARED_BTF_DATA_OFFSET , &trace_info, sizeof(btf_trace_info));\n");
+ fw.write("\t\t\te_read(&emem, 0, 0, (btf_data_start_offset + (trace_info.offset * sizeof(int))),\n" +
+ "\t\t\t\t\t\t\t\t&btf_trace, BTF_TRACE_BUFFER_SIZE * sizeof(int) * trace_info.length);\n");
+ fw.write("\t\t\tfor(btf_data_index = 0; btf_data_index < trace_info.length; btf_data_index++)\n" +
+ "\t\t\t{\n" +
+ "\t\t\t\tuint16_t offset = btf_data_index * BTF_TRACE_BUFFER_SIZE;\n" +
+ "\t\t\t\tbuffer_count += sprintf( &file_buffer[buffer_count], \"%d %d %d %d %d %d %d %d %d\\n\",\n" +
+ "\t\t\t\t\t\ttrace_info.core_id, btf_trace[offset],\n" +
+ "\t\t\t\t\t\tbtf_trace[offset + 1], btf_trace[offset+2], btf_trace[offset+3],\n" +
+ "\t\t\t\t\t\tbtf_trace[offset+4], btf_trace[offset+5], btf_trace[offset+6],\n" +
+ "\t\t\t\t\t\tbtf_trace[offset+7]);\n" +
+ "\t\t\t}\n\n");
+ fw.write("\t\t\tif( buffer_count >= CHUNK_SIZE )\n" +
+ "\t\t\t{\n" +
+ "\t\t\t\tfwrite( file_buffer, buffer_count, 1, fp_temp ) ;\n" +
+ "\t\t\t\tbuffer_count = 0 ;\n" +
+ "\t\t\t}\n\n");
+ fw.write("\t\t\ttrace_info.core_write = 0;\n");
+ fw.write("\t\t\te_write(&emem, 0, 0, SHARED_BTF_DATA_OFFSET + offsetof(btf_trace_info, core_write),\n" +
+ "\t\t\t\t\t&trace_info.core_write, sizeof(int));\n");
+ fw.write("\t\t}\n");
+ fw.write("\t}\n");
+ fw.write("\t// Write remainder\n" +
+ "\tif( buffer_count > 0 )\n" +
+ "\t{\n" +
+ "\t\tfwrite( file_buffer, buffer_count, 1, fp_temp );\n" +
+ "\t}\n");
+ fw.write("\tfprintf(stderr,\"----------------------------------------------\\n\");\n");
+ fw.write("\tif (fp_temp != NULL)\n" +
+ "\t{\n" +
+ "\t\tfclose(fp_temp);\n" +
+ "\t\tfp_temp = NULL;\n" +
+ "\t}\n");
+ fw.write("\t/* Parse the trace data and store the trace file */\n" +
+ "\tparse_trace_data(fp_to_trace);\n");
+ fw.write("\tif (fp_to_trace != NULL)\n" +
+ "\t{\n" +
+ "\t\tfclose(fp_to_trace);\n" +
+ "\t\tfp_to_trace = NULL;\n" +
+ "\t}\n");
+ fw.write("\te_close(&dev);\n");
+ fw.write("\te_finalize();\n");
+ fw.write("\tfprintf(stderr,\"RMS Multicore on FreeRTOS Complete \\n \");\n");
+ fw.write("\treturn 0;\n");
+ fw.write("}\n");
+ fw.close();
+ }
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Parsing the BTF trace header raw data
+ *
+ * @param file
+ */
+ private static void parseTraceData(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("static void parse_trace_data(FILE *trace)\n" +
+ "{\n" +
+ " FILE *fp_temp = NULL;\n" +
+ " unsigned int trace_data[BTF_TRACE_BUFFER_SIZE];\n" +
+ " unsigned int active_row;\n" +
+ " if (trace == NULL )\n" +
+ " {\n" +
+ " return;\n" +
+ " }\n" +
+ " fp_temp = fopen((const char *)\"temp.txt\", \"r\");\n" +
+ " if (fp_temp == NULL)\n" +
+ " {\n" +
+ " exit(1);\n" +
+ " }\n" +
+ " while( fscanf(fp_temp, \"%d %d %d %d %d %d %d %d %d\\n\"\n" +
+ " , &active_row, &trace_data[0], &trace_data[1], &trace_data[2],\n" +
+ " &trace_data[3], &trace_data[4], &trace_data[5], &trace_data[6],\n" +
+ " &trace_data[7]) != EOF )\n" +
+ " {\n" +
+ " write_btf_trace_data(trace, active_row, trace_data);\n" +
+ " }\n" +
+ " if (fp_temp != NULL)\n" +
+ " {\n" +
+ " fclose(fp_temp);\n" +
+ " fp_temp = NULL;\n" +
+ " }\n" +
+ " remove(\"temp.txt\");\n" +
+ "}\n\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Code to insert the construction of trace header in armCode file
+ *
+ * @param file
+ */
+ private static void constructTraceHeader(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("static void construct_btf_trace_header(FILE *stream)\n" +
+ "{\n" +
+ " write_btf_trace_header_config(stream);\n" +
+ " write_btf_trace_header_entity_type(stream, TASK_EVENT);\n" +
+ " write_btf_trace_header_entity_type(stream, RUNNABLE_EVENT);\n" +
+ " write_btf_trace_header_entity_type(stream, SIGNAL_EVENT);\n" +
+ " generate_task_entity_table();\n" +
+ " generate_runnable_entity_table();\n" +
+ " generate_signal_entity_table();\n" +
+ " generate_hw_entity_table();\n" +
+ " write_btf_trace_header_entity_table(stream);\n" +
+ " write_btf_trace_header_entity_type_table(stream);\n" +
+ "}\n\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+
+ }
+
+ /**
+ * header inclusion for armCode file
+ *
+ * @param file
+ */
+ private static void headerIncludesArmCodeforBTF(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("/* Standard includes. */\n");
+ fw.write("#include <stdio.h>\n");
+ fw.write("#include <stdlib.h>\n");
+ fw.write("#include <string.h>\n");
+ fw.write("#include <stddef.h>\n");
+ fw.write("#include <unistd.h>\n");
+ fw.write("#include <e-hal.h>\n");
+ fw.write("#include <e-loader.h>\n");
+ fw.write("#include <time.h>\n\n");
+ fw.write("/* Scheduler includes. */\n");
+ fw.write("#include \"RTFParallellaConfig.h\"\n");
+ fw.write("#include \"host_utils.h\"\n");
+ fw.write("#include \"model_enumerations.h\"\n");
+ fw.write("#include \"trace_utils_BTF.h\"\n");
+ fw.write("\n\n\n");
+ fw.write("#define CHUNK_SIZE 4096\n");
+ fw.write("char file_buffer[CHUNK_SIZE + 256];\n");
+ fw.write("static int buffer_count = 0;\n\n\n");
+ fw.write("unsigned int shared_dram_start_address = SHARED_DRAM_START_OFFSET;\n\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+
+ }
/**
* header inclusion for armCode file
*
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/FreeRTOSConfigFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/FreeRTOSConfigFileCreation.java
index 7fdf04b..4fcb049 100755
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/FreeRTOSConfigFileCreation.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/FreeRTOSConfigFileCreation.java
@@ -98,6 +98,9 @@
fw.write("\t#ifndef FREERTOS_CONFIG_H\n");
fw.write("\t#define FREERTOS_CONFIG_H\n");
fw.write("//-----------------------------------------------------------\n");
+ if (0x0001 == (0x0001 & configFlag)) {
+ fw.write("\t#include \"RTFParallellaConfig.h\"\n");
+ }
fw.write("\t#define configCALL_STACK_SIZE 0x50\n");
if (0x0020 == (configFlag & 0x00F0)) {
fw.write("\t#define configUSE_PREEMPTION 1\n");
@@ -109,12 +112,22 @@
fw.write("\t#define configUSE_IDLE_HOOK 0\n");
fw.write("\t#define configUSE_TICK_HOOK 0\n");
fw.write("\t#define configCPU_CLOCK_HZ ( ( unsigned long ) 700000000 )\n");
- fw.write("\t#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\n");
- fw.write("\t#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) " + (taskSize + constval)
- + " )\n");
- fw.write("\t#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 0x200) //512 words\n");
- fw.write("\t#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10450 ) )\n");
- fw.write("\t#define configMAX_TASK_NAME_LEN ( 128 )\n");
+ if (0x0001 == (0x0001 & configFlag)) {
+ fw.write("\t#define configTICK_RATE_HZ ( ( TickType_t ) execution_time_scale )\n");
+ fw.write("\t#define configMAX_PRIORITIES ( " + (taskSize + constval)
+ + " )\n");
+ fw.write("\t#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 112) //274 words\n");
+ fw.write("\t#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10240 ) )\n");
+ fw.write("\t#define configMAX_TASK_NAME_LEN ( 48 )\n");
+ }
+ else {
+ fw.write("\t#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )\n");
+ fw.write("\t#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) " + (taskSize + constval)
+ + " )\n");
+ fw.write("\t#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 0x200) //512 words\n");
+ fw.write("\t#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10450 ) )\n");
+ fw.write("\t#define configMAX_TASK_NAME_LEN ( 128 )\n");
+ }
fw.write("\t#define configUSE_TRACE_FACILITY 0\n");
fw.write("\t#define configUSE_16_BIT_TICKS 1\n");
fw.write("\t#define configIDLE_SHOULD_YIELD 0\n");
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MainRMSFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MainRMSFileCreation.java
index 16e3261..4e1acab 100644
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MainRMSFileCreation.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MainRMSFileCreation.java
@@ -99,11 +99,21 @@
fileUtil.fileMainHeader(f1);
mainFileHeader(f1);
if ((0x0100 == (0x0F00 & configFlag)) & (0x3000 == (0xF000 & configFlag))) {
- headerIncludesMainRMS(f1, k);
- mainTaskStimuli(model, f1, tasks);
- mainTaskPriority(f1, tasks);
- mainFucntionRMS(model, f1, tasks);
- // SharedLabelDeclarationHead(f1, model);
+ if (0x0001 == (0x0001 & configFlag)) {
+ headerIncludesMainRMS(f1, k, true);
+ mainTaskStimuli(model, f1, tasks);
+ mainTaskPriority(f1, tasks);
+ mainFucntionRMS(model, f1, tasks, true);
+ // SharedLabelDeclarationHead(f1, model);
+ }
+ else {
+ headerIncludesMainRMS(f1, k, false);
+ mainTaskStimuli(model, f1, tasks);
+ mainTaskPriority(f1, tasks);
+ mainFucntionRMS(model, f1, tasks, false);
+ // SharedLabelDeclarationHead(f1, model);
+ }
+
}
else {
headerIncludesMainFreeRTOS(f1, k);
@@ -130,14 +140,23 @@
* @param model
* @param file
* @param tasks
+ * @param btfEnable
*/
- private static void mainFucntionRMS(final Amalthea model, final File file, final Set<Task> tasks) {
+ private static void mainFucntionRMS(final Amalthea model, final File file, final Set<Task> tasks, final boolean btfEnable) {
try {
final File fn = file;
@SuppressWarnings("resource")
final FileWriter fw = new FileWriter(fn, true);
fw.write("int main(void) \n{\n");
- fw.write("\toutbuf_init();\n");
+ if (btfEnable == true) {
+ fw.write("\tinit_btf_mem_section();\n");
+ fw.write("\tinit_task_trace_buffer();\n");
+ fw.write("\tint ts = get_time_scale_factor();\n");
+ }
+ else {
+ fw.write("\toutbuf_init();\n");
+ }
+
final List<Label> SharedLabelList = LabelFileCreation.SharedLabelFinder(model);
final List<Label> SharedLabelListSortCore = new ArrayList<Label>();
if (SharedLabelList.size() == 0) {
@@ -178,60 +197,144 @@
}
SharedLabelCounter = 0;
}
-
- for (final Task task : tasks) {
- final MappingModel mappingModel = model.getMappingModel();
- ProcessingUnit pu = null;
- if (mappingModel != null) {
- pu = DeploymentUtil.getAssignedCoreForProcess(task, model).iterator().next();
- Time taskTime = RuntimeUtil.getExecutionTimeForProcess(task, pu, null, TimeType.WCET);
- taskTime = TimeUtil.convertToTimeUnit(taskTime, TimeUnit.MS);
- final BigInteger sleepTime = taskTime.getValue();
- final BigInteger b2 = new BigInteger("1000");
- final int comparevalue = sleepTime.compareTo(b2);
- if (comparevalue < 0) {
- fw.write("\tAmaltheaTask AmalTk_" + task.getName() + " = createAmaltheaTask( v" + task.getName()
- + ", cIN_" + task.getName() + ", cOUT_" + task.getName() + ", "
- + task.getStimuli().get(0).getName() + ", " + task.getStimuli().get(0).getName()
- + ", 1);\n");
- }
- else {
- fw.write("\tAmaltheaTask AmalTk_" + task.getName() + " = createAmaltheaTask( v" + task.getName()
- + ", cIN_" + task.getName() + ", cOUT_" + task.getName() + ", "
- + task.getStimuli().get(0).getName() + ", " + task.getStimuli().get(0).getName() + ", "
- + sleepTime + ");\n");
+
+ if (btfEnable == true) {
+ final List<Task> localTaskPriority = new ArrayList<Task>();
+ localTaskPriority.addAll(tasks);
+ @SuppressWarnings("resource")
+ final HashMap<Task, Long> periodMap = new HashMap<Task, Long>();
+ for (final Task task : tasks) {
+ final long period = fileUtil.getRecurrence(task).getValue().longValue();
+ periodMap.put(task, period);
+ }
+ final Map<Task, Long> periodMapSorted = fileUtil.sortByValue(periodMap);
+ for (int i = (periodMapSorted.size()), k = 0; i > 0; i--, k++) {
+ final Task task = (Task) periodMapSorted.keySet().toArray()[k];
+ final MappingModel mappingModel = model.getMappingModel();
+ ProcessingUnit pu = null;
+ if (mappingModel != null) {
+ pu = DeploymentUtil.getAssignedCoreForProcess(task, model).iterator().next();
+ Time taskTime = RuntimeUtil.getExecutionTimeForProcess(task, pu, null, TimeType.WCET);
+ taskTime = TimeUtil.convertToTimeUnit(taskTime, TimeUnit.MS);
+ final BigInteger sleepTime = taskTime.getValue();
+ final BigInteger b2 = new BigInteger("1000");
+ final int comparevalue = sleepTime.compareTo(b2);
+ if (comparevalue < 0) {
+ fw.write("\tAmaltheaTask AmalTk_" + task.getName() + " = createAmaltheaTask( v" + task.getName()
+ + ", cIN_" + task.getName() + ", cOUT_" + task.getName() + ",\n\t\t\t "
+ + task.getStimuli().get(0).getName() + "*ts, " + task.getStimuli().get(0).getName()
+ + "*ts, 1*ts, "+ pu.getName()+"_ID, 0, 0, 0);\n");
+ }
+ else {
+ fw.write("\tAmaltheaTask AmalTk_" + task.getName() + " = createAmaltheaTask( v" + task.getName()
+ + ", cIN_" + task.getName() + ", cOUT_" + task.getName() + ",\n\t\t\t "
+ + task.getStimuli().get(0).getName() + "*ts, " + task.getStimuli().get(0).getName() + "*ts, "
+ + sleepTime + "*ts, "+ pu.getName()+"_ID, 0, 0, 0);\n");
+ }
}
}
}
- for (final Task task : tasks) {
- final Set<Label> taskLabel = SoftwareUtil.getAccessedLabelSet(task, null);
- final List<Label> taskLabelList = new ArrayList<>(taskLabel);
- final HashMap<Label, String> LabelTypeMap = new HashMap<Label, String>();
- for (final Label tl : taskLabelList) {
- LabelTypeMap.put(tl, tl.getSize().toString());
- }
- final List<String> TypeList = new ArrayList<>(
- LabelTypeMap.values().stream().distinct().collect(Collectors.toList()));
- final List<Label> LabelList = new ArrayList<>(
- LabelTypeMap.keySet().stream().distinct().collect(Collectors.toList()));
- fw.write("\tcreateRTOSTask( &AmalTk_" + task.getName() + ", main" + task.getName() + ", "
- + TypeList.size() + ",");
- final List<Label> dataTypeList = new ArrayList<Label>();
- int k = 0;
- for (final String tl : TypeList) {
- fw.write(fileUtil.datatypeSize(tl) + ", ");
- for (final Label La : LabelList) {
- if (LabelTypeMap.get(La).contains(tl) && (SharedLabelListSortCore.contains(La))) {
- dataTypeList.add(La);
+ else {
+ for (final Task task : tasks) {
+ final MappingModel mappingModel = model.getMappingModel();
+ ProcessingUnit pu = null;
+ if (mappingModel != null) {
+ pu = DeploymentUtil.getAssignedCoreForProcess(task, model).iterator().next();
+ Time taskTime = RuntimeUtil.getExecutionTimeForProcess(task, pu, null, TimeType.WCET);
+ taskTime = TimeUtil.convertToTimeUnit(taskTime, TimeUnit.MS);
+ final BigInteger sleepTime = taskTime.getValue();
+ final BigInteger b2 = new BigInteger("1000");
+ final int comparevalue = sleepTime.compareTo(b2);
+ if (comparevalue < 0) {
+ fw.write("\tAmaltheaTask AmalTk_" + task.getName() + " = createAmaltheaTask( v" + task.getName()
+ + ", cIN_" + task.getName() + ", cOUT_" + task.getName() + ", "
+ + task.getStimuli().get(0).getName() + ", " + task.getStimuli().get(0).getName()
+ + ", 1);\n");
+ }
+ else {
+ fw.write("\tAmaltheaTask AmalTk_" + task.getName() + " = createAmaltheaTask( v" + task.getName()
+ + ", cIN_" + task.getName() + ", cOUT_" + task.getName() + ", "
+ + task.getStimuli().get(0).getName() + ", " + task.getStimuli().get(0).getName() + ", "
+ + sleepTime + ");\n");
}
}
- fw.write("" + dataTypeList.size() + "");
- k++;
- if (k < TypeList.size()) {
- fw.write(", ");
- }
}
- fw.write(");\n");
+
+ }
+
+ if (btfEnable == true) {
+ final List<Task> localTaskPriority = new ArrayList<Task>();
+ localTaskPriority.addAll(tasks);
+ @SuppressWarnings("resource")
+ final HashMap<Task, Long> periodMap = new HashMap<Task, Long>();
+ for (final Task task : tasks) {
+ final long period = fileUtil.getRecurrence(task).getValue().longValue();
+ periodMap.put(task, period);
+ }
+ final Map<Task, Long> periodMapSorted = fileUtil.sortByValue(periodMap);
+ for (int i = (periodMapSorted.size()), k = 0; i > 0; i--, k++) {
+ final Task task = (Task) periodMapSorted.keySet().toArray()[k];
+ final Set<Label> taskLabel = SoftwareUtil.getAccessedLabelSet(task, null);
+ final List<Label> taskLabelList = new ArrayList<>(taskLabel);
+ final HashMap<Label, String> LabelTypeMap = new HashMap<Label, String>();
+ for (final Label tl : taskLabelList) {
+ LabelTypeMap.put(tl, tl.getSize().toString());
+ }
+ final List<String> TypeList = new ArrayList<>(
+ LabelTypeMap.values().stream().distinct().collect(Collectors.toList()));
+ final List<Label> LabelList = new ArrayList<>(
+ LabelTypeMap.keySet().stream().distinct().collect(Collectors.toList()));
+ fw.write("\tcreateRTOSTask( &AmalTk_" + task.getName() + ", main" + task.getName() + ", "
+ + TypeList.size() + ",");
+ final List<Label> dataTypeList = new ArrayList<Label>();
+ int j = 0;
+ for (final String tl : TypeList) {
+ fw.write(fileUtil.datatypeSize(tl) + ", ");
+ for (final Label La : LabelList) {
+ if (LabelTypeMap.get(La).contains(tl) && (SharedLabelListSortCore.contains(La))) {
+ dataTypeList.add(La);
+ }
+ }
+ fw.write("" + dataTypeList.size() + "");
+ j++;
+ if (j < TypeList.size()) {
+ fw.write(", ");
+ }
+ }
+ fw.write(");\n");
+ }
+ }
+ else {
+ for (final Task task : tasks) {
+ final Set<Label> taskLabel = SoftwareUtil.getAccessedLabelSet(task, null);
+ final List<Label> taskLabelList = new ArrayList<>(taskLabel);
+ final HashMap<Label, String> LabelTypeMap = new HashMap<Label, String>();
+ for (final Label tl : taskLabelList) {
+ LabelTypeMap.put(tl, tl.getSize().toString());
+ }
+ final List<String> TypeList = new ArrayList<>(
+ LabelTypeMap.values().stream().distinct().collect(Collectors.toList()));
+ final List<Label> LabelList = new ArrayList<>(
+ LabelTypeMap.keySet().stream().distinct().collect(Collectors.toList()));
+ fw.write("\tcreateRTOSTask( &AmalTk_" + task.getName() + ", main" + task.getName() + ", "
+ + TypeList.size() + ",");
+ final List<Label> dataTypeList = new ArrayList<Label>();
+ int k = 0;
+ for (final String tl : TypeList) {
+ fw.write(fileUtil.datatypeSize(tl) + ", ");
+ for (final Label La : LabelList) {
+ if (LabelTypeMap.get(La).contains(tl) && (SharedLabelListSortCore.contains(La))) {
+ dataTypeList.add(La);
+ }
+ }
+ fw.write("" + dataTypeList.size() + "");
+ k++;
+ if (k < TypeList.size()) {
+ fw.write(", ");
+ }
+ }
+ fw.write(");\n");
+ }
}
fw.write("\tvTaskStartScheduler();\n");
fw.write("\t" + "return EXIT_SUCCESS;\n");
@@ -347,8 +450,10 @@
* MainRMSFileCreation Header inclusion
*
* @param file
+ * @param k - Core-id
+ * @param btfEnable
*/
- private static void headerIncludesMainRMS(final File file, final int k) {
+ private static void headerIncludesMainRMS(final File file, final int k, final boolean btfEnable) {
try {
final File fn = file;
@SuppressWarnings("resource")
@@ -368,6 +473,9 @@
fw.write("#include \"taskDef" + k + ".h\"\n");
fw.write("#include \"shared_comms.h\"\n\n");
fw.write("#include \"label" + k + ".h\"\n");
+ if (btfEnable == true) {
+ fw.write("#include \"RTFParallellaConfig.h\"\n");
+ }
// fw.write("#include \"c2c.h\"\n\n");
// fw.write("#define READ_PRECISION_US 1000\n\n\n");
fw.close();
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MakeFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MakeFileCreation.java
index a57b805..4289b25 100644
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MakeFileCreation.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/MakeFileCreation.java
@@ -55,7 +55,13 @@
try {
// fileUtil.fileMainHeader(f1);
makeFileHeader(f1);
- headerIncludesMainRMS(f1, CoreNo);
+ if (0x0001 == (0x0001 & configFlag)) {
+ headerIncludesMainRMS(f1, CoreNo, true);
+ }
+ else {
+ headerIncludesMainRMS(f1, CoreNo, false);
+ }
+
}
finally {
try {
@@ -86,7 +92,7 @@
}
}
- private static void headerIncludesMainRMS(final File f1, final EList<SchedulerAllocation> coreNo) {
+ private static void headerIncludesMainRMS(final File f1, final EList<SchedulerAllocation> coreNo, final boolean btfEnable) {
try {
final File fn = f1;
@SuppressWarnings("resource")
@@ -103,6 +109,9 @@
fw.write("DEPS = $(FREERTOSSRC)/portable/GCC/Epiphany/");
fw.write("portmacro.h ");
fw.write("Makefile ");
+ if (btfEnable == true) {
+ fw.write("RTFParallellaConfig.h ");
+ }
fw.write("FreeRTOSConfig.h ");
fw.write("debugFlags.h ");
fw.write("AmaltheaConverter.h ");
@@ -116,12 +125,18 @@
for (coreIndex = 0; coreIndex < coreNo.size(); coreIndex++) {
fw.write("runnable" + coreIndex + ".h ");
}
- fw.write("ParallellaUtils.h \n");
+ if (btfEnable == true) {
+ fw.write("ParallellaUtils.h trace_utils_BTF.h \n");
+ fw.write("DEPSHOST = RTFParallellaConfig.h model_enumerations.h host_utils.h trace_utils_BTF.h \n");
+ }
+ else {
+ fw.write("ParallellaUtils.h \n");
+ }
fw.write("#Epiphany SDK dependencies\n");
- fw.write("ESDK=${EPIPHANY_HOME} \n");
- fw.write("ELIBS=${ESDK}/tools/host.armv7l/lib \n");
- fw.write("EINCS=${ESDK}/tools/host.armv7l/include \n");
- fw.write("ELDF=${ESDK}/bsps/current/fast.ldf \n");
+ fw.write("ESDK:=${EPIPHANY_HOME} \n");
+ fw.write("ELIBS:=${EPIPHANY_HOME}/tools/host.armv7l/lib \n");
+ fw.write("EINCS:=${EPIPHANY_HOME}/tools/host.armv7l/include \n");
+ fw.write("ELDF:=${EPIPHANY_HOME}/bsps/current/fast.ldf \n");
fw.write("EHDF=${EPIPHANY_HDF} \n");
fw.write("#search paths for C source code files \n");
fw.write(
@@ -150,8 +165,15 @@
fw.write("ParallellaUtils.o shared_comms.o %.o \n");
fw.write(" $(CC) -g -T$< -Wl,--gc-sections -o $@ $(filter-out $<,$^) -le-lib\n\n");
fw.write("#host target\n");
- fw.write("armcode: armcode.c $(DEPS)\n");
- fw.write(" $(LCC) $< -o $@ -I ${EINCS} -L ${ELIBS} -lpal -le-hal -le-loader -lpthread\n");
+ if (btfEnable == true) {
+ fw.write("armcode: armcode.c $(DEPSHOST)\n");
+ fw.write(" $(LCC) $< -o $@ host_utils.c model_enumerations.c trace_utils_BTF.c -I ${EINCS} -L ${ELIBS} -lpal -le-hal -le-loader -lpthread\n");
+ }
+ else {
+ fw.write("armcode: armcode.c $(DEPS)\n");
+ fw.write(" $(LCC) $< -o $@ -I ${EINCS} -L ${ELIBS} -lpal -le-hal -le-loader -lpthread\n");
+ }
+
fw.write("#clean target\n");
fw.write("clean:\n");
fw.write(" rm -f *.o *.srec *.elf armcode\n\n");
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ModelEnumFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ModelEnumFileCreation.java
new file mode 100644
index 0000000..04b9de2
--- /dev/null
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/ModelEnumFileCreation.java
@@ -0,0 +1,353 @@
+/*******************************************************************************
+ * Copyright (c) 2019 Dortmund University of Applied Sciences and Arts and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Dortmund University of Applied Sciences and Arts - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.cdgen;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.model.Amalthea;
+import org.eclipse.app4mc.amalthea.model.Label;
+import org.eclipse.app4mc.amalthea.model.ProcessingUnit;
+import org.eclipse.app4mc.amalthea.model.SchedulerAllocation;
+import org.eclipse.app4mc.amalthea.model.Task;
+import org.eclipse.app4mc.amalthea.model.util.DeploymentUtil;
+import org.eclipse.app4mc.cdgen.utils.fileUtil;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * Declaration of Amalthea model task components which will be used to
+ * extract the ASCII data from the raw BTF data received from the Epiphany
+ * cores
+ *
+ */
+
+/**
+ * @author anand prakash
+ *
+ */
+public class ModelEnumFileCreation {
+ final private Amalthea model;
+
+ /**
+ * Constructor ModelFileCreation
+ *
+ * @param Model
+ * Amalthea Model
+ * @param srcPath
+ * @throws IOException
+ */
+ public ModelEnumFileCreation(final Amalthea Model, final String srcPath) throws IOException {
+ this.model = Model;
+ System.out.println("Model Enumeration File Creation Begins");
+ fileCreate(this.model, srcPath);
+ System.out.println("Model Enumeration File Creation Ends");
+ }
+
+ /**
+ * FileCreation ModelEnumeration
+ *
+ * @param model
+ * @param srcPath
+ * @throws IOException
+ */
+ private static void fileCreate(final Amalthea model, final String srcPath) throws IOException {
+ final EList<Label> labellist = model.getSwModel().getLabels();
+ final String fname1 = srcPath + File.separator + "model_enumerations.c";
+ final String fname2 = srcPath + File.separator + "model_enumerations.h";
+ final File f2 = new File(srcPath);
+ final File f1 = new File(fname1);
+ final File f3 = new File(fname2);
+ f2.mkdirs();
+ try {
+ f1.createNewFile();
+ }
+ catch (final IOException e) {
+ e.printStackTrace();
+ }
+
+ final File fn1 = f1;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn1, true);
+ try {
+ fileUtil.fileMainHeader(f1);
+ modelEnumFileHeader(f1);
+ headerIncludesModelEnum(f1);
+ modelEnumDeclaration(f1, model, labellist);
+ }
+ finally {
+ try {
+ fw.close();
+ }
+ catch (final IOException e) {
+ e.printStackTrace();
+ }
+ }
+ try {
+ fileUtil.fileMainHeader(f3);
+ modelEnumFileHeaderHead(f3);
+ headerIncludesModelEnumHead(f3);
+ }
+ finally {
+ try {
+ fw.close();
+ }
+ catch (final IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Title card - Model Enumeration File Creation
+ *
+ * @param file
+ */
+ private static void modelEnumFileHeader(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("*Title : Model Enumaration Declaration\n");
+ fw.write("*Description : Declaration of model containing tasks and hardware interface\n");
+ fw.write("******************************************************************\n");
+ fw.write("******************************************************************/\n\n\n");
+
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+ /**
+ * Title card - Model Enumeration
+ *
+ * @param file
+ */
+ private static void modelEnumFileHeaderHead(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("*Title : Model Enum Declaration\n");
+ fw.write("*Description : Header file for Declaration of Amalthea model\n");
+ fw.write("******************************************************************\n");
+ fw.write("******************************************************************/\n\n\n");
+
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Header inclusion - Model enumeration
+ *
+ * @param file
+ */
+ private static void headerIncludesModelEnumHead(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("#ifndef SRC_PARALLELLA_MODEL_ENUMERATIONS_H_\n");
+ fw.write("#define SRC_PARALLELLA_MODEL_ENUMERATIONS_H_\n\n");
+
+ fw.write("/* Standard includes. */\n");
+ fw.write("#include <stdlib.h>\n");
+ fw.write("#include <stdint.h>\n\n\n\n");
+ fw.write("#define SHM_LABEL_COUNT 10\n\n");
+ fw.write("#define DSHM_LABEL_COUNT 10\n\n");
+ fw.write("#define LABEL_STRLEN 32\n\n");
+ fw.write("#define EXEC_TASK_COUNT 5\n\n");
+ fw.write("#define EXEC_CORE_COUNT 2\n\n");
+ fw.write("#define SHM_VISIBLE_LABEL_COUNT 2\n\n");
+ fw.write("#define DSHM_VISIBLE_LABEL_COUNT 2\n\n");
+ fw.write("void generate_task_entity_table(void);\n\n");
+ fw.write("void generate_runnable_entity_table(void);\n\n");
+ fw.write("void generate_signal_entity_table(void);\n\n");
+ fw.write("void generate_hw_entity_table(void);\n\n");
+ fw.write("void get_SHM_label_name (int index,char str[]);\n\n");
+ fw.write("void get_DSHM_label_name(int index,char str[]);\n\n");
+ fw.write("void get_task_name(int index,char *str);\n\n");
+ fw.write("void get_visible_label_index(unsigned array[],unsigned mem_type);\n\n");
+
+ fw.write("#endif\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Header inclusion - Model Enumeration
+ *
+ * @param file
+ */
+ private static void headerIncludesModelEnum(final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("/* Standard includes. */\n");
+ fw.write("#include \"model_enumerations.h\"\n");
+ fw.write("#include \"RTFParallellaConfig.h\"\n");
+ fw.write("#include \"trace_utils_BTF.h\"\n");
+ fw.write("\n\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Model enumeration declaration list
+ *
+ * @param file
+ * @param model
+ * @param labellist
+ */
+ private static void modelEnumDeclaration(final File file, final Amalthea model, final EList<Label> labellist) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ FileWriter fw = new FileWriter(fn, true);
+ fw.write("static const char task_enum [][LABEL_STRLEN] =\n");
+ fw.write("{\n");
+ fw.write("\t\"[idle]\",\n");
+ fw.close();
+ final EList<SchedulerAllocation> CoreNo = model.getMappingModel().getSchedulerAllocation();
+ for (final SchedulerAllocation c : CoreNo) {
+ final ProcessingUnit pu = c.getResponsibility().get(0);
+ final Set<Task> tasks = DeploymentUtil.getTasksMappedToCore(pu, model);
+ writeTaskEnum(model, file, tasks);
+ }
+ fw = new FileWriter(fn, true);
+ fw.write("};\n\n");
+ fw.write("static const char hw_enum[][LABEL_STRLEN] =\n");
+ fw.write("{\n");
+ fw.close();
+ writeHwCoreEnum(model, file);
+ fw = new FileWriter(fn, true);
+ fw.write("};\n\n");
+ fw.write("void get_SHM_label_name (int index,char str[])\n" +
+ "{\n\n}\n\n\n");
+ fw.write("void get_DSHM_label_name (int index,char str[])\n" +
+ "{\n\n}\n\n\n");
+ fw.write("void get_task_name (int index,char str[])\n" +
+ "{\n\n}\n\n\n");
+ fw.write("void get_visible_label_index(unsigned array[],unsigned mem_type)\n" +
+ "{\n\n}\n\n\n");
+ fw.write("void generate_runnable_entity_table(void)\n");
+ fw.write("{\n");
+ fw.write("}\n\n");
+ fw.write("void generate_signal_entity_table(void)\n");
+ fw.write("{\n");
+ fw.write("}\n\n");
+ fw.write("void generate_task_entity_table(void)\n");
+ fw.write("{\n");
+ fw.write("\tint index = 0;\n");
+ fw.write("\tint task_count = sizeof(task_enum)/sizeof(task_enum[0]);\n" +
+ "\tfor(index = 0; index < task_count; index++) {\n");
+ fw.write("\t\tstore_entity_entry(index , TASK_EVENT, task_enum[index]);\n");
+ fw.write("\t}\n}\n\n\n");
+ fw.write("void generate_hw_entity_table(void)\n");
+ fw.write("{\n");
+ fw.write("\tint index = 0;\n");
+ for (final SchedulerAllocation c : CoreNo) {
+ final ProcessingUnit pu = c.getResponsibility().get(0);
+ fw.write("\tint core_id = " + pu.getName() + "_ID;\n");
+ break;
+ }
+ fw.write("\tint hw_count = sizeof(hw_enum)/sizeof(hw_enum[0]);\n" +
+ "\tfor(index = 0; index < hw_count; index++) {\n");
+ fw.write("\t\tstore_entity_entry(core_id , CORE_EVENT, hw_enum[index]);\n");
+ fw.write("\t\tcore_id++;\n");
+ fw.write("\t}\n}\n\n\n");
+ fw.write("\n\n\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Function to write the tasks
+ *
+ * @param model
+ * @param file
+ * @param tasks
+ */
+ private static void writeTaskEnum(final Amalthea model, final File file, final Set<Task> tasks) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ for (final Task task : tasks) {
+ fw.write("\t\"" + task.getName() + "\",\n");
+ }
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+
+
+
+ /**
+ * Function to write the hardware cores
+ *
+ * @param model
+ * @param file
+ */
+ private static void writeHwCoreEnum(final Amalthea model, final File file) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ final EList<SchedulerAllocation> CoreNo = model.getMappingModel().getSchedulerAllocation();
+ int index = 0;
+ for (final SchedulerAllocation c : CoreNo) {
+ fw.write("\t\"Core_" + index + "\",\n");
+ index++;
+ }
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * helper function to get the Amalthea Model
+ *
+ */
+ public Amalthea getModel() {
+ return this.model;
+ }
+}
+
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/RTFConfigFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/RTFConfigFileCreation.java
new file mode 100644
index 0000000..b77cb9f
--- /dev/null
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/RTFConfigFileCreation.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Dortmund University of Applied Sciences and Arts and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Dortmund University of Applied Sciences and Arts - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.app4mc.cdgen;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.app4mc.amalthea.model.Amalthea;
+import org.eclipse.app4mc.amalthea.model.ProcessingUnit;
+import org.eclipse.app4mc.amalthea.model.SchedulerAllocation;
+import org.eclipse.app4mc.amalthea.model.Task;
+import org.eclipse.app4mc.amalthea.model.util.DeploymentUtil;
+import org.eclipse.app4mc.cdgen.utils.fileUtil;
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * Implementation of RTF Parallella specific configuration and macros.
+ *
+ *
+ */
+
+public class RTFConfigFileCreation {
+
+ final private Amalthea model;
+
+ /**
+ * Constructor RTF Parallella ConfigFileCreation
+ *
+ * @param Model
+ * @param srcPath
+ * @param configFlag
+ * @throws IOException
+ */
+ public RTFConfigFileCreation(final Amalthea Model, final String srcPath, final int configFlag)
+ throws IOException {
+ this.model = Model;
+ System.out.println("RTFParallellaConfig File Creation Begins");
+ fileCreate(this.model, srcPath, configFlag);
+ System.out.println("RTFParallellaConfig File Creation Ends");
+ }
+
+
+ /**
+ * FileCreation RTF Parallella ConfigFileCreation
+ *
+ * @param model
+ * @param srcPath
+ * @param configFlag
+ * @throws IOException
+ */
+ public static void fileCreate(final Amalthea model, final String srcpath, final int configFlag) throws IOException {
+ final String fname = srcpath + File.separator + "RTFParallellaConfig.h";
+ final File f2 = new File(srcpath);
+ final File f1 = new File(fname);
+ f2.mkdirs();
+ try {
+ f1.createNewFile();
+ }
+ catch (final IOException e) {
+ e.printStackTrace();
+ }
+
+ final File fn = f1;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ try {
+ fileUtil.fileMainHeader(f1);
+ fileUtil.RTFConfigFileHeader(f1);
+ headerIncludesRTFConfig(model, f1, configFlag);
+ }
+ finally {
+ try {
+ fw.close();
+ }
+ catch (final IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+
+ /**
+ * Macro framework and definition.
+ *
+ * @param model
+ * @param file
+ * @param configFlag
+ */
+ public static void headerIncludesRTFConfig(final Amalthea model, final File file, final int configFlag) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ FileWriter fw = new FileWriter(fn, true);
+ fw.write("#ifndef SRC_PARALLELLA_RTFPARALLELLACONFIG_H_\n");
+ fw.write("#define SRC_PARALLELLA_RTFPARALLELLACONFIG_H_\n");
+ fw.write("//-----------------------------------------------------------\n");
+ fw.write("#define CDGEN_BTF_TRACE\n\n");
+ fw.write("/* Shared DRAM start address*/\n" +
+ "#define SHARED_DRAM_START_ADDRESS 0x8E000000\n");
+ fw.write("/* Shared dram start address offset corresponds to 0x8F000000 global address */\n" +
+ "#define SHARED_DRAM_START_OFFSET 0x01000000\n");
+ fw.write("/* The Shared DRAM section as seen by the Epiphany core */\n" +
+ "#define SHARED_DRAM_SECTION (SHARED_DRAM_START_ADDRESS + SHARED_DRAM_START_OFFSET)\n");
+ fw.write("/* Allocate 4KB of shared DRAM for data exchange between host and epiphany cores */\n" +
+ "#define SHARED_DRAM_SIZE 0x00002000\n");
+ fw.write("#define RTF_DEBUG_TRACE_COUNT 10\n");
+ fw.write("/* First five address is used by FreeRTOS porting on Epiphany on shared dram see port.c file. */\n" +
+ "#define INPUT_TIMESCALE_OFFSET 20\n");
+ fw.write("#define SHARED_BTF_DATA_OFFSET (INPUT_TIMESCALE_OFFSET + 4)\n");
+ fw.write("#define SHARED_LABEL_OFFSET 0x1000\n");
+ fw.write("#define BTF_TRACE_BUFFER_SIZE 8\n");
+ fw.write("#define GLOBAL_SHARED_LABEL_OFFSET sizeof(btf_trace_info)\n");
+ fw.write("/* Shared label count */\n" +
+ "#define SHM_LABEL_COUNT 10\n");
+ fw.write("/* Start buffer address on epiphany core to store the RTF trace info. */\n" +
+ "#define ECORE_RTF_BUFFER_ADDR 0x7000\n");
+ fw.write("#define DSHM_LABEL_EPI_CORE_OFFSET 0x7040\n");
+ fw.write("\n\n#define MUTEX_ROW 1\n");
+ fw.write("#define MUTEX_COL 0\n");
+ fw.write("#define RING_BUFFER_SIZE 6\n");
+ fw.write("\n\nextern unsigned int execution_time_scale;\n");
+ fw.write("\n\n/**\n" +
+ " * Structure to ensure proper synchronization between host and epiphany cores\n" +
+ " * and also within epiphany cores.\n" +
+ " */\n" +
+ "typedef struct btf_trace_info_t\n" +
+ "{\n" +
+ " int length; /**< To ensure that the mutex is initialized */\n" +
+ " unsigned int offset; /**< Mutex declaration. Unused on host */\n" +
+ " unsigned int core_id; /**< BTF trace data buffer size which is to be read */\n" +
+ " unsigned int core_write; /**< Read write operation between epiphany core and host */\n" +
+ "} btf_trace_info;\n");
+ fw.write("\n\ntypedef enum entity_id_t\n" +
+ "{\n" +
+ " /* 0 to 15 entity ID is reserved for TASKS. */\n" +
+ " IDLE_TASK_ID = 0,\n");
+ fw.close();
+ final EList<SchedulerAllocation> CoreNo = model.getMappingModel().getSchedulerAllocation();
+ for (final SchedulerAllocation c : CoreNo) {
+ final ProcessingUnit pu = c.getResponsibility().get(0);
+ final Set<Task> tasks = DeploymentUtil.getTasksMappedToCore(pu, model);
+ writeTaskEnum(model, file, tasks);
+ }
+ writeHwCoreEnum(model, file);
+ fw = new FileWriter(fn, true);
+ fw.write("\n\ntypedef enum {\n" +
+ " UINT_8,\n" +
+ " UINT_16,\n" +
+ " UINT_32\n" +
+ "} TYPE;\n\n\n");
+ fw.write("\n#endif\n\n\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+ /**
+ * Function to write the tasks
+ *
+ * @param model
+ * @param file
+ * @param tasks
+ */
+ private static void writeTaskEnum(final Amalthea model, final File file, final Set<Task> tasks) {
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ for (final Task task : tasks) {
+ fw.write(" " + task.getName() + "_ID,\n");
+ }
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+
+
+ /**
+ * Function to write the hardware cores
+ *
+ * @param model
+ * @param file
+ */
+ private static void writeHwCoreEnum(final Amalthea model, final File file) {
+ int core_id = 512;
+ try {
+ final File fn = file;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("\n\n /* 512 onwards reserved for HARDWARE */\n");
+ final EList<SchedulerAllocation> CoreNo = model.getMappingModel().getSchedulerAllocation();
+ for (final SchedulerAllocation c : CoreNo) {
+ final ProcessingUnit pu = c.getResponsibility().get(0);
+ fw.write(" " + pu.getName() + "_ID = " + core_id + ",\n");
+ core_id++;
+ }
+ fw.write("} entity_id;\n");
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+ }
+
+}
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/SharedLabelsFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/SharedLabelsFileCreation.java
index a991ec3..59f1f45 100644
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/SharedLabelsFileCreation.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/SharedLabelsFileCreation.java
@@ -49,10 +49,10 @@
* @param srcPath
* @throws IOException
*/
- public SharedLabelsFileCreation(final Amalthea Model, final String srcPath) throws IOException {
+ public SharedLabelsFileCreation(final Amalthea Model, final String srcPath, final int configFlag) throws IOException {
this.model = Model;
System.out.println("Shared Label File Creation Begins");
- fileCreate(this.model, srcPath);
+ fileCreate(this.model, srcPath, configFlag);
System.out.println("Shared Label File Creation Ends");
}
@@ -63,7 +63,7 @@
* @param srcPath
* @throws IOException
*/
- private static void fileCreate(final Amalthea model, final String srcPath) throws IOException {
+ private static void fileCreate(final Amalthea model, final String srcPath, final int configFlag) throws IOException {
final EList<Label> labellist = model.getSwModel().getLabels();
final String fname1 = srcPath + File.separator + "shared_comms.c";
final String fname2 = srcPath + File.separator + "shared_comms.h";
@@ -85,7 +85,7 @@
fileUtil.fileMainHeader(f1);
sharedLabelFileHeader(f1);
headerIncludesSharedLabel(f1);
- SharedLabelDeclaration(f1, model, labellist);
+ SharedLabelDeclaration(f1, model, labellist, configFlag);
}
finally {
try {
@@ -98,8 +98,8 @@
try {
fileUtil.fileMainHeader(f3);
sharedLabelFileHeaderHead(f3);
- headerIncludesSharedLabelHead(f3);
- SharedLabelDeclarationHead(f3, model, labellist);
+ headerIncludesSharedLabelHead(f3, configFlag);
+ SharedLabelDeclarationHead(f3, model, labellist, configFlag);
}
finally {
try {
@@ -161,7 +161,7 @@
*
* @param file
*/
- private static void headerIncludesSharedLabelHead(final File file) {
+ private static void headerIncludesSharedLabelHead(final File file, final int configFlag) {
try {
final File fn = file;
@SuppressWarnings("resource")
@@ -172,6 +172,10 @@
fw.write("/* Standard includes. */\n");
fw.write("#include <stdlib.h>\n");
fw.write("#include <stdint.h>\n\n");
+ if (0x0001 == (0x0001 & configFlag)) {
+
+ }
+ fw.write("#include \"RTFParallellaConfig.h\"\n");
fw.close();
}
catch (final IOException ioe) {
@@ -191,7 +195,7 @@
@SuppressWarnings("resource")
final FileWriter fw = new FileWriter(fn, true);
fw.write("/* Standard includes. */\n");
- fw.write("#include \"shared_comms.h\"\n");
+ fw.write("#include \"shared_comms.h\"\n\n\n");
fw.close();
}
catch (final IOException ioe) {
@@ -206,11 +210,22 @@
* @param file
* @param labellist
*/
- private static void SharedLabelDeclaration(final File file, final Amalthea model, final EList<Label> labellist) {
+ private static void SharedLabelDeclaration(final File file, final Amalthea model,
+ final EList<Label> labellist, final int configFlag) {
try {
final File fn = file;
@SuppressWarnings("resource")
final FileWriter fw = new FileWriter(fn, true);
+ if (0x0001 == (0x0001 & configFlag)) {
+ fw.write("unsigned int *allocate_shared_memory(unsigned int offset)\n" +
+ "{\n" +
+ "\tunsigned int *dram_addr = 0;\n" +
+ "\tunsigned int *shdram_start_addr = (unsigned int *)SHARED_DRAM_SECTION;\n" +
+ "\t/* Add offset to get the address */\n" +
+ "\tdram_addr = (shdram_start_addr + offset);\n" +
+ "\treturn (unsigned int *)dram_addr;\n" +
+ "}\n\n\n");
+ }
final List<Label> SharedLabelList = LabelFileCreation.SharedLabelFinder(model);
final List<Label> SharedLabelListSortCore = new ArrayList<Label>();
if (SharedLabelList.size() == 0) {
@@ -294,11 +309,12 @@
* @param labellist
*/
private static void SharedLabelDeclarationHead(final File file, final Amalthea model,
- final EList<Label> labellist) {
+ final EList<Label> labellist, final int configFlag) {
try {
final File fn = file;
@SuppressWarnings("resource")
final FileWriter fw = new FileWriter(fn, true);
+ fw.write("unsigned int *allocate_shared_memory(unsigned int offset);\n\n");
final List<Label> SharedLabelList = LabelFileCreation.SharedLabelFinder(model);
final List<Label> SharedLabelListSortCore = new ArrayList<Label>();
if (SharedLabelList.size() == 0) {
@@ -337,8 +353,14 @@
}
int SharedLabelCounter = SharedLabel.size();
if (SharedLabelCounter != 0) {
- fw.write("\n#define shared_mem_section" + sh.toString().replace(" ", "") + " 0x0" + (k + 1)
- + "000000\n\n");
+ if (0x0001 == (0x0001 & configFlag)) {
+ fw.write("\n#define shared_mem_section" + sh.toString().replace(" ", "") + " 0x8F001" + k + "00\n\n");
+ }
+ else {
+ fw.write("\n#define shared_mem_section" + sh.toString().replace(" ", "") + " 0x0" + (k + 1)
+ + "000000\n\n");
+ }
+
fw.write("void shared_label_" + sh.toString().replace(" ", "") + "_init();\n");
fw.write("void shared_label_" + sh.toString().replace(" ", "")
+ "_write(int label_indx,int payload);\n");
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/TaskFileCreation.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/TaskFileCreation.java
index 96d2815..d9ef424 100755
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/TaskFileCreation.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/TaskFileCreation.java
@@ -112,12 +112,19 @@
fileUtil.fileMainHeader(f1);
taskFileHeader(f1);
if ((0x3000 == (0xF000 & configFlag)) & (0x0100 == (0x0F00 & configFlag))) {
- headerIncludesTaskHeadRMS(f1, k);
TaskCounter(f1, tasks);
- TaskDefinitionRMS(f1, model, tasks, preemptionFlag);
+ if (0x0001 == (0x0001 & configFlag)) {
+ headerIncludesTaskHeadRMS(f1, k, true);
+ TaskDefinitionRMS(f1, model, tasks, preemptionFlag, true);
+ }
+ else {
+ headerIncludesTaskHeadRMS(f1, k, false);
+ TaskDefinitionRMS(f1, model, tasks, preemptionFlag, false);
+ }
+
}
else if ((0x1000 == (0xF000 & configFlag)) & (0x0300 == (0x0F00 & configFlag))) {
- headerIncludesTaskHeadRMS(f1, k);
+ headerIncludesTaskHeadRMS(f1, k, false);
TaskCounter(f1, tasks);
TaskDefinitionFreeRTOS(f1, model, tasks, preemptionFlag);
}
@@ -472,12 +479,17 @@
}
}
- private static void headerIncludesTaskHeadRMS(final File f1, final int k) {
+ private static void headerIncludesTaskHeadRMS(final File f1, final int k, final boolean btfEnable) {
try {
final File fn = f1;
@SuppressWarnings("resource")
final FileWriter fw = new FileWriter(fn, true);
fw.write("#include \"taskDef" + k + ".h\"\n\n");
+ if (btfEnable == true) {
+ fw.write("#include \"debugFlags.h\"\n" +
+ "#include \"RTFParallellaConfig.h\"\n" +
+ "#include \"trace_utils_BTF.h\"\n\n\n");
+ }
fw.close();
}
catch (final IOException ioe) {
@@ -514,7 +526,7 @@
private static void TaskDefinitionRMS(final File f1, final Amalthea model, final List<Task> tasks,
- final boolean preemptionFlag) {
+ final boolean preemptionFlag, final boolean btfEnable) {
try {
final File fn = f1;
@SuppressWarnings("resource")
@@ -532,11 +544,19 @@
}
fw.write("\n");
fw.write("\n\n");
- fw.write("\n\tvoid v" + task.getName() + "()" + "\n\t{\n");
+ if (btfEnable == true) {
+ fw.write("\n\tvoid v" + task.getName() + "(int src_id, int src_instance)" + "\n\t{\n");
+ }
+ else {
+ fw.write("\n\tvoid v" + task.getName() + "()" + "\n\t{\n");
+ }
+
// fw.write("\n\n");
fw.write("\t\tupdateDebugFlag(700);\n");
- fw.write("\t\ttraceTaskPasses(1,1);\n");
+ if (btfEnable == false) {
+ fw.write("\t\ttraceTaskPasses(1,1);\n");
+ }
fw.write("\n\t\t\t/*Runnable calls */\n");
for (final Runnable run : runnablesOfTask) {
fw.write("\t\t\t" + run.getName() + "();\n");
@@ -550,17 +570,36 @@
final BigInteger sleepTime = taskTime.getValue();
final BigInteger b2 = new BigInteger("1000");
final int comparevalue = sleepTime.compareTo(b2);
- if (comparevalue < 0) {
- fw.write("\n\t\t\tsleepTimerMs(1 , 1" + (taskCount + 1) + ");\n");
+ if (btfEnable == true) {
+ fw.write("\t\t\ttraceTaskEvent(src_id, src_instance, TASK_EVENT," + task.getName() + "_ID,\n" +
+ "\t\t\t\t\t taskCount"+ task.getName()+", PROCESS_START, 0);\n");
+ if (comparevalue < 0) {
+ fw.write("\n\t\t\tsleepTimerMs(1 , " + task.getName() + "_ID);\n");
+ }
+ else {
+ fw.write("\n\t\t\tsleepTimerMs(" + sleepTime + ", " + task.getName() + "_ID);\n");
+ }
}
else {
- fw.write("\n\t\t\tsleepTimerMs(" + sleepTime + ", " + taskCount + 1 + ");\n");
+ if (comparevalue < 0) {
+ fw.write("\n\t\t\tsleepTimerMs(1 , 1" + (taskCount + 1) + ");\n");
+ }
+ else {
+ fw.write("\n\t\t\tsleepTimerMs(" + sleepTime + ", " + taskCount + 1 + ");\n");
+ }
+
+ }
+ if (btfEnable == true) {
+ fw.write("\t\t\ttraceTaskEvent(src_id, src_instance, TASK_EVENT," + task.getName() + "_ID,\n" +
+ "\t\t\t\t\t taskCount"+ task.getName()+", PROCESS_TERMINATE, 0);\n");
}
}
fw.write("\n\t\t\ttaskCount" + task.getName() + "++;");
- fw.write("\n\t\t\ttraceTaskPasses(" + taskCount + ", taskCount" + task.getName() + ");");
- fw.write("\n\t\t\ttraceRunningTask(0);\n");
+ if (btfEnable == false) {
+ fw.write("\n\t\t\ttraceTaskPasses(" + taskCount + ", taskCount" + task.getName() + ");");
+ fw.write("\n\t\t\ttraceRunningTask(0);\n");
+ }
fw.write("\t}\n\n");
}
fw.close();
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFileCreateGUI.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFileCreateGUI.java
index 1f71463..2bfc0b2 100755
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFileCreateGUI.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFileCreateGUI.java
@@ -28,6 +28,7 @@
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
@@ -184,6 +185,11 @@
this.txtFieldModel.setBounds(370, 140, 280, 25);
this.frame.getContentPane().add(this.txtFieldModel);
+
+ final JCheckBox cbBTFTrace = new JCheckBox("Enable BTF");
+ cbBTFTrace.setFont(new Font("Tahoma", Font.BOLD, 13));
+ cbBTFTrace.setBounds(670, 190, 120, 35);
+ this.frame.getContentPane().add(cbBTFTrace);
final BufferedImage startButtonIcon = ImageIO.read(new File("./cdgen.graphics/start.png"));
@@ -228,10 +234,11 @@
* 0X1000 ==> FreeRTOS 0X2000 ==> POSIX 0x3000 ==> RMS
*
* 0X0010 ==> Cooperative 0X0020 ==> Preemptive
+ * 0xXXX1 ==> BTF Trace Enabled
*
* FreeRTOS == Cooperative == 0x1X10 FreeRTOS == Preemptive ==
* 0x1X20 POSIX == Cooperative == 0x2X10 POSIX == Preemptive ==
- * 0x2X20 RMS == Cooperative == 0x3X10 RMS == Preemptive ==
+ * 0x3X20 RMS == Cooperative == 0x3X10 RMS == Preemptive ==
* 0x3X20 X == Don't care
*/
@@ -261,14 +268,26 @@
new checkPOSIXConfiguration(model, path1, path2, configFlag);
}
else if (cdgenCustom.isSelected() & cdgenPreemptive.isSelected()) {
- configFlag = 0x3120;
- System.out.println("\t\tRMS\tPreemptive");
+ if (cbBTFTrace.isSelected() == true) {
+ configFlag = 0x3121;
+ System.out.println("\t\tRMS\tPreemptive with BTF Trace");
+ }
+ else {
+ configFlag = 0x3120;
+ System.out.println("\t\tRMS\tPreemptive");
+ }
System.out.println("############################################################");
new checkRMSConfiguration(model, path1, path2, configFlag);
}
else if (cdgenCustom.isSelected() & cdgenCooperative.isSelected()) {
- configFlag = 0x3110;
- System.out.println("\t\tRMS\tCooperative");
+ if (cbBTFTrace.isSelected() == true) {
+ configFlag = 0x3111;
+ System.out.println("\t\tRMS\tCooperative with BTF Trace");
+ }
+ else {
+ configFlag = 0x3110;
+ System.out.println("\t\tRMS\tCooperative");
+ }
System.out.println("############################################################");
new checkRMSConfiguration(model, path1, path2, configFlag);
}
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFreeRTOSConfiguration.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFreeRTOSConfiguration.java
index 28b8fc0..f0d94d7 100644
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFreeRTOSConfiguration.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkFreeRTOSConfiguration.java
@@ -92,7 +92,7 @@
e1.printStackTrace();
}
try {
- new SharedLabelsFileCreation(model, srcPath);
+ new SharedLabelsFileCreation(model, srcPath, configFlag);
}
catch (final IOException e1) {
e1.printStackTrace();
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkRMSConfiguration.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkRMSConfiguration.java
index 85b3211..8e5b604 100644
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkRMSConfiguration.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/checks/checkRMSConfiguration.java
@@ -23,6 +23,8 @@
import org.eclipse.app4mc.cdgen.LabelFileCreation;
import org.eclipse.app4mc.cdgen.MainRMSFileCreation;
import org.eclipse.app4mc.cdgen.MakeFileCreation;
+import org.eclipse.app4mc.cdgen.ModelEnumFileCreation;
+import org.eclipse.app4mc.cdgen.RTFConfigFileCreation;
import org.eclipse.app4mc.cdgen.RunFileCreation;
import org.eclipse.app4mc.cdgen.SharedLabelsFileCreation;
import org.eclipse.app4mc.cdgen.TaskFileCreation;
@@ -83,6 +85,24 @@
e1.printStackTrace();
}
try {
+ if (0x0001 == (0x0001 & configFlag)) {
+ new RTFConfigFileCreation(model, srcPath, configFlag);
+ }
+
+ }
+ catch (final IOException e1) {
+ e1.printStackTrace();
+ }
+ try {
+ if (0x0001 == (0x0001 & configFlag)) {
+ new ModelEnumFileCreation(model, srcPath);
+ }
+
+ }
+ catch (final IOException e1) {
+ e1.printStackTrace();
+ }
+ try {
new RunFileCreation(model, srcPath, headerPath, configFlag);
}
catch (final IOException e1) {
@@ -107,7 +127,7 @@
e1.printStackTrace();
}
try {
- new SharedLabelsFileCreation(model, srcPath);
+ new SharedLabelsFileCreation(model, srcPath, configFlag);
}
catch (final IOException e1) {
e1.printStackTrace();
diff --git a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/utils/fileUtil.java b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/utils/fileUtil.java
index 5b0598b..0df0ad2 100755
--- a/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/utils/fileUtil.java
+++ b/eclipse-tools/cdgen/src/org/eclipse/app4mc/cdgen/utils/fileUtil.java
@@ -59,7 +59,7 @@
fr.write("******************************************************************\n");
fr.write("*Author : Ram Prasath Govindarajan\n");
fr.write("*Tool : CDGen_GSoC\n");
- fr.write("*Version : V1.0.0\n");
+ fr.write("*Version : V1.0.1\n");
}
catch (final IOException e) {
e.printStackTrace();
@@ -86,6 +86,24 @@
}
+
+ public static void RTFConfigFileHeader(final File f1) {
+ try {
+ final File fn = f1;
+ @SuppressWarnings("resource")
+ final FileWriter fw = new FileWriter(fn, true);
+ fw.write("*Title : RTFParallellaConfig\n");
+ fw.write("*Description : Holds configuration for the RTF Parallella BTF Tracing Software\n");
+ fw.write("******************************************************************\n");
+ fw.write("******************************************************************/\n\n\n");
+
+ fw.close();
+ }
+ catch (final IOException ioe) {
+ System.err.println("IOException: " + ioe.getMessage());
+ }
+
+ }
public static String getFileExtension(final File file) {
final String fileName = file.getName();