Hardware Configuration
Hardware Configuration
10.1 Introduction
Before generating the code the hardware information must be added to the database. A hardware description
file named Confmana.CFM contains this information. You have to use the FUP/ALS Editor first, to build your
application program. Then you have to adapt the Confmana.CFM configuration file to your hardware. Finally
you have to generate the code for one or more controllers and download it to the hardware with the Loader.
You may use the integrated editor in the Shell or any other suitable ASCII text editor to edit the configuration
file. Use the "Edit Confmana.CFM" item of the "TextEdit" menu section of the Shell after you have selected
the desired editor to edit the project structure. See the section 10.2 of this chapter for further details about
the project structure and the section 10.3 for the EBNF rules and the syntax description.
If syntax and semantic are correct, the database is modified, otherwise the program ends with an error
message consisting of an error code and an explanatory text. The error code is calculated (errorNumber :=
modId * 64 + error number). For modId and error number see section 10.6. If an error is detected use the
editor to correct and retry to generate the code. There is also an error log file called "PTSCONFM.LOG"
which contains the description of the occurred errors.
The top down project structure could be divided as follows: the project name, the buses, controllers, the tasks
and the domains. (This is done by editing the text file "Confmana.CFM".)
Begin the project structure by defining a valid project name followed by the required buses with their
controller names.
Describe the controller by the processor name, the controller descriptor, the predefined task names with the
task structure and the predefined domain names with the domain structure. You can also specify the
controller specific parameters such as parity, clock rate and versions in the controller description part.
Describe the task structure by defining the tasks you wish to run on the PSR controller, by creating a host
task list for each controller. The host task list must specify the predefined task names, the list of cluster
names with their segment in the order they should be processed for each FUP/ALS task. You can assign
different clusters to different tasks. This will allow you to run time critical parts of your application in tasks with
shorter cycle times (clock rate), and non-critical parts of the application in tasks with longer cycle times (clock
rate).
The user memory is divided into domains. The self explanatory names of the domains are fixed and could not
be changed. Under each domain, the signal group with all individual FUP/ALS signals are listed. You can
assign different signal groups to different domains as you wish.
The address range of each domain is defined by POSSIBLEBASE <hexBase> and POSSIBLESIZE
<HexSize>, each signal group by BASE <hexBase> and SIZE <HexSize> and finally a signal by OFFSET
<hexOffset> and BIT <hexBit>.
The Syntax is described in EBNF (Extended Backus Naur Form). The rules are as follows:
- All keywords are enclosed in apostrophes.
- Non-keywords begin with a capital letter.
- The words in brackets (<>) are explained in section 10.4.2.
- Metasymbols of the EBNF notation:
{ } The contents of the curly brackets may be repeated. The number of repetitions is without any limit
(0..infinity).
[ ] The contents of the square brackets is optional.
( | ) The vertical line is the separator between the different options. Exactly one of the options must be
selected.
{ | } None, one, some or all of the options may be selected and in any order.
The ; character marks the beginnings of comments. Comments end automatically at the end of lines.
digit = '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
hexDigit = digit |'A'|'B'|'C'|'D'|'E'|'F'
hexLongInt = hexDigit hexDigit hexDigit hexDigit
hexDigit hexDigit hexDigit hexDigit 'H'
hexWord = hexDigit hexDigit hexDigit hexDigit 'H'
hexByte = hexDigit hexDigit 'H'
hexNibble = hexDigit 'H'
ProjectDesc = "PROJECT"
<projectName> BusDesc
"ENDPROJECT"
BusDesc = "BUS" <busName> PhscDesc
{ <busName> PhscDesc }
"ENDBUS"
PhscDesc = "PHSC" | "PSR" <phscName>
[ ControllerDesc ] TaskDesc
DomainDesc
{ <phscName>
[ ControllerDesc ] TaskDesc
DomainDesc }
"ENDPHSC"
TaskDesc = "TASK"
["BACKGROUND" [TaskCodeDesc] ClusterDesc]
["INTERRUPT0" [TaskCodeDesc] ClusterDesc]
["INTERRUPT1" [TaskCodeDesc] ClusterDesc]
["INTERRUPT2" [TaskCodeDesc] ClusterDesc]
["INTERRUPT3" [TaskCodeDesc] ClusterDesc]
["INTERRUPT4" [TaskCodeDesc] ClusterDesc]
["INTERRUPT5" [TaskCodeDesc] ClusterDesc]
["INTERRUPT6" [TaskCodeDesc] ClusterDesc]
["INTERRUPT7" [TaskCodeDesc] ClusterDesc]
["INIT" [TaskCodeDesc] ClusterDesc]
"ENDTASK"
NOTES:
(1) The Code Generator does not accept cluster names with "/", "<" or ">".
(2) The configuration of "Timer 0" and "Timer 1" must follow the "Device Address" otherwise an error occurs.
(3) "POSSIBLESIZE" must be one of these: 4H, 8H, 10H, 20H, 40H, 80H, 100H, 200H, 400H,
"POSSIBLEBASE" divided by "POSSIBLESIZE" must have zero remainder
(4) The minimum value of "SIZE" must be equal to the highest offset plus 1. e. g.
MAILBOXSHORT POSSIBLEBASE 00000180H POSSIBLESIZE 00000080H
SigGrp BASE 00000180H SIZE 00000008H
SIGNAL
Sig1 OFFSET 0001H
Sig2 OFFSET 0005H
Sig3 OFFSET 0007H
ENDSIGNAL
ENDMAILBOXSHORT
Here the highest offset is 0007H, therefore, the "SIZE" is set to 0008H.
You should write the keywords PROJECT, BUS, PHSC, TASK, CLUSTER, SEGMENT etc. and the END..
exactly as they are shown above and in the given order. The words in brackets (<>) are explained below.
<projectName> uniquely identifies the project (e.g. "HighNoon", "DEMO"). It must be a valid file name with 8
or fewer characters and must match the project database (<projectname>.ER).
<busName> uniquely identifies the target bus. It must be a valid file name with 8 or fewer characters.
<phscName> uniquely identifies the target processor. It must be a valid file name with 8 or fewer characters.
<clusterName> must be the cluster name of a FUP/ALS program. It must be a name with 16 or fewer
characters, defined in Editor.
<segmentName> must be the segment name of a FUP/ALS program. It must be a name with 16 or fewer
characters, defined in Editor.
<signalGroupName> must be the name of the FUP/ALS signal group to which the signal belongs. It can be
as many as 8 characters long. The FUPLA 2 tools distinguish between upper and lower case characters
in the FUP/ALS signal group names (e.g. SIGGRP, SigGrp and siggrp are different signal group names).
Global parameters which have been given fix addresses under SAVEMEMORY must also be defined
under DATAMEMORY.
<signalName> is the FUP/ALS signal name. It can be as many as 16 characters long. The FUPLA 2 tools
distinguish between upper and lower case characters in the FUP/ALS signal names.
POSSIBLEBASE <hexLongInt> is the base address of the FUP/ALS domain. The base address for each
domain is limited by the controller hardware. It must be 8 hex characters long, followed by the hex
marker 'H'. If POSSIBLEBASE <hexLongInt> is not specified, <hexLongInt> is set to its default value.
POSSIBLESIZE <hexLongInt> is the address range of the FUP/ALS domain. The address range for each
domain is limited by the controller hardware. It must be 8 hex characters long, followed by the hex
marker 'H'. If POSSIBLESIZE <hexLongInt> is not specified, <hexLongInt> is set to its default value.
USEDBASE <hexLongInt> is the base address of the controller configuration code within the
CODEMEMORY domain. The base address for the controller configuration code is limited by the
controller hardware and software. It must be 8 hex characters long, followed by the hex marker 'H'. If
USEDBASE <hexLongInt> is not specified, <hexLongInt> is set to its default value. This option is only for
IAE internal usage or authorised persons.
USEDSIZE <hexLongInt> is the address range of the controller configuration code within the
CODEMEMORY domain. The address range for the controller configuration code is limited by the
controller hardware and software. It must be 8 hex characters long, followed by the hex marker 'H'. If
USEDSIZE <hexLongInt> is not specified, <hexLongInt> is set to 00000110H. This option is only for IAE
internal usage or authorised persons.
CodeBase <hexLongInt> is the base address of a specific controller's task code image within the
CODEMEMORY domain. The base address for each controller task code image is limited by the
controller hardware and software. It must be 8 hex characters long, followed by the hex marker 'H'. If
CodeBase <hexLongInt> is not specified, it remains unchanged.
CodeSize <hexLongInt> is the address range of a specific controller's task code image within the
CODEMEMORY domain. The address range for each controller task code image is limited by the
controller software. It must be 8 hex characters long, followed by the hex marker 'H'. If CodeSize
<hexLongInt> is not specified, it remains unchanged.
For the controller types PP B022 CE and PP C022 AE the CODEMEMORY size must be set to 32 KByte
in the "Confmana.CFM" file, just after DATAMEMORY. e. g.
CODEMEMORY POSSIBLEBASE 00000000H POSSIBLESIZE 00007FFFH
ENDCODEMEMORY
For the controller type PP B022 BE the CODEMEMORY size must be set to 8 KByte. e. g.
CODEMEMORY POSSIBLEBASE 00000000H POSSIBLESIZE 00001FFFH
ENDCODEMEMORY
BASE <hexLongInt> is the base address of the FUP/ALS signal group. It must be 8 hex characters long,
followed by the hex marker 'H'.
SIZE <hexLongInt> is the address range of the FUP/ALS signal group. It must be 8 hex characters long,
followed by the hex marker 'H'.
OFFSET <hexWord> is the offset address of the FUP/ALS signal. It must be 4 hex characters long, followed
by the hex marker 'H'.
BIT <hexNibble> is the bit address of a Boolean FUP/ALS signal. It must be one hex character long followed
by the hex marker 'H'. If BIT <hexNibble> is not specified, <hexNibble> is set to 0H.
<ParamValue> is the value of the declared parameter. Its data type must be in conform with the FUPLA 2
data type described in the Appendix E.
"USEDBASE" "USEDSIZE"
<hexLongInt> <hexLongInt>
"CODEMEMORY" 00000000H 00000110H
PROJECT EXAMPLE
BUS
TESTBUS
PHSC
TESTPHSC
"DeviceAddress" 01H ;GA
"Timer 0" 270 ; micro seconds
"Timer 1" 1080 ; micro seconds
TASK
INIT
CLUSTER
START
SEGMENT
SIGNALISATION
ENDSEGMENT
ENDCLUSTER
BACKGROUND
CLUSTER
HIMI
SEGMENT
STARTMARK
INSPECT
SCOPE
STOPMARK
ENDSEGMENT
ENDCLUSTER
INTERRUPT4
CLUSTER
TEST
SEGMENT
DISPLAY
ENDSEGMENT
ENDCLUSTER
ENDTASK
DOMAIN
DATAMEMORY
ParamGrp
Signal
ENDDATAMEMORY
SAVEMEMORY
LOCALPARAMETER
START Init-Value VALUE 0012H
ENDLOCALPARAMETER
GLOBALPARAMETER
ParamGrp Test OFFSET 0020H
ParamGrp Enable-Test VALUE 1B OFFSET 0021H BIT 1H
ParamGrp dummyParam-1 VALUE 0004H
ParamGrp dummyParam-2 VALUE 0005H
ENDGLOBALPARAMETER
ENDSAVEMEMORY
BUSSHORTIO
KombiI/O BASE 00000000H SIZE 00000020H
SIGNAL
DisplayAnalog OFFSET 0011H
Scope OFFSET 001AH
Init-ok OFFSET 0010H BIT FH
ENDSIGNAL
E/AModul BASE 00000020H SIZE 00000010H
SIGNAL
Data OFFSET 0009H
DisplayDigital OFFSET 000FH
address OFFSET 0008H
switch OFFSET 0000H
addrscope OFFSET 0001H
StartMark OFFSET 000BH BIT 0H
StopMark OFFSET 000BH BIT 0H
ENDSIGNAL
ENDBUSSHORTIO
BUSLONGIO
ENDBUSLONGIO
MAILBOXSHORT
ENDMAILBOXSHORT
MAILBOXLONG
ENDMAILBOXLONG
ENDDOMAIN
ENDPHSC
ENDBUS
ENDPROJECT