Tools

Scheduling Tool

Tool architecture The operation of the Scheduling Algorithm produces a time-triggered RODL for each application modeled in XML.

Application description of case study smartfusion

Generic DTD description format.

Generic XSL description format.

The main idea of the Scheduling Algorithm is to represent the set of service tasks and their dependencies as a graph, the so-called precedence graph. Each vertex of the graph embodies an associated service task, whereas an edge represents a causal dependency between the bordering vertices, i.e. the service tasks. Additionally, (causal) edges are directed to represent the direction of the data flow and precedence of that dependency. An undirected edge in the precedence graph corresponds to a phase dependency.

After applying the tool to the xml description of the smart fusion case study, it outputs the generated code:

#ifndef __FILES_DEF_H__
#define __FILES_DEF_H__

/*
	Filesystem Definition for a TTP/A Node

	This File was generated by The TTP/A Scheduler.
		by Christian Paukovits
		version 0.1 (Prototype), Summer 2004

	This is the definition file for node "IR_node1"
*/

#include	"rodl.h"
#include	"constants.h"

.section .filesys

/* This is the RODL of application "application1". */
#define RODL0
.global rodl0
rodl0:
	.byte LONG2BYTES(RODL_ENTRY(OP_EXEC, IFS_ADDR(0, 0, 0), 0, 0, DFP_UNPR, VALID))
	.byte LONG2BYTES(RODL_ENTRY(OP_SEND, IFS_ADDR(34, 1, 0), 1, 0, DFP_UNPR, VALID))
	.byte LONG2BYTES(RODL_ENTRY(OP_RECV, IFS_ADDR(0, 0, 0), 2, 5, DFP_UNPR, INVALID))

.global rodl0_end
rodl0_end:


/*
IFS file definition.
This file was particularly created for the active application.
You should alter it, in case you activate another RODL!
*/
#define FILE22
.global file22
file22:
	.byte 0x00, 0x00, 0x00, 0x00	/* this is a dummy record */
	.byte 0x00, 0x00, 0x00, 0x00	/* this is a dummy record */
.global file22_end
file22_end:



#endif
/* End of the Filesystem Definition */

...and states the results of the post-verification:

>>> initializing XML Parser...
>>> trying to parse file: specification/smartfusion.xml
>>> parsed file specification/smartfusion.xml successfully!

>>> retrieving document root element...
>>> ...is a "specification" element
>>> seems to be a TTP/A specification

>>> retrieving target information
	+++ baudrate is 9600 baud
		...so we have a TTP/A slot length of 1354.17 micsec
	+++ found 5 target node specifications
		Node Nr. 1: "master_node"	Frequency: 16.00 MHz
		Node Nr. 2: "display_node"	Frequency: 16.00 MHz
		Node Nr. 3: "IR_node1"	Frequency: 8.00 MHz
		Node Nr. 4: "IR_node2"	Frequency: 8.00 MHz
		Node Nr. 5: "IR_node3"	Frequency: 8.00 MHz
	+++ found the TTPA Master at node 1: "master_node"

>>> retrieving application information
	+++ found 1 application specifications
		Application Nr. 1: "application1"
	+++ found the active application nr. 1: "application1"

>>> retrieving services of application "application1"
	+++ found 5 service specifications
		Service Nr. 1: "IR1"
		Service Nr. 2: "IR2"
		Service Nr. 3: "IR3"
		Service Nr. 4: "fusion"
		Service Nr. 5: "display"

>>> retrieving mapping information of application "application1"
	+++ found 5 service-to-node mappings

>>> summary of the 5 services of application "application1":
	+++ service "IR1" runs on node "IR_node1"
		...this service has a deadline of 1000.00 micsec
		...this means: deadline within 1 slots
		...this service has a execution time of 25.00 micsec
		...this means: execution time within 1 slots
	+++ service "IR2" runs on node "IR_node2"
		...this service has a deadline of 1000.00 micsec
		...this means: deadline within 1 slots
		...this service has a execution time of 25.00 micsec
		...this means: execution time within 1 slots
	+++ service "IR3" runs on node "IR_node3"
		...this service has a deadline of 1000.00 micsec
		...this means: deadline within 1 slots
		...this service has a execution time of 25.00 micsec
		...this means: execution time within 1 slots
	+++ service "fusion" runs on node "master_node"
		...this service has a deadline of 10000.00 micsec
		...this means: deadline within 8 slots
		...this service has a execution time of 4.00 micsec
		...this means: execution time within 1 slots
	+++ service "display" runs on node "display_node"
		...this service has a deadline of 100000.00 micsec
		...this means: deadline within 74 slots
		...this service has a execution time of 7.00 micsec
		...this means: execution time within 1 slots

>>> retrieving causal dependencies of application "application1"
	+++ found 4 causal dependencies
	+++ summary of causal dependency nr. 1: "IR1toFusion"
			..."after"-service: "fusion"
			..."before"-service: "IR1"
			...this dependency has a deadline of 10000.00 micsec
			...this means: deadline within 8 slots
			...this dependency has a upper bound of 0.00 micsec
			...this means: upper bound within 0 slots
			...this dependency has a lower bound of 0.00 micsec
			...this means: lower bound within 0 slots
	+++ summary of causal dependency nr. 2: "IR2toFusion"
			..."after"-service: "fusion"
			..."before"-service: "IR2"
			...this dependency has a deadline of 10000.00 micsec
			...this means: deadline within 8 slots
			...this dependency has a upper bound of 0.00 micsec
			...this means: upper bound within 0 slots
			...this dependency has a lower bound of 0.00 micsec
			...this means: lower bound within 0 slots
	+++ summary of causal dependency nr. 3: "IR3toFusion"
			..."after"-service: "fusion"
			..."before"-service: "IR3"
			...this dependency has a deadline of 10000.00 micsec
			...this means: deadline within 8 slots
			...this dependency has a upper bound of 0.00 micsec
			...this means: upper bound within 0 slots
			...this dependency has a lower bound of 0.00 micsec
			...this means: lower bound within 0 slots
	+++ summary of causal dependency nr. 4: "FusionToDisplay"
			..."after"-service: "display"
			..."before"-service: "fusion"
			...this dependency has a deadline of 50000.00 micsec
			...this means: deadline within 37 slots
			...this dependency has a upper bound of 0.00 micsec
			...this means: upper bound within 0 slots
			...this dependency has a lower bound of 0.00 micsec
			...this means: lower bound within 0 slots

