-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OS][AUTOSAR][GOIL] Fix #30, Add AUTOSAR 4.2 configuration
- Loading branch information
Showing
10 changed files
with
280 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
IMPLEMENTATION trampoline_autosar_common { | ||
|
||
OS { | ||
/* Autosar OIL */ | ||
BOOLEAN PROTECTIONHOOK = FALSE; | ||
ENUM WITH_AUTO [SC1,SC2,SC3,SC4] SCALABILITYCLASS = AUTO; | ||
BOOLEAN STACKMONITORING = FALSE; | ||
}; | ||
|
||
ALARM [] { | ||
ENUM [ | ||
ACTIVATETASK { TASK_TYPE TASK; }, | ||
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; }, | ||
INCREMENTCOUNTER { COUNTER_TYPE COUNTER; } | ||
] ACTION; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
TASK [] { | ||
BOOLEAN [ | ||
TRUE { | ||
UINT32 EXECUTIONBUDGET; | ||
UINT32 TIMEFRAME; | ||
}, | ||
FALSE | ||
] TIMING_PROTECTION = FALSE; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
ISR [] { | ||
BOOLEAN [ | ||
TRUE, | ||
FALSE | ||
] TIMING_PROTECTION = FALSE; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
COUNTER [] { | ||
ENUM [ HARDWARE, SOFTWARE ] TYPE = HARDWARE; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
RESOURCE [] { | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
SCHEDULETABLE [] { | ||
COUNTER_TYPE COUNTER; | ||
ENUM [ | ||
NONE, | ||
ABSOLUTE { UINT64 START; APPMODE_TYPE APPMODE[]; }, | ||
RELATIVE { UINT64 OFFSET; APPMODE_TYPE APPMODE[]; }, | ||
SYNCHRON { APPMODE_TYPE APPMODE[]; } | ||
] AUTOSTART = NONE; | ||
BOOLEAN [ | ||
TRUE { | ||
ENUM [ IMPLICIT, EXPLICIT ] SYNC_STRATEGY; | ||
UINT64 PRECISION; | ||
}, | ||
FALSE | ||
] LOCAL_TO_GLOBAL_TIME_SYNCHRONIZATION; | ||
BOOLEAN PERIODIC; | ||
UINT64 LENGTH; | ||
STRUCT { | ||
UINT64 OFFSET; | ||
ENUM [ | ||
ACTIVATETASK { TASK_TYPE TASK; }, | ||
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; } | ||
] ACTION []; | ||
BOOLEAN [ | ||
TRUE { UINT64 MAX_ADVANCE; UINT64 MAX_RETARD; }, | ||
FALSE | ||
] ADJUSTABLE = FALSE; | ||
} EXPIRY_POINT []; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
APPLICATION [] { | ||
BOOLEAN [ | ||
TRUE { IDENTIFIER TRUSTED_FUNCTION []; }, | ||
FALSE | ||
] TRUSTED = FALSE; | ||
BOOLEAN STARTUPHOOK = FALSE; | ||
BOOLEAN SHUTDOWNHOOK = FALSE; | ||
BOOLEAN ERRORHOOK = FALSE; | ||
BOOLEAN [ | ||
TRUE { TASK_TYPE RESTARTTASK; }, | ||
FALSE | ||
] HAS_RESTARTTASK = FALSE; | ||
TASK_TYPE TASK []; | ||
ISR_TYPE ISR []; | ||
ALARM_TYPE ALARM []; | ||
SCHEDULETABLE_TYPE SCHEDULETABLE []; | ||
COUNTER_TYPE COUNTER []; | ||
MESSAGE_TYPE MESSAGE []; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* AUTOSAR multicore objects. Objects defined here are: | ||
* - IOC | ||
* - SPINLOCK | ||
* | ||
* Objects reciving additional attributes are: | ||
* - OS: NUMBER_OF_CORES. | ||
* - ALARM: ACTION as an INCREMENTCOUNTER value for software counters and | ||
* ACCESSING_APPLICATION. | ||
* - TASK: TIMINGPROTECTION and ACCESSING_APPLICATION. | ||
* - ISR: TIMINGPROTECTION and ACCESSING_APPLICATION. | ||
* - COUNTER: TYPE and ACCESSING_APPLICATION. | ||
* - RESOURCE: ACCESSING_APPLICATION. | ||
*/ | ||
IMPLEMENTATION autosar_multicore { | ||
OS { | ||
UINT32 [1..65535] NUMBER_OF_CORES = 1; | ||
}; | ||
|
||
IOC [] { | ||
STRUCT { | ||
ENUM [ | ||
DATA, | ||
REFERENCE | ||
] DATATYPEPROPERTY; | ||
} DATATYPENAME []; | ||
|
||
ENUM [ | ||
QUEUED { | ||
UINT32 BUFFER_LENGTH; | ||
}, | ||
LAST_IS_BEST { | ||
STRING WITH_AUTO INIT_VALUE_SYMBOL = AUTO; | ||
} | ||
] SEMANTICS = QUEUED; | ||
|
||
STRUCT { | ||
APPLICATION_TYPE RCV_OSAPPLICATION; | ||
STRING WITH_AUTO RECEIVER_PULL_CB = AUTO; | ||
ENUM [ | ||
NONE, | ||
ACTIVATETASK { TASK_TYPE TASK; }, | ||
SETEVENT {TASK_TYPE TASK; EVENT_TYPE EVENT; } | ||
] ACTION = NONE; | ||
} RECEIVER []; | ||
|
||
STRUCT { | ||
UINT32 WITH_AUTO SENDER_ID = AUTO; | ||
APPLICATION_TYPE SND_OSAPPLICATION; | ||
} SENDER [] ; | ||
|
||
}; | ||
|
||
SPINLOCK [] { | ||
APPLICATION_TYPE ACCESSING_APPLICATION []; | ||
SPINLOCK_TYPE SUCCESSOR[]; | ||
ENUM [ | ||
LOCK_ALL_INTERRUPTS, | ||
LOCK_CAT2_INTERRUPTS, | ||
LOCK_WITH_RES_SCHEDULER, | ||
LOCK_NOTHING | ||
] LOCKMETHOD = LOCK_NOTHING; | ||
}; | ||
|
||
APPLICATION [] { | ||
IOC_TYPE IOC []; | ||
UINT32 CORE = 0; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,12 @@ | ||
IMPLEMENTATION trampoline_autosar { | ||
|
||
OS { | ||
/* Autosar OIL */ | ||
BOOLEAN PROTECTIONHOOK = FALSE; | ||
ENUM WITH_AUTO [SC1,SC2,SC3,SC4] SCALABILITYCLASS = AUTO; | ||
BOOLEAN STACKMONITORING = FALSE; | ||
}; | ||
|
||
ALARM [] { | ||
ENUM [ | ||
ACTIVATETASK { TASK_TYPE TASK; }, | ||
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; }, | ||
INCREMENTCOUNTER { COUNTER_TYPE COUNTER; } | ||
] ACTION; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
TASK [] { | ||
BOOLEAN [ | ||
TRUE { | ||
UINT32 EXECUTIONBUDGET; | ||
UINT32 TIMEFRAME; | ||
}, | ||
FALSE | ||
] TIMING_PROTECTION = FALSE; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
/* | ||
* AUTOSAR 3.1 | ||
* | ||
* This version of AUTOSAR add the RESOURCE attribute in the APPLICATION object. | ||
*/ | ||
#include "autosar_common.oil" | ||
|
||
ISR [] { | ||
BOOLEAN [ | ||
TRUE, | ||
FALSE | ||
] TIMING_PROTECTION = FALSE; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
COUNTER [] { | ||
ENUM [ HARDWARE, SOFTWARE ] TYPE = HARDWARE; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
RESOURCE [] { | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
SCHEDULETABLE [] { | ||
COUNTER_TYPE COUNTER; | ||
ENUM [ | ||
NONE, | ||
ABSOLUTE { UINT64 START; APPMODE_TYPE APPMODE[]; }, | ||
RELATIVE { UINT64 OFFSET; APPMODE_TYPE APPMODE[]; }, | ||
SYNCHRON { APPMODE_TYPE APPMODE[]; } | ||
] AUTOSTART = NONE; | ||
BOOLEAN [ | ||
TRUE { | ||
ENUM [ IMPLICIT, EXPLICIT ] SYNC_STRATEGY; | ||
UINT64 PRECISION; | ||
}, | ||
FALSE | ||
] LOCAL_TO_GLOBAL_TIME_SYNCHRONIZATION; | ||
BOOLEAN PERIODIC; | ||
UINT64 LENGTH; | ||
STRUCT { | ||
UINT64 OFFSET; | ||
ENUM [ | ||
ACTIVATETASK { TASK_TYPE TASK; }, | ||
SETEVENT { TASK_TYPE TASK; EVENT_TYPE EVENT; } | ||
] ACTION []; | ||
BOOLEAN [ | ||
TRUE { UINT64 MAX_ADVANCE; UINT64 MAX_RETARD; }, | ||
FALSE | ||
] ADJUSTABLE = FALSE; | ||
} EXPIRY_POINT []; | ||
APPLICATION_TYPE ACCESSING_APPLICATION[]; | ||
}; | ||
|
||
IMPLEMENTATION trampoline_autosar { | ||
APPLICATION [] { | ||
BOOLEAN [ | ||
TRUE { IDENTIFIER TRUSTED_FUNCTION []; }, | ||
FALSE | ||
] TRUSTED = FALSE; | ||
BOOLEAN STARTUPHOOK = FALSE; | ||
BOOLEAN SHUTDOWNHOOK = FALSE; | ||
BOOLEAN ERRORHOOK = FALSE; | ||
BOOLEAN [ | ||
TRUE { TASK_TYPE RESTARTTASK; }, | ||
FALSE | ||
] HAS_RESTARTTASK = FALSE; | ||
TASK_TYPE TASK []; | ||
ISR_TYPE ISR []; | ||
ALARM_TYPE ALARM []; | ||
SCHEDULETABLE_TYPE SCHEDULETABLE []; | ||
COUNTER_TYPE COUNTER []; | ||
RESOURCE_TYPE RESOURCE []; | ||
MESSAGE_TYPE MESSAGE []; | ||
}; | ||
}; | ||
|
||
/*#include "api_autosar.oil"*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,9 @@ | ||
/* | ||
* AUTOSAR 4.0 | ||
* | ||
* This version of AUTOSAR is basically the 3.1 plus the multicore one. | ||
*/ | ||
#include "config3.1.oil" | ||
|
||
IMPLEMENTATION autosar4 { | ||
OS { | ||
UINT32 [1..65535] NUMBER_OF_CORES = 1; | ||
}; | ||
|
||
IOC [] { | ||
STRUCT { | ||
ENUM [ | ||
DATA, | ||
REFERENCE | ||
] DATATYPEPROPERTY; | ||
} DATATYPENAME []; | ||
|
||
ENUM [ | ||
QUEUED { | ||
UINT32 BUFFER_LENGTH; | ||
}, | ||
LAST_IS_BEST { | ||
STRING WITH_AUTO INIT_VALUE_SYMBOL = AUTO; | ||
} | ||
] SEMANTICS = QUEUED; | ||
|
||
STRUCT { | ||
APPLICATION_TYPE RCV_OSAPPLICATION; | ||
STRING WITH_AUTO RECEIVER_PULL_CB = AUTO; | ||
ENUM [ | ||
NONE, | ||
ACTIVATETASK { TASK_TYPE TASK; }, | ||
SETEVENT {TASK_TYPE TASK; EVENT_TYPE EVENT; } | ||
] ACTION = NONE; | ||
} RECEIVER []; | ||
|
||
STRUCT { | ||
UINT32 WITH_AUTO SENDER_ID = AUTO; | ||
APPLICATION_TYPE SND_OSAPPLICATION; | ||
} SENDER [] ; | ||
|
||
}; | ||
|
||
SPINLOCK [] { | ||
APPLICATION_TYPE ACCESSING_APPLICATION []; | ||
SPINLOCK_TYPE SUCCESSOR[]; | ||
ENUM [ | ||
LOCK_ALL_INTERRUPTS, | ||
LOCK_CAT2_INTERRUPTS, | ||
LOCK_WITH_RES_SCHEDULER, | ||
LOCK_NOTHING | ||
] LOCKMETHOD = LOCK_NOTHING; | ||
}; | ||
|
||
APPLICATION [] { | ||
IOC_TYPE IOC []; | ||
UINT32 CORE = 0; | ||
}; | ||
|
||
}; | ||
#include "autosar_multicore.oil" | ||
|
||
/*#include "api_ioc.oil"*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* AUTOSAR 4.2 | ||
* | ||
* This version of AUTOSAR is the common plus the multicore one. | ||
* Compared to 4.0, RESOURCE attribute is no longer included in | ||
* APPLICATION object | ||
*/ | ||
#include "autosar_common.oil" | ||
#include "autosar_multicore.oil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
% | ||
# | ||
# Various checking getter and functions | ||
# | ||
getter @string isUnsigned() result | ||
let result := true | ||
loop i from 0 to [self length] - 1 do | ||
let result := result & [[self charAtIndex : i] isDigit] | ||
end loop | ||
end getter |
Oops, something went wrong.