Commit 79c3953e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update code of testcase

parent dda7396e
......@@ -16,9 +16,11 @@ PROPERTIES
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.controller_Initialize;
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.controller_clock;
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.stm32_controller_timer_manager_Tick;
Stack_Size => 5kbyte APPLIES TO X86_User.user_Color;
Stack_Size => 5kbyte APPLIES TO X86_User.user_Info_User;
Stack_Size => 5kbyte APPLIES TO X86_User.user_Poll;
Stack_Size => 5 kbyte APPLIES TO X86_User.user_Color;
Stack_Size => 5 kbyte APPLIES TO X86_User.user_Info_User;
Stack_Size => 5 kbyte APPLIES TO X86_User.user_Poll;
Stack_Size => 5kbyte APPLIES TO Stm32_Controller.watchdog_Kick_WD;
Stack_Size => 5kbyte APPLIES TO Stm32_Controller.watchdog_pulse;
END DeploymentView.final;
END Process_Package_proxy;
......
......@@ -68,7 +68,7 @@ FEATURES
PROPERTIES
Taste::Interface_Coordinates => "167507 116060" APPLIES TO link;
Deployment::Help => "Write your ASN.1 configuration here";
Deployment::Configuration => "{devname ""/dev/ttyUSB0"", speed b115200, bits 8}";
Deployment::Configuration => "{devname ""/dev/ttyUSB1"", speed b115200, bits 8}";
Deployment::Config => "/home/taste/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/drivers/configuration/serial.asn";
Deployment::Version => "0.1beta";
END generic_serial_pohiada;
......@@ -192,6 +192,6 @@ PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.3";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
Taste::HWLibraries => ("/home/taste/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
......@@ -10,6 +10,7 @@ PUBLIC
WITH interfaceview::IV::User;
WITH interfaceview::IV::stm32_debug;
WITH interfaceview::IV::watchdog;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
......@@ -91,6 +92,12 @@ END RI_Blue_Off;
SUBPROGRAM IMPLEMENTATION RI_Blue_Off.others
END RI_Blue_Off.others;
SUBPROGRAM RI_Kick_WD
END RI_Kick_WD;
SUBPROGRAM IMPLEMENTATION RI_Kick_WD.others
END RI_Kick_WD.others;
SYSTEM Controller
FEATURES
PI_Button : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Controller::PI_Button.others {
......@@ -149,6 +156,12 @@ FEATURES
Taste::InterfaceName => "Blue_Off";
Taste::labelInheritance => "true";
};
RI_Kick_WD : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::watchdog::PI_Kick_WD.others {
Taste::coordinates => "74486 85986";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "Kick_WD";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
......@@ -443,6 +456,8 @@ WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_pulse
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_pulse;
SUBPROGRAM IMPLEMENTATION PI_pulse.others
......@@ -450,6 +465,14 @@ PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_pulse.others;
SUBPROGRAM PI_Kick_WD
END PI_Kick_WD;
SUBPROGRAM IMPLEMENTATION PI_Kick_WD.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Kick_WD.others;
SUBPROGRAM RI_Send_to_UART
FEATURES
chars : IN PARAMETER DataView::Debug_PrintableString {
......@@ -488,8 +511,15 @@ FEATURES
Taste::coordinates => "96062 123934";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 1000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "pulse";
};
PI_Kick_WD : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::watchdog::PI_Kick_WD.others {
Taste::coordinates => "83462 125509";
Taste::RCMoperationKind => sporadic;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "Kick_WD";
};
RI_Send_to_UART : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::stm32_debug::PI_Send_to_UART.others {
Taste::coordinates => "111493 127084";
Taste::RCMoperationKind => any;
......@@ -582,6 +612,9 @@ CONNECTIONS
stm32_debug_PI_Blue_Off_Controller_RI_Blue_Off : SUBPROGRAM ACCESS stm32_debug.PI_Blue_Off -> Controller.RI_Blue_Off {
Taste::coordinates => "111492 82836 128184 82836 128184 129136 145192 129136";
};
watchdog_PI_Kick_WD_Controller_RI_Kick_WD : SUBPROGRAM ACCESS watchdog.PI_Kick_WD -> Controller.RI_Kick_WD {
Taste::coordinates => "74486 85986 70785 85986 70785 125509 83462 125509";
};
stm32_debug_PI_Send_to_UART_watchdog_RI_Send_to_UART : SUBPROGRAM ACCESS stm32_debug.PI_Send_to_UART -> watchdog.RI_Send_to_UART {
Taste::coordinates => "111493 127084 119367 127084 119367 104564 145192 104564";
};
......
/* CIF PROCESS (250, 150), (150, 75) */
process Controller;
state Green;
substructure
in (short);
out (Go_Orange);
/* CIF START (604, 136), (70, 35) */
START short ;
/* CIF NEXTSTATE (583, 191), (110, 35) */
NEXTSTATE Second_Delay;
/* CIF START (343, 131), (70, 35) */
START;
/* CIF NEXTSTATE (331, 186), (93, 35) */
NEXTSTATE First_Delay;
/* CIF state (583, 191), (110, 35) */
state Second_Delay;
/* CIF input (604, 246), (70, 35) */
input Clock;
/* CIF return (621, 301), (35, 35) */
return Go_Orange;
endstate;
/* CIF state (331, 186), (93, 35) */
state First_Delay;
/* CIF input (206, 241), (70, 35) */
input Clock;
/* CIF PROCEDURECALL (155, 296), (171, 35) */
call Set_Timer (5000, Clock);
/* CIF NEXTSTATE (185, 351), (111, 35) */
NEXTSTATE Second_Delay;
/* CIF input (361, 241), (123, 35) */
input Button (cmd);
/* CIF PROCEDURECALL (336, 296), (171, 35) */
call Set_Timer (5000, Clock);
/* CIF NEXTSTATE (364, 346), (117, 35) */
NEXTSTATE Second_Delay;
endstate;
endsubstructure;
state Red;
substructure
out (Go_Green);
......@@ -7,19 +42,6 @@ process Controller;
START;
/* CIF NEXTSTATE (15, 119), (147, 35) */
NEXTSTATE Everybody_Stopped;
/* CIF state (430, 116), (127, 35) */
state Walking_Is_Over;
/* CIF input (373, 171), (70, 35) */
input Clock;
/* CIF return (391, 226), (35, 35) */
return Go_Green;
/* CIF input (477, 171), (123, 35) */
input Button (cmd);
/* CIF task (453, 226), (172, 35) */
task Walk_Requested := True;
/* CIF NEXTSTATE (504, 281), (70, 35) */
NEXTSTATE -;
endstate;
/* CIF state (237, 112), (73, 35) */
state Walking;
/* CIF input (238, 167), (70, 35) */
......@@ -33,6 +55,19 @@ process Controller;
/* CIF NEXTSTATE (210, 382), (127, 35) */
NEXTSTATE Walking_Is_Over;
endstate;
/* CIF state (430, 116), (127, 35) */
state Walking_Is_Over;
/* CIF input (373, 171), (70, 35) */
input Clock;
/* CIF return (391, 226), (35, 35) */
return Go_Green;
/* CIF input (477, 171), (123, 35) */
input Button (cmd);
/* CIF task (453, 226), (172, 35) */
task Walk_Requested := True;
/* CIF NEXTSTATE (504, 281), (70, 35) */
NEXTSTATE -;
endstate;
/* CIF state (15, 119), (147, 35) */
state Everybody_Stopped;
/* CIF input (53, 174), (70, 35) */
......@@ -49,41 +84,6 @@ process Controller;
NEXTSTATE Walking;
endstate;
endsubstructure;
state Green;
substructure
in (short);
out (Go_Orange);
/* CIF START (604, 136), (70, 35) */
START short ;
/* CIF NEXTSTATE (583, 191), (110, 35) */
NEXTSTATE Second_Delay;
/* CIF START (343, 131), (70, 35) */
START;
/* CIF NEXTSTATE (331, 186), (93, 35) */
NEXTSTATE First_Delay;
/* CIF state (583, 191), (110, 35) */
state Second_Delay;
/* CIF input (604, 246), (70, 35) */
input Clock;
/* CIF return (621, 301), (35, 35) */
return Go_Orange;
endstate;
/* CIF state (331, 186), (93, 35) */
state First_Delay;
/* CIF input (206, 241), (70, 35) */
input Clock;
/* CIF PROCEDURECALL (155, 296), (171, 35) */
call Set_Timer (5000, Clock);
/* CIF NEXTSTATE (185, 351), (111, 35) */
NEXTSTATE Second_Delay;
/* CIF input (361, 241), (123, 35) */
input Button (cmd);
/* CIF PROCEDURECALL (336, 296), (171, 35) */
call Set_Timer (5000, Clock);
/* CIF NEXTSTATE (364, 346), (117, 35) */
NEXTSTATE Second_Delay;
endstate;
endsubstructure;
/* CIF TEXT (939, 61), (282, 152) */
timer clock;
......@@ -99,30 +99,23 @@ process Controller;
START;
/* CIF NEXTSTATE (152, 93), (75, 35) */
NEXTSTATE Off;
/* CIF state (973, 314), (70, 35) */
state Green;
/* CIF connect (1008, 369), (0, 35) */
connect Go_Orange;
/* CIF PROCEDURECALL (907, 419), (201, 35) */
call Set_Timer (2000, Clock);
/* CIF output (950, 474), (114, 35) */
output Color (Orange);
/* CIF PROCEDURECALL (961, 529), (93, 35) */
call Orange_On;
/* CIF NEXTSTATE (973, 579), (70, 35) */
NEXTSTATE Orange;
endstate;
/* CIF state (773, 61), (70, 35) */
state Orange;
/* CIF input (773, 116), (70, 35) */
input Clock;
/* CIF PROCEDURECALL (719, 171), (178, 35) */
/* CIF state (152, 93), (75, 35) */
state Off;
/* CIF input (117, 148), (134, 35) */
input Initialize (dummy);
/* CIF PROCEDURECALL (142, 203), (85, 35) */
call Kick_WD;
/* CIF PROCEDURECALL (96, 253), (178, 35) */
call Set_Timer (1000, Clock);
/* CIF output (761, 226), (92, 35) */
/* CIF output (138, 308), (92, 35) */
output Color (Red);
/* CIF PROCEDURECALL (772, 281), (71, 35) */
/* CIF PROCEDURECALL (149, 363), (71, 35) */
call Red_On;
/* CIF NEXTSTATE (773, 331), (70, 35) */
/* CIF PROCEDURECALL (145, 418), (79, 35) */
call Blue_Off;
/* CIF output (122, 468), (124, 35) */
output Info_User (Wait);
/* CIF NEXTSTATE (154, 518), (61, 35) */
NEXTSTATE Red;
endstate;
/* CIF state (548, 49), (70, 35) */
......@@ -147,21 +140,30 @@ process Controller;
NEXTSTATE Green;
enddecision;
endstate;
/* CIF state (152, 93), (75, 35) */
state Off;
/* CIF input (118, 148), (134, 35) */
input Initialize (dummy);
/* CIF PROCEDURECALL (97, 203), (178, 35) */
/* CIF state (773, 61), (70, 35) */
state Orange;
/* CIF input (773, 116), (70, 35) */
input Clock;
/* CIF PROCEDURECALL (719, 171), (178, 35) */
call Set_Timer (1000, Clock);
/* CIF output (139, 258), (92, 35) */
/* CIF output (761, 226), (92, 35) */
output Color (Red);
/* CIF PROCEDURECALL (150, 313), (71, 35) */
/* CIF PROCEDURECALL (772, 281), (71, 35) */
call Red_On;
/* CIF PROCEDURECALL (146, 368), (79, 35) */
call Blue_Off;
/* CIF output (123, 418), (124, 35) */
output Info_User (Wait);
/* CIF NEXTSTATE (155, 468), (61, 35) */
/* CIF NEXTSTATE (773, 331), (70, 35) */
NEXTSTATE Red;
endstate;
/* CIF state (973, 314), (70, 35) */
state Green;
/* CIF connect (1008, 369), (0, 35) */
connect Go_Orange;
/* CIF PROCEDURECALL (907, 419), (201, 35) */
call Set_Timer (2000, Clock);
/* CIF output (950, 474), (114, 35) */
output Color (Orange);
/* CIF PROCEDURECALL (961, 529), (93, 35) */
call Orange_On;
/* CIF NEXTSTATE (973, 579), (70, 35) */
NEXTSTATE Orange;
endstate;
endprocess Controller;
\ No newline at end of file
......@@ -40,22 +40,33 @@ with Interfaces; use Interfaces;
package body STM32_Debug is
Transceiver : USART renames USART_2;
Transceiver_AF : constant STM32.GPIO_Alternate_Function := GPIO_AF_USART2_7;
TX_Pin : constant GPIO_Point := PA2;
RX_Pin : constant GPIO_Point := PA3;
Controller : DMA_Controller renames DMA_1;
Tx_Channel : constant DMA_Channel_Selector := Channel_4;
Tx_Stream : constant DMA_Stream_Selector := Stream_6;
-- PA2/PA3 are the GPIOs corresponding to the ftdi of the discovery shield
-- they are used for taste GUI communication
-- use PC6/PC7 for the debug printf
-- Transceiver : USART renames USART_2;
-- Transceiver_AF : constant STM32.GPIO_Alternate_Function := GPIO_AF_USART2_7;
-- TX_Pin : constant GPIO_Point := PA2;
-- RX_Pin : constant GPIO_Point := PA3;
-- Controller : DMA_Controller renames DMA_1;
-- Tx_Channel : constant DMA_Channel_Selector := Channel_4;
-- Tx_Stream : constant DMA_Stream_Selector := Stream_6;
-- Rx_Channel : constant DMA_Channel_Selector := Channel_5;
-- Rx_Stream : constant DMA_Stream_Selector := Stream_5;
-- USART_IRQ : constant Interrupt_ID := USART2_Interrupt;
TX_Pin : constant GPIO_Point := PC6;
RX_Pin : constant GPIO_Point := PC7;
Controller : DMA_Controller renames DMA_2;
Tx_Channel : constant DMA_Channel_Selector := Channel_5;
Tx_Stream : constant DMA_Stream_Selector := Stream_7;
Rx_Channel : constant DMA_Channel_Selector := Channel_5;
Rx_Stream : constant DMA_Stream_Selector := Stream_5;
Rx_Stream : constant DMA_Stream_Selector := Stream_1;
USART_IRQ : constant Interrupt_ID := USART6_Interrupt;
Transceiver : USART renames USART_6;
Transceiver_AF : constant STM32.GPIO_Alternate_Function := GPIO_AF_USART6_8;
-- DMA_Tx_IRQ : constant Interrupt_ID := DMA1_Stream6_Interrupt;
-- DMA_Rx_IRQ : constant Interrupt_ID := DMA1_Stream5_Interrupt;
USART_IRQ : constant Interrupt_ID := USART2_Interrupt;
-- One-message buffer for reception
Incoming_Msg : aliased asn1sccDebug_PrintableString :=
......
......@@ -4,6 +4,48 @@ process Watchdog;
START;
/* CIF NEXTSTATE (408, 71), (70, 35) */
NEXTSTATE Off;
/* CIF state (809, 55), (70, 35) */
state On, Off;
/* CIF input (805, 110), (77, 35) */
input Kick_WD;
/* CIF PROCEDURECALL (736, 165), (215, 40) */
call Send_to_UART('Initialized
');
/* CIF NEXTSTATE (782, 220), (123, 35) */
NEXTSTATE Running_Ping;
endstate;
/* CIF state (1002, 265), (118, 35) */
state Running_Pong;
/* CIF input (1027, 320), (70, 35) */
input pulse;
/* CIF PROCEDURECALL (956, 375), (212, 40) */
call Send_to_UART('Pong
');
/* CIF NEXTSTATE (1005, 435), (112, 35) */
NEXTSTATE Running_Pong;
endstate;
/* CIF state (789, 264), (118, 35) */
state Running_Ping;
/* CIF input (814, 319), (70, 35) */
input pulse;
/* CIF PROCEDURECALL (742, 374), (212, 40) */
call Send_to_UART('Ping
');
/* CIF NEXTSTATE (792, 434), (112, 35) */
NEXTSTATE Running_Pong;
endstate;
/* CIF state (591, 43), (70, 35) */
state On;
/* CIF input (591, 98), (70, 35) */
input pulse;
/* CIF PROCEDURECALL (559, 153), (134, 35) */
call SWitch_Leds_OFF;
/* CIF PROCEDURECALL (547, 208), (158, 40) */
call Send_to_UART('Pong
');
/* CIF NEXTSTATE (591, 268), (70, 35) */
NEXTSTATE Off;
endstate;
/* CIF state (408, 71), (70, 35) */
state Off;
/* CIF input (408, 126), (70, 35) */
......@@ -16,16 +58,4 @@ process Watchdog;
/* CIF NEXTSTATE (408, 296), (70, 35) */
NEXTSTATE On;
endstate;
/* CIF state (612, 43), (70, 35) */
state On;
/* CIF input (612, 98), (70, 35) */
input pulse;
/* CIF PROCEDURECALL (579, 153), (134, 35) */
call SWitch_Leds_OFF;
/* CIF PROCEDURECALL (567, 208), (158, 40) */
call Send_to_UART('Pong
');
/* CIF NEXTSTATE (612, 268), (70, 35) */
NEXTSTATE Off;
endstate;
endprocess Watchdog;
\ No newline at end of file
Markdown is supported
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