>>> retrieving connection dependencies of application "application1"
	+++ found 4 connection dependencies
	+++ summary of connection dependency nr. 1: "IR1connection"
			..."source"-service: "IR1"
			..."target"-service: "fusion"
			...the connection transfers 1 bytes
	+++ summary of connection dependency nr. 2: "IR2connection"
			..."source"-service: "IR2"
			..."target"-service: "fusion"
			...the connection transfers 1 bytes
	+++ summary of connection dependency nr. 3: "IR3connection"
			..."source"-service: "IR3"
			..."target"-service: "fusion"
			...the connection transfers 1 bytes
	+++ summary of connection dependency nr. 4: "Fusionconnection"
			..."source"-service: "fusion"
			..."target"-service: "display"
			...the connection transfers 1 bytes

>>> retrieving phase dependencies of application "application1"
	+++ found 2 connection dependencies
	+++ summary of phase dependency nr. 1: "phaseIR1IR2"
			...this phase involves service "IR1" and "IR2"
			...this phase has a value of 0.00 micsec
			...this means: deadline within 0 slots
			...this phase has a upper bound of 1000.00 micsec
			...this means: upper bound within 1 slots
			...this phase has a lower bound of 1000.00 micsec
			...this means: lower bound within 1 slots
	+++ summary of phase dependency nr. 2: "phaseIR2IR3"
			...this phase involves service "IR2" and "IR3"
			...this phase has a value of 0.00 micsec
			...this means: deadline within 0 slots
			...this phase has a upper bound of 1000.00 micsec
			...this means: upper bound within 1 slots
			...this phase has a lower bound of 1000.00 micsec
			...this means: lower bound within 1 slots

>>> opening output files for each node...
	+++ trying to open file "outputfiles/master_node_files_def.h"
	+++ trying to open file "outputfiles/display_node_files_def.h"
	+++ trying to open file "outputfiles/IR_node1_files_def.h"
	+++ trying to open file "outputfiles/IR_node2_files_def.h"
	+++ trying to open file "outputfiles/IR_node3_files_def.h"

>>> writing headers for each output file...
	+++ writing header into outputfile of node nr. 1 "master_node"
	+++ writing header into outputfile of node nr. 2 "display_node"
	+++ writing header into outputfile of node nr. 3 "IR_node1"
	+++ writing header into outputfile of node nr. 4 "IR_node2"
	+++ writing header into outputfile of node nr. 5 "IR_node3"

>>> building precedence graph for application "application1"
>>> building dispatcher table
>>> scheduling application "application1" ...
>>> scheduling of application "application1" done!
>>> discovered deadline misses:
	services: 0
	causal dependencies: 0
	phase dependencies: 0
>>> *** scheduling successful *** all deadlines seem to hold!

>>> writing dispatcher table for application "application1" into output files...
>>> RODL for application "application1" written successfully!
>>> writing a IFS file definition for this application

>>> dispatcher table of node nr. 1 "master_node"
	+++ Start:  1   Length:  1   Op:  1   file: 34   rec:  1   byte:  0
	+++ Start:  2   Length:  1   Op:  1   file: 34   rec:  1   byte:  1
	+++ Start:  3   Length:  1   Op:  1   file: 34   rec:  1   byte:  2
	+++ Start:  4   Length:  1   Op:  0   file:  0   rec:  0   byte:  0
	+++ Start:  5   Length:  1   Op:  2   file: 34   rec:  1   byte:  3

>>> dispatcher table of node nr. 2 "display_node"
	+++ Start:  5   Length:  1   Op:  1   file: 34   rec:  1   byte:  3
	+++ Start:  6   Length:  1   Op:  0   file:  0   rec:  0   byte:  0

>>> dispatcher table of node nr. 3 "IR_node1"
	+++ Start:  0   Length:  1   Op:  0   file:  0   rec:  0   byte:  0
	+++ Start:  1   Length:  1   Op:  2   file: 34   rec:  1   byte:  0

>>> dispatcher table of node nr. 4 "IR_node2"
	+++ Start:  0   Length:  1   Op:  0   file:  0   rec:  0   byte:  0
	+++ Start:  2   Length:  1   Op:  2   file: 34   rec:  1   byte:  1

>>> dispatcher table of node nr. 5 "IR_node3"
	+++ Start:  0   Length:  1   Op:  0   file:  0   rec:  0   byte:  0
	+++ Start:  3   Length:  1   Op:  2   file: 34   rec:  1   byte:  2
>>> removing dispatcher table
>>> cleaning precedence graph

>>> writing the ROSE for the master node "master_node"...

>>> writing tails for each output file...

>>> closing output files for each node

>>> shutting down TTPA parser...
	+++ freeing allocated memory
	+++ cleaning up XML parser