Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
e0c9082e
Commit
e0c9082e
authored
Jul 11, 2019
by
Maxime Perrotin
Browse files
Add basic support for compiling pohic systems
Only non-distributed, native.
parent
ef1c3bd6
Changes
14
Hide whitespace changes
Inline
Side-by-side
templates/concurrency_view/c_pohi_gpr/README.md
0 → 100644
View file @
e0c9082e
Generate a .gpr to build the system using PolyORB-HI-C
templates/concurrency_view/c_pohi_gpr/block.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Protected block name
@@-- @_Language_@ : Implementation language
@@-- @_Calling_Threads_@ : List of calling threads
@@-- @_Node name_@ : Node name
@@-- @_Protected_PIs_@ : Protected Provided interfaces (from pi.tmplt)
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
templates/concurrency_view/c_pohi_gpr/fileblock.tmplt
0 → 100644
View file @
e0c9082e
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/c_pohi_gpr/filenode.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node as defined in the Deployment View
@@-- The content of this file is generated from node.tmplt
@@-- If there is no string defined here, no file will be generated per node,
@@-- (that's an option if the intent is to generate only one file per system)
Makefile.@_LOWER:Node_Name_@
templates/concurrency_view/c_pohi_gpr/filepart.tmplt
0 → 100644
View file @
e0c9082e
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Partition_Name_@.gpr
templates/concurrency_view/c_pohi_gpr/filesys.tmplt
0 → 100644
View file @
e0c9082e
@@-- Specify the file name for the complete system (including nodes)
@@-- (no template tag)
templates/concurrency_view/c_pohi_gpr/filethread.tmplt
0 → 100644
View file @
e0c9082e
@@-- Specify the file name for a thread
@@-- @_Thread_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/c_pohi_gpr/node.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node from deployment view
@@-- @_Partition_Names_@ : Tag listing the partitions in this node
@@-- @_Partitions_@ : List of rendered code for partitions
@@-- @_CPU_Name_@, _Platform_@, _Classifier_@, _Ada_Runtime_@ : Info about CPU
@@-- In standard TASTE systems there is only one partition per node
# @_Node_Name_@ @_CPU_Name_@ @_Ada_Runtime_@
all: debug
debug:
@@TABLE@@
gprbuild -p -v -P @_LOWER:Partition_Names_@.gpr -XCFG="Debug" -cargs:C -DSTATIC=""
@@END_TABLE@@
release:
@@TABLE@@
gprbuild -p -P @_LOWER:Partition_Names_@.gpr -XCFG="Release" -cargs:C -DSTATIC=""
@@END_TABLE@@
templates/concurrency_view/c_pohi_gpr/partition.tmplt
0 → 100644
View file @
e0c9082e
@@--
The
following
tags
are
available
in
this
template
:
@@--
@@--
@
_Name_
@
:
Partition
name
(
usually
the
name
of
the
binary
)
@@--
@
_Threads_
@
:
Code
generated
for
the
threads
@@--
@
_Thread_Names_
@
:
Tag
:
list
of
thread
names
@@--
@
_Node_Name_
@
:
Name
of
the
node
containing
this
partition
@@--
@
_Blocks_
@
:
Code
generated
for
protected
functions
@@--
@
_Block_Names
@
:
Vector
Tag
:
list
of
block
(
user
functions
)
names
@@--
@
_Block_Languages
@
:
|
_
Corresponding
implementation
language
@@--
@
_Coverage_
@
:
True
if
user
requested
code
coverage
enable
@@--
@
_Package_Name_
@
:
AADL
Package
name
for
the
target
(
e
.
g
.
ocarina_porocessors_x86
)
@@--
@
_CPU_Name_
@
:
CPU
Name
(
e
.
g
.
x86_linux
)
@@--
@
_CPU_Platform_
@
:
AADL
CPU_Platform
(
e
.
g
.
PLATFORM_NATIVE
)
@@--
@
_CPU_Classifier_
@
:
AADL
CPU
Classifier
(
e
.
g
.
ocarina_processors_x86
::
x86
.
linux
)
@@--
@
_VP_Name_
@
:
Virtual
processor
name
on
which
the
partition
is
bounded
@@--
@
_VP_Platform_
@
:
Virtual
processor
platform
(
e
.
g
.
PLATFORM_AIR
)
@@--
@
_VP_Classifier_
@
:
Virtual
processor
classifier
@@--
@
_Ada_Runtime_
@
:
Set
if
CPU_Platform
=
PLATFORM_GNAT_RUNTIME
@@--
@
_Bound_Functions_
@
:
List
of
user
functions
from
Interface
view
@@--
@
_Thread_Src_Name_
@
:
Vector
tag
:
connection
thread
name
(
source
)
@@--
@
_Thread_Dst_Name_
@
:
Vector
tag
:
connection
thread
name
(
dest
)
@@--
@
_Thread_Src_Port_
@
:
Vector
tag
:
connection
port
name
(
source
)
@@--
@
_Thread_Dst_Port_
@
:
Vector
tag
:
connection
port
name
(
dest
)
--
Node
name
:
@
_Name_
@
--
Execution
platform
:
@
_CPU_Platform_
@
--
with
"polyorb_hi"
;
(
to
be
updated
when
available
for
POHIC
)
--
with
"/home/taste/tool-inst/include/ocarina/runtime/polyorb-hi-ada/polyorb_hi"
;
--
There
should
be
a
generalised
reference
to
a
runtime
to
extend
--
the
gpr
project
and
get
platform
-
specific
compile
/
debug
flags
project
@
_CAPITALIZE
:
Name_
@
is
type
Build_Type
is
(
"Debug"
,
"Release"
);
Build
:
Build_Type
:=
external
(
"CFG"
,
"Debug"
);
--
following
to
be
updated
with
all
relevant
source
dirs
for
Source_Dirs
use
(
"."
,
"../deploymentview_final/polyorb-hi-c/src"
,
"../deploymentview_final/polyorb-hi-c/include"
,
"../../dataview/C"
,
"../../dataview/Ada"
,
@@
TABLE
@@
@@
IF
@@
@
_Block_Languages_
@
=
sdl
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/code"
,
@@
ELSE
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/src"
,
@@
END_IF
@@
"../../@_LOWER:Block_Names_@/@_UPPER:Block_Languages_@/wrappers"
,
@@
END_TABLE
@@
"../deploymentview_final/@_LOWER:Name_@"
)
&
external_as_list
(
"ADA_INCLUDE_PATH"
,
":"
);
for
Object_Dir
use
"obj"
;
for
Exec_Dir
use
"../../binaries"
;
for
Languages
use
(
"Ada"
,
"C"
);
for
Main
use
(
"main.c"
);
--
These
files
are
not
needed
to
use
POHIC
:
don
' t compile them
for Excluded_Source_Files use
("cheddar_schedule.cc",
"cheddar_schedule.hh",
"cheddar_types.hh",
"config.c",
"config_leon3_drvmgr.c",
"config_leon4_n2x.c",
"grspw_api.c",
"grspw_pkt_lib.c",
"hyperperriod_config.hh",
"po_hi_driver_drvmgr_common.c",
"po_hi_driver_exarm.c",
"po_hi_driver_exarm_ni_6071e_analog.c",
"po_hi_driver_exarm_ni_6071e_digital.c",
"po_hi_driver_keyboard.c",
"po_hi_driver_leon_eth.c",
"po_hi_driver_leon_serial.c",
"po_hi_driver_linux_serial.c",
"po_hi_driver_rasta_1553_brmlib.c",
"po_hi_driver_rasta_1553.c",
"po_hi_driver_rasta_common.c",
"po_hi_driver_rasta_serial.c",
"po_hi_driver_rasta_spacewire.c",
"po_hi_driver_rtems_drvmgr_ethernet.c",
"po_hi_driver_rtems_drvmgr_serial.c",
"po_hi_driver_rtems_drvmgr_spacewire.c",
"po_hi_driver_rtems_ne2000.c",
"po_hi_driver_serial_common.c",
"po_hi_driver_sockets.c",
"po_hi_driver_stardundee.c",
"po_hi_driver_usbbrick_spacewire.c",
"po_hi_driver_xc4v_fpga.c",
"po_hi_giop.c",
"po_hi_gprof_rtems_leon.c",
"po_hi_lua.c",
"po_hi_monitor.c",
"po_hi_simulink.c",
"po_hi_storage.c",
"remote_configuration.cc",
"spwrouter_custom_config.c",
"star_dundee_api.c",
"trace_manager.c",
"trace_manager.cc",
"um_threads.c");
package Compiler is
case Build is
when "Release" =>
for Default_Switches ("C") use
("-g",
"-O2",
"-DTARGET=native",
"-DPOSIX",
"-D_POSIX_SOURCE",
"-D_GNU_SOURCE",
"-Wall",
"-Wextra",
"-fdiagnostics-show-option",
"-Wcast-align",
"-Wswitch");
when "Debug" =>
for Default_Switches ("C") use
("-g",
"-DTARGET=native",
"-DPOSIX",
"-D_POSIX_SOURCE",
"-D_GNU_SOURCE",
"-Wall",
"-Wextra",
"-fdiagnostics-show-option",
"-Wcast-align",
"-Wswitch");
end case;
end Compiler;
package Linker is
for Default_Switches ("C") use
("-g",
"-lrt",
"-lpthread",
"-lm",
"-Wl,-gc-sections");
end Linker;
end @_CAPITALIZE:Name_@;
templates/concurrency_view/c_pohi_gpr/pi.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the interface
@@-- @_Direction_@ : "PI" or "RI"
@@-- @_Kind_@ : The RCM Kind
@@-- @_Parent_Function_@ : The name of the function
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
templates/concurrency_view/c_pohi_gpr/ri.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the interface
@@-- @_Direction_@ : "PI" or "RI"
@@-- @_Kind_@ : The RCM Kind
@@-- @_Parent_Function_@ : The name of the function
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
templates/concurrency_view/c_pohi_gpr/system.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Nodes_@ : Code generated for the nodes
@@-- @_Node_Names_@ : Vector Tag of node names
@@-- @_Node_CPU_@ : |_ Corresponding CPU name (eg x86_linux)
@@-- @_Node_CPU_Classifier_@ : |_ CPU Classifier (ocarina...::x86_linux)
@@-- @_Partition_Names_@ : Vector Tag of partition names
@@-- @_Partition_Node_@ : |_ Corresponding node name
@@-- @_Partition_CPU_@ : |_ Corresponding CPU name
@@-- @_Threads_@ : Code generated for the threads
@@-- @_Thread_Names_@ : List of all threads in the complete system
@@-- @_Target_Packages_@ : List of all target package names in the complete system
@@-- And all the system configuration obtained from the command line:
@@-- Interface_View, Deployment_View, Data_View, Binary_Path, Check_Data_View,
@@-- Output_Dir, Skeletons, Glue, Use_POHIC, Timer_Resolution, Debug_Flag,
@@-- No_Stdlib_Flag, Timer_Resolution, Other_Files (list of aadl files)
templates/concurrency_view/c_pohi_gpr/thread.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following tags are available in this template:
@@--
@@-- @_Thread_Name_@ : Thread name
@@-- @_Entry_Port_Name_@ : Name of the PI
@@-- @_RCM_@ : One of "CYCLIC_OPERATION", "SPORADIC_OPERATION"
@@-- @_Pro_Block_Name_@ : Name of the protected function
@@-- @_Node_Name_@ : Name of the deployment node
@@-- @_Remote_Threads_@ : Vector tag: output remote thread list
@@-- @_RI_Port_Name_@ : |_ Corresponding local RI name
@@-- @_Remote_PIs_@ : |_ Associated PI Name
@@-- @_Remote_PI_Sorts_@ : |_ Optional param type of the remote thread
@@-- @_Remote_PI_Modules_@ : |_ Asn1 module of the optional param type
@@-- Tags related to the PI that is at the origin of the thread creation:
@@-- @_Name_@, @_Kind_@, @_Parent_Function_@ : shoud be useless here
@@-- @_Param_Names_@, _Types_@, _ASN1_Modules, _Encodings_@, _Directions_@ : param vector tag
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : relevant here
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI @_Name_@
templates/concurrency_view/c_pohi_gpr/trigger.tmplt
0 → 100644
View file @
e0c9082e
@@-- The following boolean tags are available to decide if the file
@@-- shall be generated or not:
@@-- Filename_Is_Present
@@-- Skeletons
@@-- Glue
@@-- Use_POHIC
@@-- Debug
@@-- No_Stdlib
@_Use_POHIC_@
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment