Commit 65362074 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update simulation templates

parent a87fe55f
@@-- 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
@@-- The up to date list of tags available for this template is available here:
@@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fpartition.tmplt
@@-- If you are using vim, go over the URL and pres gx in to follow the link
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_node.ascii
# Build of node @_Node_Name_@ for @_CPU_Platform_@
# (rule generated by templates/concurrency_view/aadl_4_makefile/node.tmplt)
@@IF@@ @_CPU_Platform_@ = PLATFORM_LEON_RTEMS_POSIX
......@@ -20,10 +18,11 @@
@@END_IF@@
$(MAKE) -j -C @_Node_Name_@ -f Makefile.@_Node_Name_@
@_LOWER:Node_Name_@_simu: @_LOWER:REPLACE_ALL(,/):Partition_Names_@ DriversConfig/drivers_config.h simulation.asn
asn2dataModel -toAda -allboards -o ../dataview/Ada simulation.asn ../dataview/dataview-uniq.asn
@@IF@@ @_Target_@ = SIMU
@_LOWER:Node_Name_@_simu: @_LOWER:REPLACE_ALL(,/):Partition_Names_@_simu DriversConfig/drivers_config.h simulation.asn
#asn2dataModel -toAda -allboards -o ../dataview/Ada simulation.asn ../dataview/dataview-uniq.asn
$(MAKE) -j -C @_Node_Name_@ -f Makefile.@_Node_Name_@ simulate
@@END_IF@@
# Force build of node @_Node_Name_@ for RTEMS
# (rule generated by templates/concurrency_view/aadl_4_makefile/node.tmplt)
......
......@@ -30,6 +30,27 @@
../dataview/dataview-uniq.asn
@@END_INLINE@@
@@-- For simulation target, add simulation.asn (common part should be shared)
@_LOWER:Name_@_simu: @_REPLACE_ALL(,/ ):LOWER:Block_Names_@
@@INLINE( args=")( )("; \\\n mkdir -p ..\/dataview\/Ada; mono $(shell which asn1.exe) -Ada -equal --target allboards -typePrefix asn1Scc -o ..\/dataview\/Ada $$args )@@
@@TABLE@@
@@IF@@ @_Block_Languages_@ = SDL
@@-- Use wildcard because in the case of the SDL to C backend the _datamodel files are not generated (yet)
@@IF@@ @_Block_Instance_Of_@ = ""
${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Names_@_datamodel.asn}
@@ELSE@@
${wildcard ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Instance_Of_@_datamodel.asn}
@@END_IF@@
@@-- If the function has context parameters, add the file
${wildcard ../@_LOWER:Block_Names_@/SDL/Context-@_LOWER:REPLACE_ALL(_/-):Block_Names_@.asn}
@@END_IF@@
@@END_TABLE@@
../dataview/dataview-uniq.asn
simulation.asn
@@END_INLINE@@
# Build of partition @_Name_@ for RTEMS (generate adainit)
# (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt)
@_LOWER:Name_@_rtems_ada : @_LOWER:Name_@
......
......@@ -7,7 +7,16 @@ Simulation-DataView DEFINITIONS ::=
BEGIN
IMPORTS
@_Threads'Indent_@
-- Import generic integer type (used for timers)
T-UInt32 FROM TASTE-BasicTypes
-- Import the SDL function states needed for the global system state
@@INLINE( )(\n )()@@
@@TABLE'ALIGN_ON(" ")@@
@@IF@@ @_Block_Languages_@ = SDL
@_CAPITALIZE:REPLACE_ALL(_/-):Block_Names_@-Context FROM @_CAPITALIZE:REPLACE_ALL(_/-):Block_Names_@-Datamodel
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
;
@_Nodes'Indent_@
......@@ -15,8 +24,19 @@ BEGIN
Events ::= CHOICE {
@@INLINE( )(,\n )()@@
@@TABLE'ALIGN_ON(" ")@@
@_LOWER:REPLACE_ALL(_/-):Block_Names_@ @_REPLACE_ALL(_/-):CAPITALIZE:Block_Names_@-Event
@_LOWER:REPLACE_ALL(_/-):Block_Names_@ @_REPLACE_ALL(_/-):CAPITALIZE:Block_Names_@-Event
@@END_TABLE@@
@@END_INLINE@@
}
-- Global system state
System-State ::= SEQUENCE {
@@INLINE( )(,\n )()@@
@@TABLE'ALIGN_ON(" ")@@
@@IF@@ @_Block_Languages_@ = SDL
@_LOWER:REPLACE_ALL(_/-):Block_Names_@ @_CAPITALIZE:REPLACE_ALL(_/-):Block_Names_@-Context
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
}
END
......@@ -4,7 +4,9 @@
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_thread.ascii
@@-- ASN.1 Module imports
@@IF@@ @_Param_Types'Length_@ > 0
-- ASN.1 modules used by thread @_Thread_Name_@
@@END_IF@@
@@TABLE'ALIGN_ON(" ")@@
@_Param_Types_@ FROM @_REPLACE_ALL(_/-):Param_ASN1_Modules_@
@@END_TABLE@@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment