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
e794562a
Commit
e794562a
authored
Nov 29, 2017
by
Maxime Perrotin
Browse files
Parse busses
parent
624feb74
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/aadl_parser.adb
View file @
e794562a
...
...
@@ -67,7 +67,6 @@ procedure AADL_Parser is
AADL_Version
:
AADL_Version_Type
:=
Ocarina
.
AADL_V2
;
procedure
Parse_Command_Line
;
procedure
Process_Deployment_View
(
My_Root
:
Node_Id
);
-- procedure Process_DataView (My_Root : Node_Id);
procedure
Browse_Deployment_View_System
(
My_System
:
Node_Id
;
NodeName
:
String
)
with
Unreferenced
;
...
...
@@ -138,12 +137,6 @@ procedure AADL_Parser is
-- Current_function is read from the list of system subcomponents
-----------------------------
-- Process_Deployment_View --
-----------------------------
procedure
Process_Deployment_View
(
My_Root
:
Node_Id
)
is
null
;
-------------------------------------
-- Load_Deployment_View_Properties --
-------------------------------------
...
...
@@ -173,7 +166,6 @@ procedure AADL_Parser is
"memory_properties.aadl"
&
"modeling_properties.aadl"
&
"arinc653.aadl"
&
-- "arinc653_properties.aadl" &
"base_types.aadl"
&
"data_model.aadl"
&
"deployment.aadl"
;
...
...
@@ -817,7 +809,8 @@ procedure AADL_Parser is
end
Initialize
;
IV_Root
:
Node_Id
;
AST
:
Complete_Interface_View
;
IV_AST
:
Complete_Interface_View
;
DV_AST
:
Complete_Deployment_View
;
begin
Banner
;
...
...
@@ -834,9 +827,9 @@ begin
Get_String_Name
(
"interfaceview.others"
);
IV_Root
:=
Root_System
(
Instantiate_Model
(
Root
=>
Interface_Root
));
AST
:=
AADL_to_Ada_IV
(
IV_Root
);
IV_
AST
:=
AADL_to_Ada_IV
(
IV_Root
);
Debug_Dump_IV
(
AST
);
Debug_Dump_IV
(
IV_
AST
);
-- Now, we are done with the interface view. We now analyze the
-- deployment view.
...
...
@@ -845,15 +838,17 @@ begin
Load_Deployment_View_Properties
(
Deployment_Root
);
Process_Deployment_View
(
Deployment_Root
);
DV_AST
:=
AADL_To_Ada_DV
(
Deployment_Root
);
-- Process_Deployment_View (Deployment_Root);
Ocarina
.
Configuration
.
Reset_Modules
;
Ocarina
.
Reset
;
exception
when
Error
:
AADL_Parser_Error
=>
when
Error
:
AADL_Parser_Error
|
Deployment_View_Error
=>
Put
(
Red_Bold
&
"[ERROR] "
&
White
);
Put_Line
(
Exception_Message
(
Error
)
&
No_Color
);
OS_Exit
(
1
);
when
E
:
others
=>
Errors
.
Display_Bug_Box
(
E
);
end
AADL_Parser
;
src/deployment_view.adb
View file @
e794562a
...
...
@@ -73,15 +73,9 @@ package body Deployment_View is
(
Corresponding_Declaration
(
Bus
))
/=
No_Node
then
Set_Str_To_Name_Buffer
(
""
);
Get_Name_String
(
ATN
.
Name
(
ATN
.
Identifier
(
ATN
.
Namespace
(
Corresponding_Declaration
(
Bus
)))));
Get_Name_String
(
ATN
.
Name
(
ATN
.
Identifier
(
ATN
.
Namespace
(
Corresponding_Declaration
(
Bus
)))));
Pkg_Name
:=
Name_Find
;
-- C_Add_Package
-- (Get_Name_String (Pkg_Name),
Set_Str_To_Name_Buffer
(
""
);
Get_Name_String
(
Pkg_Name
);
Add_Str_To_Name_Buffer
(
"::"
);
...
...
@@ -91,12 +85,12 @@ package body Deployment_View is
else
Classifier
:=
Name
(
Identifier
(
Bus
));
end
if
;
return
Taste_Bus
'(
Name
=>
return
Taste_Bus
'(
Name
=>
US
(
Get_Name_String
(
Name
(
Identifier
(
Elem
)))),
Classifier
=>
US
(
Get_Name_String
(
Classifier
)),
Properties
=>
Properties
);
AADL_Package
=>
US
(
Get_Name_String
(
Pkg_Name
)),
Classifier
=>
US
(
Get_Name_String
(
Classifier
)),
Properties
=>
Properties
);
end
Parse_Bus
;
begin
My_Root_System
:=
Initialize
(
System
);
...
...
@@ -115,7 +109,6 @@ package body Deployment_View is
-- (CI, Get_Name_String (Name (Identifier (Subs))));
elsif
Get_Category_Of_Component
(
CI
)
=
CC_Bus
then
Busses
.
Append
(
Parse_Bus
(
Subs
,
CI
));
end
if
;
Subs
:=
Next_Node
(
Subs
);
end
loop
;
...
...
src/deployment_view.ads
View file @
e794562a
...
...
@@ -42,9 +42,10 @@ package Deployment_View is
type
Taste_Bus
is
record
Name
:
Unbounded_String
;
Classifier
:
Unbounded_String
;
Properties
:
Property_Maps
.
Map
;
Name
:
Unbounded_String
;
AADL_Package
:
Unbounded_String
;
Classifier
:
Unbounded_String
;
Properties
:
Property_Maps
.
Map
;
end
record
;
package
Taste_Busses
is
new
Indefinite_Vectors
(
Natural
,
Taste_Bus
);
...
...
test/common/ocarina_components.aadl
View file @
e794562a
...
...
@@ -783,20 +783,20 @@ public
--
used
through
the
TCP_IP_Device
defined
in
TCP_IP_Protocol
--
package
.
processor
Generic_Processor
features
eth0_tcp_ip
:
requires
bus
access
Generic_Bus
::
Generic_Bus
.
impl
;
--
One
ethernet
card
,
connected
to
the
processor
.
It
is
assumed
--
later
that
it
is
used
through
a
TCP
/
IP
stack
end
Generic_Processor
;
processor
implementation
Generic_Processor
.
impl
properties
Deployment
::
Execution_Platform
=>
Native
;
Scheduling_Protocol
=>
(
Posix_1003_Highest_Priority_First_Protocol
);
Priority_Range
=>
0
..
255
;
end
Generic_Processor
.
impl
;
--
processor
Generic_Processor
--
features
--
eth0_tcp_ip
:
requires
bus
access
Generic_Bus
::
Generic_Bus
.
impl
;
--
--
One
ethernet
card
,
connected
to
the
processor
.
It
is
assumed
--
--
later
that
it
is
used
through
a
TCP
/
IP
stack
--
--
end
Generic_Processor
;
--
--
processor
implementation
Generic_Processor
.
impl
--
properties
--
Deployment
::
Execution_Platform
=>
Native
;
--
Scheduling_Protocol
=>
(
Posix_1003_Highest_Priority_First_Protocol
);
--
Priority_Range
=>
0
..
255
;
--
end
Generic_Processor
.
impl
;
------------
--
MEMORY
--
...
...
@@ -838,15 +838,15 @@ public
--
XXX
Add
UARTS
end
LEON2
;
processor
implementation
LEON2
.
impl
properties
Deployment
::
Execution_Platform
=>
LEON_ORK
;
--
for
using
GNATforLEON
--
Information
on
the
scheduler
used
by
GNATforLEON
Scheduling_Protocol
=>
(
Posix_1003_Highest_Priority_First_Protocol
);
Priority_Range
=>
0
..
255
;
end
LEON2
.
impl
;
--
processor
implementation
LEON2
.
impl
--
properties
--
Deployment
::
Execution_Platform
=>
LEON_ORK
;
--
for
using
GNATforLEON
--
--
--
Information
on
the
scheduler
used
by
GNATforLEON
--
--
Scheduling_Protocol
=>
(
Posix_1003_Highest_Priority_First_Protocol
);
--
Priority_Range
=>
0
..
255
;
--
end
LEON2
.
impl
;
------------
--
MEMORY
--
...
...
@@ -2132,78 +2132,167 @@ with Cheddar_Properties;
processor arm
end arm;
processor c
ortex_m
extends arm
processor c
razyflie_v2
extends arm
properties
Deployment::Execution_Platform => GNAT_Runtime;
end cortex_m;
Deployment::Ada_Runtime => "crazyflie_full";
end crazyflie_v2;
processor implementation c
ortex_m.i
processor implementation c
razyflie_v2.gnat
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Cheddar_Properties::Scheduler_Quantum => 0 Ms;
Cheddar_Properties::Preemptive_Scheduler => true;
end c
ortex_m.i
;
end c
razyflie_v2.gnat
;
processor nds extends arm
end nds;
processor implementation nds.rtems
processor stm32f407_discovery extends arm
properties
Deployment::Execution_Platform => GNAT_Runtime;
Deployment::Ada_Runtime => "stm32f407_discovery_full";
end stm32f407_discovery;
processor implementation stm32f407_discovery.gnat2017
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Cheddar_Properties::Scheduler_Quantum => 0 Ms;
Cheddar_Properties::Preemptive_Scheduler => true;
Deployment::Execution_Platform => NDS_RTEMS;
end nds.rtems;
end stm32f407_discovery.gnat2017;
processor gumstix extends arm
end gumstix;
processor stm32f429_discovery extends arm
properties
Deployment::Execution_Platform => GNAT_Runtime;
Deployment::Ada_Runtime => "stm32f429_discovery_full";
end stm32f429_discovery;
processor implementation
gumstix.rtems
processor implementation
stm32f429_discovery.gnat2017
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Cheddar_Properties::Scheduler_Quantum => 0 Ms;
Cheddar_Properties::Preemptive_Scheduler => true;
Deployment::Execution_Platform => GUMSTIX_RTEMS;
end gumstix.rtems;
end stm32f429_discovery.gnat2017;
processor nds extends arm
end nds;
-- processor implementation nds.rtems
-- properties
-- Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
-- Priority_Range => 0 .. 255;
-- Cheddar_Properties::Scheduler_Quantum => 0 Ms;
-- Cheddar_Properties::Preemptive_Scheduler => true;
-- Deployment::Execution_Platform => NDS_RTEMS;
-- end nds.rtems;
processor gumstix extends arm
end gumstix;
-- processor implementation gumstix.rtems
-- properties
-- Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
-- Priority_Range => 0 .. 255;
-- Cheddar_Properties::Scheduler_Quantum => 0 Ms;
-- Cheddar_Properties::Preemptive_Scheduler => true;
-- Deployment::Execution_Platform => GUMSTIX_RTEMS;
-- end gumstix.rtems;
end ocarina_processors_arm;
package ocarina_processors_leon
public
with Deployment;
with Cheddar_Properties;
processor leon
end leon;
processor implementation leon.rtems
processor leon2 extends leon
end leon2;
processor gr712 extends leon
end gr712;
processor gr740 extends leon
end gr740;
-- processor implementation leon.rtems
-- properties
-- Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
-- Priority_Range => 0 .. 255;
-- Scheduler_Quantum => 0 Ms;
-- Preemptive_Scheduler => true;
-- Deployment::Execution_Platform => LEON_RTEMS;
-- end leon.rtems;
processor implementation leon.rtems_posix
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Cheddar_Properties::Scheduler_Quantum => 0 Ms;
Cheddar_Properties::Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS;
end leon.rtems;
Scheduler_Quantum => 0 Ms;
Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS_POSIX;
EnvVars => "RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.12-2017.07.17/sparc-rtems4.12/leon3";
end leon.rtems_posix;
processor implementation leon.rtems_posix
processor implementation leon
2
.rtems
412
_posix
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Cheddar_Properties::
Scheduler_Quantum => 0 Ms;
Cheddar_Properties::
Preemptive_Scheduler => true;
Scheduler_Quantum => 0 Ms;
Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS_POSIX;
end leon.rtems_posix;
EnvVars => "RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.12-2017.07.17/sparc-rtems4.12/leon2";
end leon2.rtems412_posix;
processor implementation leon3.rtems412_posix
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Scheduler_Quantum => 0 Ms;
Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS_POSIX;
EnvVars => "RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.12-2017.07.17/sparc-rtems4.12/leon3";
end leon3.rtems412_posix;
processor implementation gr712.rtems412_posix
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Scheduler_Quantum => 0 Ms;
Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS_POSIX;
EnvVars => "RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.12-2017.07.17/sparc-rtems4.12/gr712rc:CFLAGS=-DCONFIGURE_SMP_APPLICATION -DCONFIGURE_MAXIMUM_PROCESSORS=2 ";
end gr712.rtems412_posix;
processor implementation
leon.ork
processor implementation
gr740.rtems412_posix
properties
Deployment::Execution_Platform => LEON_ORK;
end leon.ork;
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Scheduler_Quantum => 0 Ms;
Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS_POSIX;
EnvVars => "RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.12-2017.07.17/sparc-rtems4.12/gr740:CFLAGS=-DCONFIGURE_SMP_APPLICATION -DCONFIGURE_MAXIMUM_PROCESSORS=4 ";
end gr740.rtems412_posix;
processor implementation gr740.rtems410_gaisler_posix
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
Scheduler_Quantum => 0 Ms;
Preemptive_Scheduler => true;
Deployment::Execution_Platform => LEON_RTEMS_POSIX;
EnvVars => "RTEMS_MAKEFILE_PATH_LEON=/opt/rtems-4.10/sparc-rtems/leon3:CFLAGS=-qngmp:LDFLAGS=-qngmp ";
end gr740.rtems410_gaisler_posix;
-- processor implementation leon.ork
-- properties
-- Deployment::Execution_Platform => LEON_ORK;
-- end leon.ork;
processor leon3
end leon3;
...
...
@@ -2214,27 +2303,27 @@ end xtratum_partition;
virtual processor implementation xtratum_partition.generic
end xtratum_partition.generic;
processor implementation leon3.scoc3
properties
Deployment::Execution_Platform => LEON3_SCOC3;
end leon3.scoc3;
processor implementation leon3.xtratum
properties
Deployment::Execution_Platform => LEON3_XTRATUM;
end leon3.xtratum;
processor implementation leon3.xtratum_2partitions extends leon3.xtratum
subcomponents
part1 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
part2 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
-- properties
-- ARINC653::Partition_Slots => (500ms, 500ms);
-- ARINC653::Slots_Allocation => (reference (part1), reference (part2));
-- ARINC653::Module_Major_Frame => 1000ms;
end leon3.xtratum_2partitions;
--
processor implementation leon3.scoc3
--
properties
--
Deployment::Execution_Platform => LEON3_SCOC3;
--
end leon3.scoc3;
--
processor implementation leon3.xtratum
--
properties
--
Deployment::Execution_Platform => LEON3_XTRATUM;
--
end leon3.xtratum;
--
processor implementation leon3.xtratum_2partitions extends leon3.xtratum
--
subcomponents
--
part1 : virtual processor xtratum_partition.generic
--
{ Deployment::Execution_Platform => LEON3_XM3;};
--
part2 : virtual processor xtratum_partition.generic
--
{ Deployment::Execution_Platform => LEON3_XM3;};
-- properties
-- ARINC653::Partition_Slots => (500ms, 500ms);
-- ARINC653::Slots_Allocation => (reference (part1), reference (part2));
-- ARINC653::Module_Major_Frame => 1000ms;
--
end leon3.xtratum_2partitions;
end ocarina_processors_leon;
package ocarina_processors_x86
...
...
@@ -2260,50 +2349,50 @@ properties
end x86.win32;
processor implementation x86.linux_bench
properties
Scheduling_Protocol => (POSIX_1003_HIGHEST_PRIORITY_FIRST_PROTOCOL);
Deployment::Execution_Platform => bench;
end x86.linux_bench;
processor implementation x86.linux32
properties
Deployment::Execution_Platform => Linux32;
end x86.linux32;
processor implementation x86.linux64
properties
Deployment::Execution_Platform => Linux64;
end x86.linux64;
-- processor implementation x86.linux_bench
-- properties
-- Scheduling_Protocol => (POSIX_1003_HIGHEST_PRIORITY_FIRST_PROTOCOL);
-- Deployment::Execution_Platform => bench;
-- end x86.linux_bench;
processor implementation x86.native
properties
Deployment::Execution_Platform => Native;
end x86.native;
processor implementation x86.native_compcert
properties
Deployment::Execution_Platform => Native_Compcert;
end x86.native_compcert;
processor implementation x86.rtems
properties
Deployment::Execution_Platform => X86_RTEMS;
end x86.rtems;
processor implementation x86.rtems_posix
properties
Deployment::Execution_Platform => X86_RTEMS_POSIX;
end x86.rtems_posix;
processor implementation x86.xenomai_posix
properties
Deployment::Execution_Platform => linux32_xenomai_posix;
end x86.xenomai_posix;
processor implementation x86.xenomai_native
properties
Deployment::Execution_Platform => linux32_xenomai_native;
end x86.xenomai_native;
-- processor implementation x86.linux32
-- properties
-- Deployment::Execution_Platform => Linux32;
-- end x86.linux32;
--
-- processor implementation x86.linux64
-- properties
-- Deployment::Execution_Platform => Linux64;
-- end x86.linux64;
-- processor implementation x86.native
-- properties
-- Deployment::Execution_Platform => Native;
-- end x86.native;
--
-- processor implementation x86.native_compcert
-- properties
-- Deployment::Execution_Platform => Native_Compcert;
-- end x86.native_compcert;
--
-- processor implementation x86.rtems
-- properties
-- Deployment::Execution_Platform => X86_RTEMS;
-- end x86.rtems;
--
-- processor implementation x86.rtems_posix
-- properties
-- Deployment::Execution_Platform => X86_RTEMS_POSIX;
-- end x86.rtems_posix;
-- processor implementation x86.xenomai_posix
-- properties
-- Deployment::Execution_Platform => linux32_xenomai_posix;
-- end x86.xenomai_posix;
--
-- processor implementation x86.xenomai_native
-- properties
-- Deployment::Execution_Platform => linux32_xenomai_native;
-- end x86.xenomai_native;
end ocarina_processors_x86;
test/test2/Makefile
View file @
e794562a
...
...
@@ -3,7 +3,14 @@ AADL_PARSER=../../aadl_parser
all
:
test-parse
test-parse
:
$(AADL_PARSER)
-gw
-i
InterfaceView.aadl
-d
DataView.aadl ../common/TASTE_IV_Properties.aadl
$(AADL_PARSER)
-gw
\
-glue
\
-i
InterfaceView.aadl
\
-c
DeploymentView.aadl
\
-d
DataView.aadl
\
../common/TASTE_IV_Properties.aadl
\
../common/ocarina_components.aadl
\
../common/TASTE_DV_Properties.aadl
clean
:
rm
-rf
obj
$(exec)
*
~
...
...
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