Add wasm tacle-bench targets
This commit is contained in:
BIN
targets/wasm-tacle/parallel/DEBIE/README.txt
Normal file
BIN
targets/wasm-tacle/parallel/DEBIE/README.txt
Normal file
Binary file not shown.
46
targets/wasm-tacle/parallel/DEBIE/code/ad_conv.h
Normal file
46
targets/wasm-tacle/parallel/DEBIE/code/ad_conv.h
Normal file
@ -0,0 +1,46 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : ad_conv.h
|
||||
|
||||
Macros, functions, types and constants for controlling AD converter.
|
||||
|
||||
Based on the SSF DHI file ad_conv.h, revision 1.6, Tue Jun 01 12:35:44 1999.
|
||||
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef AD_CONV_H
|
||||
#define AD_CONV_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
/* Constant definitions */
|
||||
|
||||
#define AD_CHANNELS 0x28
|
||||
/* Number of possible ADC channels (includes GND channels) */
|
||||
|
||||
#define BP_UP 0x40
|
||||
#define BP_DOWN 0xBF
|
||||
|
||||
#include "target_ad_conv.h"
|
||||
|
||||
extern unsigned char EXTERNAL ADC_channel_register;
|
||||
/* Holds value of the ADC Channel HW register */
|
||||
/* Is used by Hit Trigger ISR task and Health */
|
||||
/* Monitoring task. */
|
||||
/* Updating must be atomic in the Health Monitoring */
|
||||
/* task, because Hit Trigger can preempt it. */
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,56 @@
|
||||
echo off
|
||||
Rem Batch file to compile debie1 using the GCC ARM
|
||||
Rem compiler that came with the iF-DEV-LPC kit from iSYSTEM.
|
||||
|
||||
Rem setlocal
|
||||
|
||||
Rem Set tpd to the Test Program Directory:
|
||||
set tpd=..\..
|
||||
|
||||
Rem Set hnd to the "harness" directory:
|
||||
|
||||
set hnd=%tpd%\harness
|
||||
|
||||
Rem Set ccd to the compiler config directory:
|
||||
set ccd=%tpd%\..\arm7-lpc2138-mam\gcc-if07
|
||||
|
||||
call %ccd%\setup.bat
|
||||
|
||||
Rem Compile the test program modules:
|
||||
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\class.c -o class.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\classtab.c -o classtab.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\debie.c -o debie.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% -I%tpd% %hnd%\harness.c -o harness.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\health.c -o health.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\hw_if.c -o hw_if.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\measure.c -o measure.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% -I%tpd% target.c -o target.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\tc_hand.c -o tc_hand.o
|
||||
%CC% %CCOPT% -I%ccd% -I. -I%hnd% %tpd%\telem.c -o telem.o
|
||||
|
||||
Rem Compile the run-time support:
|
||||
|
||||
%CC% %ASOPT% %ccd%\crt0.s -o crt0.o
|
||||
%CC% %ASOPT% %ccd%\intvec.s -o intvec.o
|
||||
%CC% %CCOPT% %ccd%\crt_asyst.c -o crt_asyst.o
|
||||
%CC% %CCOPT% -I%ccd% %ccd%\cpulib.c -o cpulib.o
|
||||
|
||||
Rem Link the program:
|
||||
|
||||
%LD% %LDOPT% ^
|
||||
-Xlinker --output=debie1.elf ^
|
||||
-Xlinker --script=%ccd%\link.txt ^
|
||||
intvec.o crt0.o crt_asyst.o cpulib.o ^
|
||||
class.o ^
|
||||
classtab.o ^
|
||||
debie.o ^
|
||||
harness.o ^
|
||||
health.o ^
|
||||
hw_if.o ^
|
||||
measure.o ^
|
||||
target.o ^
|
||||
tc_hand.o ^
|
||||
telem.o
|
||||
|
||||
endlocal
|
||||
@ -0,0 +1,77 @@
|
||||
/*
|
||||
cpulib: Routines for CPU initialization and configuration.
|
||||
|
||||
Target : iSYSTEM LPC2138-M minitarget board (ARM7TDMI)
|
||||
Source : iSYSTEM iF-DEV-LPC kit
|
||||
Changes : Tidorum Ltd (N. Holsti)
|
||||
|
||||
$Id: cpulib.c,v 1.1 2008/04/08 09:44:55 niklas Exp $
|
||||
*/
|
||||
|
||||
#include "cpulib.h"
|
||||
|
||||
void cpulib_init_cpu ( void )
|
||||
{
|
||||
// The MAM is assumed to be initialized in crt0.s.
|
||||
|
||||
// Turn off the LED:
|
||||
|
||||
IO0DIR |= IO_LED; // Set pin direction to output.
|
||||
IO0SET |= IO_LED; // Set pin value to 1 = turn off LED.
|
||||
}
|
||||
|
||||
|
||||
void cpulib_go_fast ( unsigned int mode )
|
||||
{
|
||||
// Turn on PLL from 12 MHz to 60 MHz cclk:
|
||||
|
||||
PLLCFG = 0x24;
|
||||
PLLCON = 0x1;
|
||||
PLLFEED = 0xAA;
|
||||
PLLFEED = 0x55;
|
||||
while ( !( PLLSTAT & 0x400 ) ) {};
|
||||
PLLCON = 0x3;
|
||||
PLLFEED = 0xAA;
|
||||
PLLFEED = 0x55;
|
||||
}
|
||||
|
||||
|
||||
void cpulib_set_led ( int state )
|
||||
{
|
||||
if ( state )
|
||||
IO0CLR = IO_LED; // LED on.
|
||||
else
|
||||
IO0SET = IO_LED; // LED off.
|
||||
}
|
||||
|
||||
|
||||
static volatile int flash_timer;
|
||||
/* Loop counter for timing flash_led. */
|
||||
|
||||
|
||||
void cpulib_flash_led ( void )
|
||||
{
|
||||
cpulib_set_led ( 1 );
|
||||
|
||||
flash_timer = 10000;
|
||||
while ( flash_timer > 0 ) flash_timer--;
|
||||
|
||||
cpulib_set_led ( 0 );
|
||||
}
|
||||
|
||||
|
||||
void cpulib_blink_led ( void )
|
||||
{
|
||||
cpulib_set_led ( 0 );
|
||||
|
||||
flash_timer = 30000;
|
||||
while ( flash_timer > 0 ) flash_timer--;
|
||||
|
||||
cpulib_set_led ( 1 );
|
||||
|
||||
flash_timer = 10000;
|
||||
while ( flash_timer > 0 ) flash_timer--;
|
||||
|
||||
cpulib_set_led ( 0 );
|
||||
}
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
/*
|
||||
cpulib: Routines for CPU initialization and configuration.
|
||||
|
||||
Target : iSYSTEM LPC2138-M minitarget board (ARM7TDMI)
|
||||
Source : iSYSTEM iF-DEV-LPC kit
|
||||
Changes : Tidorum Ltd (N. Holsti)
|
||||
|
||||
$Id: cpulib.h,v 1.1 2008/04/08 09:44:55 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CPULIB_H
|
||||
#define CPULIB_H
|
||||
|
||||
#define REG(x) (*((volatile unsigned int *)(x)))
|
||||
#define IO0DIR REG(0xE0028008) // I/O direction control
|
||||
#define IO0CLR REG(0xE002800C) // output clear
|
||||
#define IO0SET REG(0xE0028004) // output set
|
||||
#define PLLCFG REG(0xE01FC084) // PLL Config Reg.
|
||||
#define PLLCON REG(0xE01FC080) // PLL Control Reg.
|
||||
#define PLLFEED REG(0xE01FC08C) // PLL-Feed 0xAA, 0x55
|
||||
#define PLLSTAT REG(0xE01FC088) // PLL-Status register
|
||||
#define MAMCR REG(0xE01FC000) // MAM Control register
|
||||
#define MAMTIM REG(0xE01FC004) // MAM Timing register
|
||||
|
||||
|
||||
#define IO_LED 0x00000001
|
||||
// The LED is connected to pin P0.0.
|
||||
|
||||
|
||||
void cpulib_init_cpu ( void );
|
||||
// Initializes the processor (in addition to crt0 actions).
|
||||
// Defines the LED control pin (P0.0) as output and emits a "1"
|
||||
// to turn off the LED.
|
||||
|
||||
void cpulib_go_fast ( unsigned int mode );
|
||||
// Sets the PLL to run the processor at 60 MHz.
|
||||
// Does not alter the MAM mode (because of the LPC2138 errata).
|
||||
|
||||
void cpulib_set_led ( int state );
|
||||
// Turns the LED on if state != 0, off if state = 0.
|
||||
|
||||
void cpulib_flash_led ( void );
|
||||
// Turns the LED on for a brief time, then off.
|
||||
// Useful only if the LED is initially off.
|
||||
|
||||
void cpulib_blink_led ( void );
|
||||
// Turns the LED off for short time, then on
|
||||
// for a shorter time, then off again.
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,53 @@
|
||||
/* vector table section
|
||||
* __ASYST_STACK_TOP is defined in lcf file
|
||||
*/
|
||||
|
||||
.code 32
|
||||
|
||||
.extern __ASYST_STACK_TOP
|
||||
|
||||
/* startup
|
||||
* initialize mode
|
||||
* initialize stack pointer
|
||||
* jump to __asyst_main in crt_asyst.c
|
||||
*/
|
||||
|
||||
.section .text, "ax"
|
||||
|
||||
.global __asyst_start
|
||||
|
||||
__asyst_start:
|
||||
|
||||
mrs r0, cpsr
|
||||
bic r0, r0, #0x1F /* clear mode flags */
|
||||
orr r0, r0, #0x10 /* set user mode */
|
||||
msr cpsr, r0
|
||||
|
||||
/* Initialize MAM to Mode 2, 7 cycles flash: */
|
||||
|
||||
ldr r0,_MAMCR
|
||||
ldr r1,_MAMTIM
|
||||
ldr r2,=0
|
||||
str r2,[r0]
|
||||
ldr r2,=7
|
||||
str r2,[r1]
|
||||
ldr r2,=2
|
||||
str r2,[r0]
|
||||
|
||||
ldr sp,_Lstack_top
|
||||
|
||||
bl __asyst_main
|
||||
|
||||
|
||||
/* constants */
|
||||
|
||||
_MAMCR:
|
||||
.long 0xe01fc000 /* Address of MAM Control Register. */
|
||||
|
||||
_MAMTIM:
|
||||
.long 0xe01fc004 /* Address of MAM Timing register. */
|
||||
|
||||
_Lstack_top:
|
||||
.long __ASYST_STACK_TOP
|
||||
|
||||
.end
|
||||
@ -0,0 +1,99 @@
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned int uint;
|
||||
typedef void ( *pfunc )( void );
|
||||
|
||||
int main( int argc, char *argv[ ] );
|
||||
extern byte __ASYST_DATA_LOAD[ ];
|
||||
extern byte __ASYST_DATA_START[ ];
|
||||
extern byte __ASYST_DATA_END[ ];
|
||||
extern byte __ASYST_BSS_START[ ];
|
||||
extern byte __ASYST_BSS_END[ ];
|
||||
extern pfunc __ASYST_CTOR_START[ ];
|
||||
extern pfunc __ASYST_CTOR_END[ ];
|
||||
extern pfunc __ASYST_DTOR_START[ ];
|
||||
extern pfunc __ASYST_DTOR_END[ ];
|
||||
extern byte __ASYST_HEAP_START[ ];
|
||||
|
||||
#define __ASYST_IS_ALIGNED(P) ((((uint)(P)) & (~(sizeof(uint) -1))) == ((uint)(P)))
|
||||
|
||||
void __asyst_memset_byte( byte *pbyDest, byte byValue, uint uiSize )
|
||||
{
|
||||
byte *pbyDestLast = pbyDest + uiSize;
|
||||
for ( ; pbyDest != pbyDestLast; pbyDest++ )
|
||||
pbyDest[ 0 ] = byValue;
|
||||
}
|
||||
|
||||
void __asyst_memset_uint( uint *puiDest, uint uiValue, uint uiSize )
|
||||
{
|
||||
uint *puiDestLast = puiDest + uiSize;
|
||||
for ( ; puiDest != puiDestLast; puiDest++ )
|
||||
puiDest[ 0 ] = uiValue;
|
||||
}
|
||||
|
||||
void __asyst_memset( byte *pbyDest, byte byValue, uint uiSize )
|
||||
{
|
||||
if ( __ASYST_IS_ALIGNED( pbyDest ) &&
|
||||
__ASYST_IS_ALIGNED( uiSize ) ) {
|
||||
uint uiValue = 0;
|
||||
__asyst_memset_byte( ( byte * )&uiValue, byValue, sizeof( uint ) );
|
||||
return __asyst_memset_uint( ( uint * )pbyDest, uiValue,
|
||||
uiSize / sizeof( uint ) );
|
||||
} else
|
||||
return __asyst_memset_byte( pbyDest, byValue, uiSize );
|
||||
|
||||
}
|
||||
|
||||
void *__asyst_memcpy_uint( uint *puiDest, const uint *puiSrc, uint uiSize )
|
||||
{
|
||||
uint *puiDestLast = puiDest + uiSize;
|
||||
for ( ; puiDest != puiDestLast; puiSrc++, puiDest++ )
|
||||
puiDest[ 0 ] = puiSrc[ 0 ];
|
||||
return puiDestLast;
|
||||
}
|
||||
|
||||
void *__asyst_memcpy_byte( byte *pbyDest, const byte *pbySrc, uint uiSize )
|
||||
{
|
||||
byte *pbyDestLast = pbyDest + uiSize;
|
||||
for ( ; pbyDest != pbyDestLast; pbySrc++, pbyDest++ )
|
||||
pbyDest[ 0 ] = pbySrc[ 0 ];
|
||||
return pbyDestLast;
|
||||
}
|
||||
|
||||
void *__asyst_memcpy( byte *pbyDest, const byte *pbySrc, uint uiSize )
|
||||
{
|
||||
if ( __ASYST_IS_ALIGNED( pbyDest ) &&
|
||||
__ASYST_IS_ALIGNED( pbySrc ) &&
|
||||
__ASYST_IS_ALIGNED( uiSize ) )
|
||||
return __asyst_memcpy_uint( ( uint * )pbyDest, ( uint * )pbySrc,
|
||||
uiSize / sizeof( uint ) );
|
||||
else
|
||||
return __asyst_memcpy_byte( pbyDest, pbySrc, uiSize );
|
||||
}
|
||||
|
||||
void __asyst_main()
|
||||
{
|
||||
pfunc *pfTable;
|
||||
// copy data
|
||||
if ( __ASYST_DATA_START != __ASYST_DATA_LOAD )
|
||||
__asyst_memcpy( __ASYST_DATA_START, __ASYST_DATA_LOAD,
|
||||
__ASYST_DATA_END - __ASYST_DATA_START );
|
||||
// zero bss
|
||||
__asyst_memset( __ASYST_BSS_START, 0, __ASYST_BSS_END - __ASYST_BSS_START );
|
||||
|
||||
/* Not used in C project
|
||||
// call constructors
|
||||
for(pfTable=__ASYST_CTOR_END-1; pfTable!=__ASYST_CTOR_START; pfTable--)
|
||||
pfTable[ 0 ]();
|
||||
*/
|
||||
|
||||
// main
|
||||
main( 0, 0 );
|
||||
|
||||
/* Not used in C project
|
||||
// call destructors
|
||||
//for(pfTable=__ASYST_DTOR_START; pfTable!=__ASYST_DTOR_END; pfTable++)
|
||||
//pfTable[ 0 ]();
|
||||
*/
|
||||
|
||||
while ( 1 );
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
.code 32
|
||||
|
||||
.section .vectors, "ax"
|
||||
|
||||
B __asyst_start /* RESET INTERRUPT */
|
||||
B __DefaultHandler /* UNDEFINED INSTRUCTION INTERRUPT */
|
||||
B __DefaultHandler /* SOFTWARE INTERRUPT */
|
||||
B __DefaultHandler /* ABORT (PREFETCH) INTERRUPT */
|
||||
B __DefaultHandler /* ABORT (DATA) INTERRUPT */
|
||||
B __DefaultHandler /* RESERVED */
|
||||
B __DefaultHandler /* IRQ INTERRUPT */
|
||||
B __DefaultHandler /* FIQ INTERRUPT */
|
||||
|
||||
.text
|
||||
|
||||
__DefaultHandler:
|
||||
b __DefaultHandler
|
||||
|
||||
.end
|
||||
@ -0,0 +1,173 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU ARM compiler for the ARM7 as
|
||||
delivered with the IF-DEV-LPC, no kernel.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
#include <string.h>
|
||||
/* For memcpy (). */
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for ARM7/GCC, where the widths of
|
||||
the integer types are the following (as observed from the code of
|
||||
the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
#define COPY(DEST,SOURCE) memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#include "cpulib.h"
|
||||
|
||||
#define TARGET_INIT { \
|
||||
cpulib_init_cpu (); \
|
||||
cpulib_blink_led (); \
|
||||
cpulib_go_fast (1); \
|
||||
cpulib_blink_led (); }
|
||||
|
||||
#define TARGET_MARK { cpulib_flash_led (); }
|
||||
#define TARGET_REBOOT { cpulib_blink_led (); }
|
||||
#define TARGET_START_TEST { cpulib_blink_led (); cpulib_blink_led (); }
|
||||
#define TARGET_REPEAT_TEST 1
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,816 @@
|
||||
Archive member included because of file (symbol)
|
||||
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
class.o (__adddf3)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
class.o (__muldf3)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
class.o (__fixunsdfsi)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
class.o (__truncdfsf2)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
class.o (__addsf3)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
class.o (__mulsf3)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
class.o (__gtsf2)
|
||||
c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
health.o (memcpy)
|
||||
|
||||
Allocating common symbols
|
||||
Common symbol size file
|
||||
|
||||
event_queue 0x118 telem.o
|
||||
science_data 0x63b4 telem.o
|
||||
s_w_reset 0x4 hw_if.o
|
||||
ADC_result 0xa measure.o
|
||||
write_checksum 0x1 tc_hand.o
|
||||
failed_data_address
|
||||
0x2 hw_if.o
|
||||
telemetry_data 0x84 telem.o
|
||||
reference_checksum 0x1 hw_if.o
|
||||
memory_mode 0x4 hw_if.o
|
||||
telemetry_end_pointer
|
||||
0x4 telem.o
|
||||
free_slot_index 0x4 telem.o
|
||||
TC_state 0x4 tc_hand.o
|
||||
address_MSB 0x1 tc_hand.o
|
||||
read_memory_checksum
|
||||
0x1 telem.o
|
||||
confirm_hit_result 0x1 measure.o
|
||||
address_LSB 0x1 tc_hand.o
|
||||
code_checksum 0x1 health.o
|
||||
failed_code_address
|
||||
0x2 hw_if.o
|
||||
telemetry_pointer 0x4 telem.o
|
||||
event_queue_length 0x4 telem.o
|
||||
test_level 0x4 measure.o
|
||||
memory_transfer_buffer
|
||||
0x20 tc_hand.o
|
||||
previous_TC 0x4 tc_hand.o
|
||||
internal_time 0x4 health.o
|
||||
TC_look_up 0x80 tc_hand.o
|
||||
EA 0x1 harness.o
|
||||
max_events 0x4 telem.o
|
||||
test_channel 0x1 measure.o
|
||||
forbidden_area 0x100 hw_if.o
|
||||
memory_type 0x4 tc_hand.o
|
||||
code_not_patched 0x1 hw_if.o
|
||||
|
||||
Memory Configuration
|
||||
|
||||
Name Origin Length Attributes
|
||||
MEM_ROM_VECTORS 0x00000000 0x00000040
|
||||
MEM_ROM 0x00000040 0x0007ffc0
|
||||
MEM_RAM 0x40000000 0x00008000
|
||||
*default* 0x00000000 0xffffffff
|
||||
|
||||
Linker script and memory map
|
||||
|
||||
LOAD c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a
|
||||
LOAD c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libnosys.a
|
||||
0x40007ffc __ASYST_STACK_TOP = 0x40007ffc
|
||||
0x00000000 __ASYST_HEAP_SIZE = 0x0
|
||||
|
||||
.vectors 0x00000000 0x20
|
||||
*(.vectors)
|
||||
.vectors 0x00000000 0x20 intvec.o
|
||||
|
||||
.text 0x00000040 0x8778
|
||||
0x00000040 __ASYST_TEXT_START = .
|
||||
*(.text)
|
||||
.text 0x00000040 0x4 intvec.o
|
||||
.text 0x00000044 0x44 crt0.o
|
||||
0x00000044 __asyst_start
|
||||
.text 0x00000088 0x198 crt_asyst.o
|
||||
0x0000015c __asyst_memcpy_byte
|
||||
0x00000088 __asyst_memset_byte
|
||||
0x000000a8 __asyst_memset_uint
|
||||
0x00000180 __asyst_memcpy
|
||||
0x000001cc __asyst_main
|
||||
0x00000134 __asyst_memcpy_uint
|
||||
0x000000c8 __asyst_memset
|
||||
.text 0x00000220 0x17c cpulib.o
|
||||
0x00000244 cpulib_go_fast
|
||||
0x00000314 cpulib_blink_led
|
||||
0x000002c4 cpulib_flash_led
|
||||
0x00000220 cpulib_init_cpu
|
||||
0x0000029c cpulib_set_led
|
||||
.text 0x0000039c 0x368 class.o
|
||||
0x000004a0 CalculateQualityNumber
|
||||
0x00000414 Init_SU_Settings
|
||||
0x0000039c RoughLogarithm
|
||||
0x00000458 InitClassification
|
||||
0x000003c0 GetQualityTerm
|
||||
0x00000584 ClassifyEvent
|
||||
.text 0x00000704 0x0 classtab.o
|
||||
.text 0x00000704 0x40 debie.o
|
||||
0x00000704 main
|
||||
.text 0x00000744 0x3518 harness.o
|
||||
0x00000ab0 Set_AD_Delay
|
||||
0x00000ec4 Enable_Hit_Trigger
|
||||
0x0000076c DisableInterrupt
|
||||
0x000008f8 Read_TC_MSB
|
||||
0x00002b84 StartSystem
|
||||
0x00000c8c End_Of_ADC
|
||||
0x00000780 WaitInterrupt
|
||||
0x00000eec Hit_Trigger_Flag
|
||||
0x00000770 SetInterruptMask
|
||||
0x00000784 SendTaskMail
|
||||
0x00000ad4 Random_AD_Delay
|
||||
0x00001b34 Monitor_Health
|
||||
0x000011b4 Clear_Errors
|
||||
0x00000a6c Next
|
||||
0x00000d98 Set_DAC_Output
|
||||
0x00000b7c Start_Conversion
|
||||
0x00000b78 Update_ADC_Channel_Reg
|
||||
0x00000f70 Set_Test_Pulse_Level
|
||||
0x00000d68 Report_End_Of_ADC_Count
|
||||
0x00000744 WaitInterval
|
||||
0x00000928 Write_TM_MSB
|
||||
0x00000918 Write_TM_LSB
|
||||
0x000008f0 TestMemSeq
|
||||
0x00000a90 Next_Rand
|
||||
0x000008e0 TestMemBits
|
||||
0x00000948 Clear_TC_Timer_Overflow_Flag
|
||||
0x00000764 AttachInterrupt
|
||||
0x00000750 ShortDelay
|
||||
0x000007f4 WaitMail
|
||||
0x00001088 Reboot
|
||||
0x00000f3c Rise_Time_Counter
|
||||
0x000008e8 TestMemData
|
||||
0x00000efc Event_Flag
|
||||
0x00000e0c Random_Event
|
||||
0x00000f80 V_Down
|
||||
0x000009b8 Set_AD_Nominal
|
||||
0x00000d7c Get_Result
|
||||
0x00000768 EnableInterrupt
|
||||
0x00003c34 CreateTask
|
||||
0x00000f1c Get_LSB1_Counter
|
||||
0x00000fa8 Call_Patch
|
||||
0x0000087c Check_Current
|
||||
0x000007d4 isr_send_message
|
||||
0x00000d9c Sim_Self_Test_Trigger
|
||||
0x000013b0 TM_Tests
|
||||
0x00000c78 Report_Start_Conversion_Count
|
||||
0x0000095c Set_TC_Timer_Overflow_Flag
|
||||
0x00003c1c Short_Value
|
||||
0x00000908 Read_TC_LSB
|
||||
0x00000fa4 SignalPeakDetectorReset
|
||||
0x00000fac Check_Type_Size
|
||||
0x00000970 Set_AD_Unlimited
|
||||
0x00000f0c Get_MSB_Counter
|
||||
0x00000f6c Set_SU_Self_Test_Ch
|
||||
0x00001084 Report_Event_Histo
|
||||
0x00001b70 SU_Self_Test_Tests
|
||||
0x00000f2c Get_LSB2_Counter
|
||||
0x00000ed8 Disable_Hit_Trigger
|
||||
0x00000f4c Trigger_Source_0
|
||||
0x00000938 TC_Timer_Overflow_Flag
|
||||
0x00002748 Monitoring_Task_Tests
|
||||
0x00000778 ResetInterruptMask
|
||||
0x00000748 WaitTimeout
|
||||
0x0000074c SetTimeSlice
|
||||
0x00000f5c Trigger_Source_1
|
||||
.text 0x00003c5c 0x1444 health.o
|
||||
0x00003da4 UpdateTime
|
||||
0x00004bb8 HighVoltageCurrent
|
||||
0x00004040 Set_SU_TriggerLevels
|
||||
0x00004b38 InitHealthMonitoring
|
||||
0x00003d60 Set_SU_Error
|
||||
0x000040a4 RestoreSettings
|
||||
0x00004900 MeasureTemperature
|
||||
0x00004640 Read_AD_Channel
|
||||
0x000048fc DPU_SelfTest
|
||||
0x00004e38 HandleHealthMonitoring
|
||||
0x00003c5c Clear_RTX_Errors
|
||||
0x00003dd4 VoltageFailure
|
||||
0x00003c88 SetSoftwareError
|
||||
0x00003dbc UpdatePeriodCounter
|
||||
0x000043ac SelfTestChannel
|
||||
0x00003d44 SetErrorStatus
|
||||
0x00004854 Monitor_DPU_Voltage
|
||||
0x00004e9c Boot
|
||||
0x00004c34 SelfTest_SU
|
||||
0x00003cd0 ClearModeStatusError
|
||||
0x0000473c MeasureVoltage
|
||||
0x00004c7c Monitor
|
||||
0x00003ce8 SetMode
|
||||
0x00004138 DelayAwhile
|
||||
0x00003ca0 ClearSoftwareError
|
||||
0x0000456c TemperatureFailure
|
||||
0x00003ef8 ExceedsLimit
|
||||
0x00003cb4 SetModeStatusError
|
||||
0x00004e88 HealthMonitoringTask
|
||||
0x000046fc DAC_SelfTest
|
||||
0x000045a4 Convert_AD
|
||||
0x00003d08 GetMode
|
||||
0x00004ab0 InitSystem
|
||||
0x00003d1c Clear_SU_Error
|
||||
0x00003f20 Monitor_SU_Voltage
|
||||
0x000049cc CalculateChecksum
|
||||
0x000041b8 ExecuteChannelTest
|
||||
0x00003d90 ClearErrorStatus
|
||||
0x00004b50 LowVoltageCurrent
|
||||
.text 0x000050a0 0x844 hw_if.o
|
||||
0x000051f8 EnableAnalogSwitch
|
||||
0x000052ac GetVoltageStatus
|
||||
0x00005288 ResetPeakDetector
|
||||
0x000053c8 Switch_SU_Off
|
||||
0x000051cc DisableAnalogSwitch
|
||||
0x000056ac CopyProgramCode
|
||||
0x00005864 Init_DPU
|
||||
0x00005260 SelectStartSwitchLevel
|
||||
0x000050b8 SignalMemoryErrors
|
||||
0x00005814 InitCode_RAM
|
||||
0x000050a0 GetResetClass
|
||||
0x000055bc PatchCode
|
||||
0x00005148 SetMemoryConfiguration
|
||||
0x000056f8 Check_RAM
|
||||
0x000052d0 SetTestPulseLevel
|
||||
0x000057b8 InitData_RAM
|
||||
0x0000516c SelectSelfTestChannel
|
||||
0x00005220 SelectTriggerSwitchLevel
|
||||
0x0000557c ReadDelayCounters
|
||||
0x000052d8 SetTriggerLevel
|
||||
0x0000556c ReadRiseTimeCounter
|
||||
0x00005498 Switch_SU_On
|
||||
0x00005168 ResetDelayCounters
|
||||
0x00005158 GetMemoryConfiguration
|
||||
.text 0x000058e4 0x594 measure.o
|
||||
0x00005c6c HandleHitTrigger
|
||||
0x00005aac HandleAcquisition
|
||||
0x00005c58 AcquisitionTask
|
||||
0x000059f8 SetSensorUnitOff
|
||||
0x000058e4 InitAcquisitionTask
|
||||
0x00005e64 HitTriggerTask
|
||||
0x00005a5c Start_SU_SwitchingOn
|
||||
0x000059a4 Update_SU_State
|
||||
0x00005e50 InitHitTriggerTask
|
||||
0x0000590c Switch_SU_State
|
||||
0x00005988 ReadSensorUnit
|
||||
.text 0x00005e78 0x34 target.o
|
||||
0x00005ea4 Get_Code_Byte
|
||||
0x00005e8c Get_Data_Byte
|
||||
0x00005e78 Data_Pointer
|
||||
0x00005e88 Set_Data_Byte
|
||||
.text 0x00005eac 0x13f8 tc_hand.o
|
||||
0x00006068 Set_TC_Error
|
||||
0x0000681c ExecuteCommand
|
||||
0x00006184 UpdateTarget
|
||||
0x00006ee8 TelecommandExecutionTask
|
||||
0x00006c14 MemoryPatch
|
||||
0x00006080 WriteMemory
|
||||
0x00006da8 HandleTelecommand
|
||||
0x00006028 PatchExecCommandOk
|
||||
0x00005eac InitTC_LookUp
|
||||
0x00006efc TC_InterruptService
|
||||
0x0000612c InitTelecommandTask
|
||||
.text 0x000072a4 0x46c telem.o
|
||||
0x000075f4 TM_InterruptService
|
||||
0x00007404 RecordEvent
|
||||
0x000072f0 FindMinQualityRecord
|
||||
0x000072a4 GetFreeRecord
|
||||
0x000072d4 GetElapsedTime
|
||||
0x0000738c IncrementCounters
|
||||
0x000075e0 ResetEventQueueLength
|
||||
0x000074fc ClearEvents
|
||||
.text 0x00007710 0x400 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
0x00007aa4 __floatdidf
|
||||
0x00007a24 __floatsidf
|
||||
0x000079fc __aeabi_ui2d
|
||||
0x00007710 __aeabi_drsub
|
||||
0x00007a50 __extendsfdf2
|
||||
0x0000771c __adddf3
|
||||
0x000079fc __floatunsidf
|
||||
0x0000771c __aeabi_dadd
|
||||
0x00007a90 __aeabi_ul2d
|
||||
0x00007718 __aeabi_dsub
|
||||
0x00007a90 __floatundidf
|
||||
0x00007a24 __aeabi_i2d
|
||||
0x00007aa4 __aeabi_l2d
|
||||
0x00007a50 __aeabi_f2d
|
||||
0x00007718 __subdf3
|
||||
.text 0x00007b10 0x470 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
0x00007d7c __aeabi_ddiv
|
||||
0x00007b10 __aeabi_dmul
|
||||
0x00007d7c __divdf3
|
||||
0x00007b10 __muldf3
|
||||
.text 0x00007f80 0x54 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
0x00007f80 __fixunsdfsi
|
||||
0x00007f80 __aeabi_d2uiz
|
||||
.text 0x00007fd4 0xa0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
0x00007fd4 __aeabi_d2f
|
||||
0x00007fd4 __truncdfsf2
|
||||
.text 0x00008074 0x2ac c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
0x00008080 __aeabi_fadd
|
||||
0x0000807c __subsf3
|
||||
0x00008244 __aeabi_i2f
|
||||
0x0000807c __aeabi_fsub
|
||||
0x00008274 __floatdisf
|
||||
0x00008244 __floatsisf
|
||||
0x00008264 __floatundisf
|
||||
0x0000823c __aeabi_ui2f
|
||||
0x00008274 __aeabi_l2f
|
||||
0x00008264 __aeabi_ul2f
|
||||
0x00008074 __aeabi_frsub
|
||||
0x0000823c __floatunsisf
|
||||
0x00008080 __addsf3
|
||||
.text 0x00008320 0x2f8 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
0x000084b8 __divsf3
|
||||
0x000084b8 __aeabi_fdiv
|
||||
0x00008320 __mulsf3
|
||||
0x00008320 __aeabi_fmul
|
||||
.text 0x00008618 0xf8 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
0x000086fc __aeabi_fcmpgt
|
||||
0x00008620 __lesf2
|
||||
0x00008628 __nesf2
|
||||
0x000086e8 __aeabi_fcmpge
|
||||
0x00008618 __gtsf2
|
||||
0x000086d4 __aeabi_fcmple
|
||||
0x00008628 __eqsf2
|
||||
0x00008628 __cmpsf2
|
||||
0x00008620 __ltsf2
|
||||
0x00008698 __aeabi_cfcmple
|
||||
0x00008618 __gesf2
|
||||
0x000086ac __aeabi_fcmpeq
|
||||
0x00008688 __aeabi_cfrcmple
|
||||
0x000086c0 __aeabi_fcmplt
|
||||
0x00008698 __aeabi_cfcmpeq
|
||||
.text 0x00008710 0xa8 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
0x00008710 memcpy
|
||||
*(.text.*)
|
||||
*(.glue_7t)
|
||||
.glue_7t 0x000087b8 0x0 intvec.o
|
||||
.glue_7t 0x000087b8 0x0 crt0.o
|
||||
.glue_7t 0x000087b8 0x0 crt_asyst.o
|
||||
.glue_7t 0x000087b8 0x0 cpulib.o
|
||||
.glue_7t 0x000087b8 0x0 class.o
|
||||
.glue_7t 0x000087b8 0x0 classtab.o
|
||||
.glue_7t 0x000087b8 0x0 debie.o
|
||||
.glue_7t 0x000087b8 0x0 harness.o
|
||||
.glue_7t 0x000087b8 0x0 health.o
|
||||
.glue_7t 0x000087b8 0x0 hw_if.o
|
||||
.glue_7t 0x000087b8 0x0 measure.o
|
||||
.glue_7t 0x000087b8 0x0 target.o
|
||||
.glue_7t 0x000087b8 0x0 tc_hand.o
|
||||
.glue_7t 0x000087b8 0x0 telem.o
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
.glue_7t 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
*(.glue_7)
|
||||
.glue_7 0x000087b8 0x0 intvec.o
|
||||
.glue_7 0x000087b8 0x0 crt0.o
|
||||
.glue_7 0x000087b8 0x0 crt_asyst.o
|
||||
.glue_7 0x000087b8 0x0 cpulib.o
|
||||
.glue_7 0x000087b8 0x0 class.o
|
||||
.glue_7 0x000087b8 0x0 classtab.o
|
||||
.glue_7 0x000087b8 0x0 debie.o
|
||||
.glue_7 0x000087b8 0x0 harness.o
|
||||
.glue_7 0x000087b8 0x0 health.o
|
||||
.glue_7 0x000087b8 0x0 hw_if.o
|
||||
.glue_7 0x000087b8 0x0 measure.o
|
||||
.glue_7 0x000087b8 0x0 target.o
|
||||
.glue_7 0x000087b8 0x0 tc_hand.o
|
||||
.glue_7 0x000087b8 0x0 telem.o
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
.glue_7 0x000087b8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
*(.init)
|
||||
*(.fini)
|
||||
*(.gnu.linkonce.t*)
|
||||
0x000087b8 __ASYST_TEXT_END = .
|
||||
0x000087b8 . = ALIGN (0x4)
|
||||
0x000087b8 __ASYST_CTOR_START = .
|
||||
*(.ctors)
|
||||
0x000087b8 __ASYST_CTOR_END = .
|
||||
0x000087b8 . = ALIGN (0x4)
|
||||
0x000087b8 __ASYST_DTOR_START = .
|
||||
*(.dtors)
|
||||
0x000087b8 __ASYST_DTOR_END = .
|
||||
|
||||
.vfp11_veneer 0x00000000 0x0
|
||||
.vfp11_veneer 0x00000000 0x0 intvec.o
|
||||
.vfp11_veneer 0x00000000 0x0 crt0.o
|
||||
.vfp11_veneer 0x00000000 0x0 crt_asyst.o
|
||||
.vfp11_veneer 0x00000000 0x0 cpulib.o
|
||||
.vfp11_veneer 0x00000000 0x0 class.o
|
||||
.vfp11_veneer 0x00000000 0x0 classtab.o
|
||||
.vfp11_veneer 0x00000000 0x0 debie.o
|
||||
.vfp11_veneer 0x00000000 0x0 harness.o
|
||||
.vfp11_veneer 0x00000000 0x0 health.o
|
||||
.vfp11_veneer 0x00000000 0x0 hw_if.o
|
||||
.vfp11_veneer 0x00000000 0x0 measure.o
|
||||
.vfp11_veneer 0x00000000 0x0 target.o
|
||||
.vfp11_veneer 0x00000000 0x0 tc_hand.o
|
||||
.vfp11_veneer 0x00000000 0x0 telem.o
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
.vfp11_veneer 0x00000000 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
|
||||
.rodata 0x000087b8 0x184
|
||||
0x000087b8 . = ALIGN (0x4)
|
||||
*(.rodata)
|
||||
.rodata 0x000087b8 0x13f harness.o
|
||||
*fill* 0x000088f7 0x1 00
|
||||
.rodata 0x000088f8 0x24 health.o
|
||||
.rodata 0x0000891c 0x1 hw_if.o
|
||||
0x0000891c checksum_nullifier
|
||||
*(.rodata.*)
|
||||
*fill* 0x0000891d 0x3 00
|
||||
.rodata.str1.4
|
||||
0x00008920 0x1c harness.o
|
||||
*(.rdata)
|
||||
*(.rdata.*)
|
||||
*(.sdata2)
|
||||
*(.sdata2.*)
|
||||
*(.gnu.linkonce.r*)
|
||||
|
||||
.data 0x40000000 0x1e8 load address 0x0000893c
|
||||
0x40000000 . = ALIGN (0x4)
|
||||
0x40000000 __ASYST_DATA_START = .
|
||||
0x0000893c __ASYST_DATA_LOAD = LOADADDR (.data)
|
||||
*(.data)
|
||||
.data 0x40000000 0x0 intvec.o
|
||||
.data 0x40000000 0x0 crt0.o
|
||||
.data 0x40000000 0x0 crt_asyst.o
|
||||
.data 0x40000000 0x0 cpulib.o
|
||||
.data 0x40000000 0x0 class.o
|
||||
.data 0x40000000 0x100 classtab.o
|
||||
0x40000000 event_class
|
||||
.data 0x40000100 0x0 debie.o
|
||||
.data 0x40000100 0xac harness.o
|
||||
0x40000100 switch_su_cmd
|
||||
.data 0x400001ac 0x14 health.o
|
||||
0x400001ac temp_meas_count
|
||||
0x400001bc health_mon_round
|
||||
0x400001b4 checksum_count
|
||||
0x400001b0 voltage_meas_count
|
||||
0x400001b8 ADC_channel_register
|
||||
.data 0x400001c0 0x4 hw_if.o
|
||||
0x400001c0 analog_switch_bit
|
||||
.data 0x400001c4 0x10 measure.o
|
||||
0x400001cc hit_task
|
||||
0x400001c4 hit_budget
|
||||
0x400001c8 hit_budget_left
|
||||
0x400001d0 acq_task
|
||||
.data 0x400001d4 0x0 target.o
|
||||
.data 0x400001d4 0x14 tc_hand.o
|
||||
0x400001d4 SU_config
|
||||
0x400001e4 TC_task
|
||||
.data 0x400001e8 0x0 telem.o
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
.data 0x400001e8 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
*(.data.*)
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.gnu.linkonce.d*)
|
||||
0x400001e8 __ASYST_DATA_END = .
|
||||
|
||||
.bss 0x400001e8 0x6854
|
||||
0x400001e8 . = ALIGN (0x4)
|
||||
0x400001e8 __ASYST_BSS_START = .
|
||||
*(.bss)
|
||||
.bss 0x400001e8 0x0 intvec.o
|
||||
.bss 0x400001e8 0x0 crt0.o
|
||||
.bss 0x400001e8 0x0 crt_asyst.o
|
||||
.bss 0x400001e8 0x4 cpulib.o
|
||||
.bss 0x400001ec 0x0 class.o
|
||||
.bss 0x400001ec 0x0 classtab.o
|
||||
.bss 0x400001ec 0x0 debie.o
|
||||
.bss 0x400001ec 0xb4 harness.o
|
||||
.bss 0x400002a0 0x1 health.o
|
||||
0x400002a0 self_test_flag
|
||||
.bss 0x400002a1 0x2 hw_if.o
|
||||
0x400002a2 SU_self_test_channel
|
||||
0x400002a1 SU_ctrl_register
|
||||
*fill* 0x400002a3 0x1 00
|
||||
.bss 0x400002a4 0x34 measure.o
|
||||
0x400002a8 SU_state
|
||||
0x400002a4 self_test_SU_number
|
||||
.bss 0x400002d8 0x0 target.o
|
||||
.bss 0x400002d8 0x18 tc_hand.o
|
||||
0x400002dc memory_buffer_index
|
||||
0x400002d8 TC_timeout
|
||||
.bss 0x400002f0 0x0 telem.o
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
.bss 0x400002f0 0x0 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
*(.bss.*)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(COMMON)
|
||||
COMMON 0x400002f0 0x1 harness.o
|
||||
0x400002f0 EA
|
||||
*fill* 0x400002f1 0x3 00
|
||||
COMMON 0x400002f4 0x8 health.o
|
||||
0x400002f4 code_checksum
|
||||
0x400002f8 internal_time
|
||||
COMMON 0x400002fc 0x10f hw_if.o
|
||||
0x400002fc s_w_reset
|
||||
0x40000300 failed_data_address
|
||||
0x40000302 reference_checksum
|
||||
0x40000304 memory_mode
|
||||
0x40000308 failed_code_address
|
||||
0x4000030a forbidden_area
|
||||
0x4000040a code_not_patched
|
||||
*fill* 0x4000040b 0x1 00
|
||||
COMMON 0x4000040c 0x11 measure.o
|
||||
0x4000040c ADC_result
|
||||
0x40000416 confirm_hit_result
|
||||
0x40000418 test_level
|
||||
0x4000041c test_channel
|
||||
*fill* 0x4000041d 0x3 00
|
||||
COMMON 0x40000420 0xb4 tc_hand.o
|
||||
0x40000420 write_checksum
|
||||
0x40000424 TC_state
|
||||
0x40000428 address_MSB
|
||||
0x40000429 address_LSB
|
||||
0x4000042a memory_transfer_buffer
|
||||
0x4000044c previous_TC
|
||||
0x40000450 TC_look_up
|
||||
0x400004d0 memory_type
|
||||
COMMON 0x400004d4 0x6568 telem.o
|
||||
0x400004d4 event_queue
|
||||
0x400005ec science_data
|
||||
0x400069a0 telemetry_data
|
||||
0x40006a24 telemetry_end_pointer
|
||||
0x40006a28 free_slot_index
|
||||
0x40006a2c read_memory_checksum
|
||||
0x40006a30 telemetry_pointer
|
||||
0x40006a34 event_queue_length
|
||||
0x40006a38 max_events
|
||||
*(.gnu.linkonce.b*)
|
||||
0x40006a3c __ASYST_BSS_END = .
|
||||
0x40006a3c end = ALIGN (0x4)
|
||||
|
||||
.heap 0x40006a3c 0x0
|
||||
0x40006a3c . = ALIGN (0x4)
|
||||
0x40006a3c __ASYST_HEAP_START = .
|
||||
0x40006a3c . = (. + __ASYST_HEAP_SIZE)
|
||||
LOAD intvec.o
|
||||
LOAD crt0.o
|
||||
LOAD crt_asyst.o
|
||||
LOAD cpulib.o
|
||||
LOAD class.o
|
||||
LOAD classtab.o
|
||||
LOAD debie.o
|
||||
LOAD harness.o
|
||||
LOAD health.o
|
||||
LOAD hw_if.o
|
||||
LOAD measure.o
|
||||
LOAD target.o
|
||||
LOAD tc_hand.o
|
||||
LOAD telem.o
|
||||
START GROUP
|
||||
LOAD c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a
|
||||
LOAD c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a
|
||||
END GROUP
|
||||
OUTPUT(debie1.exe elf32-littlearm)
|
||||
|
||||
.ARM.attributes
|
||||
0x00000000 0x10
|
||||
.ARM.attributes
|
||||
0x00000000 0x10 intvec.o
|
||||
.ARM.attributes
|
||||
0x00000010 0x10 crt0.o
|
||||
.ARM.attributes
|
||||
0x00000020 0x10 crt_asyst.o
|
||||
.ARM.attributes
|
||||
0x00000030 0x10 cpulib.o
|
||||
.ARM.attributes
|
||||
0x00000040 0x10 class.o
|
||||
.ARM.attributes
|
||||
0x00000050 0x10 classtab.o
|
||||
.ARM.attributes
|
||||
0x00000060 0x10 debie.o
|
||||
.ARM.attributes
|
||||
0x00000070 0x10 harness.o
|
||||
.ARM.attributes
|
||||
0x00000080 0x10 health.o
|
||||
.ARM.attributes
|
||||
0x00000090 0x10 hw_if.o
|
||||
.ARM.attributes
|
||||
0x000000a0 0x10 measure.o
|
||||
.ARM.attributes
|
||||
0x000000b0 0x10 target.o
|
||||
.ARM.attributes
|
||||
0x000000c0 0x10 tc_hand.o
|
||||
.ARM.attributes
|
||||
0x000000d0 0x10 telem.o
|
||||
.ARM.attributes
|
||||
0x000000e0 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubdf3.o)
|
||||
.ARM.attributes
|
||||
0x000000f0 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivdf3.o)
|
||||
.ARM.attributes
|
||||
0x00000100 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_fixunsdfsi.o)
|
||||
.ARM.attributes
|
||||
0x00000110 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_truncdfsf2.o)
|
||||
.ARM.attributes
|
||||
0x00000120 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_addsubsf3.o)
|
||||
.ARM.attributes
|
||||
0x00000130 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_muldivsf3.o)
|
||||
.ARM.attributes
|
||||
0x00000140 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2\libgcc.a(_cmpsf2.o)
|
||||
.ARM.attributes
|
||||
0x00000150 0x10 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
|
||||
.debug_line 0x00000000 0x1b8f
|
||||
.debug_line 0x00000000 0x6f intvec.o
|
||||
.debug_line 0x0000006f 0x66 crt0.o
|
||||
.debug_line 0x000000d5 0x97 crt_asyst.o
|
||||
.debug_line 0x0000016c 0x8a cpulib.o
|
||||
.debug_line 0x000001f6 0x110 class.o
|
||||
.debug_line 0x00000306 0x31 classtab.o
|
||||
.debug_line 0x00000337 0x67 debie.o
|
||||
.debug_line 0x0000039e 0x8dc harness.o
|
||||
.debug_line 0x00000c7a 0x4fd health.o
|
||||
.debug_line 0x00001177 0x24c hw_if.o
|
||||
.debug_line 0x000013c3 0x1dc measure.o
|
||||
.debug_line 0x0000159f 0x4d target.o
|
||||
.debug_line 0x000015ec 0x460 tc_hand.o
|
||||
.debug_line 0x00001a4c 0x143 telem.o
|
||||
|
||||
.debug_info 0x00000000 0x6005
|
||||
.debug_info 0x00000000 0x9b intvec.o
|
||||
.debug_info 0x0000009b 0x9d crt0.o
|
||||
.debug_info 0x00000138 0x2e4 crt_asyst.o
|
||||
.debug_info 0x0000041c 0xd1 cpulib.o
|
||||
.debug_info 0x000004ed 0x6d2 class.o
|
||||
.debug_info 0x00000bbf 0x91 classtab.o
|
||||
.debug_info 0x00000c50 0x94 debie.o
|
||||
.debug_info 0x00000ce4 0x1886 harness.o
|
||||
.debug_info 0x0000256a 0xfdd health.o
|
||||
.debug_info 0x00003547 0xb5c hw_if.o
|
||||
.debug_info 0x000040a3 0x9d5 measure.o
|
||||
.debug_info 0x00004a78 0x147 target.o
|
||||
.debug_info 0x00004bbf 0xc19 tc_hand.o
|
||||
.debug_info 0x000057d8 0x82d telem.o
|
||||
|
||||
.debug_abbrev 0x00000000 0x11b9
|
||||
.debug_abbrev 0x00000000 0x12 intvec.o
|
||||
.debug_abbrev 0x00000012 0x14 crt0.o
|
||||
.debug_abbrev 0x00000026 0x130 crt_asyst.o
|
||||
.debug_abbrev 0x00000156 0x90 cpulib.o
|
||||
.debug_abbrev 0x000001e6 0x16d class.o
|
||||
.debug_abbrev 0x00000353 0x56 classtab.o
|
||||
.debug_abbrev 0x000003a9 0x5b debie.o
|
||||
.debug_abbrev 0x00000404 0x361 harness.o
|
||||
.debug_abbrev 0x00000765 0x1ee health.o
|
||||
.debug_abbrev 0x00000953 0x222 hw_if.o
|
||||
.debug_abbrev 0x00000b75 0x1ea measure.o
|
||||
.debug_abbrev 0x00000d5f 0xc7 target.o
|
||||
.debug_abbrev 0x00000e26 0x1bd tc_hand.o
|
||||
.debug_abbrev 0x00000fe3 0x1d6 telem.o
|
||||
|
||||
.debug_aranges 0x00000000 0x1a8
|
||||
.debug_aranges
|
||||
0x00000000 0x28 intvec.o
|
||||
.debug_aranges
|
||||
0x00000028 0x20 crt0.o
|
||||
.debug_aranges
|
||||
0x00000048 0x20 crt_asyst.o
|
||||
.debug_aranges
|
||||
0x00000068 0x20 cpulib.o
|
||||
.debug_aranges
|
||||
0x00000088 0x20 class.o
|
||||
.debug_aranges
|
||||
0x000000a8 0x20 debie.o
|
||||
.debug_aranges
|
||||
0x000000c8 0x20 harness.o
|
||||
.debug_aranges
|
||||
0x000000e8 0x20 health.o
|
||||
.debug_aranges
|
||||
0x00000108 0x20 hw_if.o
|
||||
.debug_aranges
|
||||
0x00000128 0x20 measure.o
|
||||
.debug_aranges
|
||||
0x00000148 0x20 target.o
|
||||
.debug_aranges
|
||||
0x00000168 0x20 tc_hand.o
|
||||
.debug_aranges
|
||||
0x00000188 0x20 telem.o
|
||||
|
||||
.debug_ranges 0x00000000 0x58
|
||||
.debug_ranges 0x00000000 0x20 intvec.o
|
||||
.debug_ranges 0x00000020 0x38 harness.o
|
||||
|
||||
.debug_frame 0x00000000 0x1198
|
||||
.debug_frame 0x00000000 0x9c crt_asyst.o
|
||||
.debug_frame 0x0000009c 0x70 cpulib.o
|
||||
.debug_frame 0x0000010c 0x9c class.o
|
||||
.debug_frame 0x000001a8 0x2c debie.o
|
||||
.debug_frame 0x000001d4 0x680 harness.o
|
||||
.debug_frame 0x00000854 0x3b8 health.o
|
||||
.debug_frame 0x00000c0c 0x210 hw_if.o
|
||||
.debug_frame 0x00000e1c 0x12c measure.o
|
||||
.debug_frame 0x00000f48 0x58 target.o
|
||||
.debug_frame 0x00000fa0 0x11c tc_hand.o
|
||||
.debug_frame 0x000010bc 0xdc telem.o
|
||||
|
||||
.debug_loc 0x00000000 0x2359
|
||||
.debug_loc 0x00000000 0x1de crt_asyst.o
|
||||
.debug_loc 0x000001de 0x3e cpulib.o
|
||||
.debug_loc 0x0000021c 0x1be class.o
|
||||
.debug_loc 0x000003da 0x1f debie.o
|
||||
.debug_loc 0x000003f9 0xa0e harness.o
|
||||
.debug_loc 0x00000e07 0x7ad health.o
|
||||
.debug_loc 0x000015b4 0x510 hw_if.o
|
||||
.debug_loc 0x00001ac4 0x278 measure.o
|
||||
.debug_loc 0x00001d3c 0x6e target.o
|
||||
.debug_loc 0x00001daa 0x3bc tc_hand.o
|
||||
.debug_loc 0x00002166 0x1f3 telem.o
|
||||
|
||||
.debug_pubnames
|
||||
0x00000000 0x12e8
|
||||
.debug_pubnames
|
||||
0x00000000 0xa9 crt_asyst.o
|
||||
.debug_pubnames
|
||||
0x000000a9 0x76 cpulib.o
|
||||
.debug_pubnames
|
||||
0x0000011f 0x91 class.o
|
||||
.debug_pubnames
|
||||
0x000001b0 0x22 classtab.o
|
||||
.debug_pubnames
|
||||
0x000001d2 0x1b debie.o
|
||||
.debug_pubnames
|
||||
0x000001ed 0x525 harness.o
|
||||
.debug_pubnames
|
||||
0x00000712 0x3b6 health.o
|
||||
.debug_pubnames
|
||||
0x00000ac8 0x2f6 hw_if.o
|
||||
.debug_pubnames
|
||||
0x00000dbe 0x1a4 measure.o
|
||||
.debug_pubnames
|
||||
0x00000f62 0x59 target.o
|
||||
.debug_pubnames
|
||||
0x00000fbb 0x1be tc_hand.o
|
||||
.debug_pubnames
|
||||
0x00001179 0x16f telem.o
|
||||
|
||||
.debug_str 0x00000000 0x21b1
|
||||
.debug_str 0x00000000 0x1c4 crt_asyst.o
|
||||
0x1db (size before relaxing)
|
||||
.debug_str 0x000001c4 0x88 cpulib.o
|
||||
0xf9 (size before relaxing)
|
||||
.debug_str 0x0000024c 0x611 class.o
|
||||
0x710 (size before relaxing)
|
||||
.debug_str 0x0000085d 0x11 classtab.o
|
||||
0xf3 (size before relaxing)
|
||||
.debug_str 0x0000086e 0xe debie.o
|
||||
0xe9 (size before relaxing)
|
||||
.debug_str 0x0000087c 0xb1c harness.o
|
||||
0x1134 (size before relaxing)
|
||||
.debug_str 0x00001398 0x59b health.o
|
||||
0xd8d (size before relaxing)
|
||||
.debug_str 0x00001933 0x39f hw_if.o
|
||||
0x9f0 (size before relaxing)
|
||||
.debug_str 0x00001cd2 0x15d measure.o
|
||||
0x948 (size before relaxing)
|
||||
.debug_str 0x00001e2f 0x45 target.o
|
||||
0x150 (size before relaxing)
|
||||
.debug_str 0x00001e74 0x253 tc_hand.o
|
||||
0xaff (size before relaxing)
|
||||
.debug_str 0x000020c7 0xea telem.o
|
||||
0x825 (size before relaxing)
|
||||
|
||||
.comment 0x00000000 0xea
|
||||
.comment 0x00000000 0x12 crt_asyst.o
|
||||
.comment 0x00000012 0x12 cpulib.o
|
||||
.comment 0x00000024 0x12 class.o
|
||||
.comment 0x00000036 0x12 classtab.o
|
||||
.comment 0x00000048 0x12 debie.o
|
||||
.comment 0x0000005a 0x12 harness.o
|
||||
.comment 0x0000006c 0x12 health.o
|
||||
.comment 0x0000007e 0x12 hw_if.o
|
||||
.comment 0x00000090 0x12 measure.o
|
||||
.comment 0x000000a2 0x12 target.o
|
||||
.comment 0x000000b4 0x12 tc_hand.o
|
||||
.comment 0x000000c6 0x12 telem.o
|
||||
.comment 0x000000d8 0x12 c:/ifdev/2007/gcc/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib\libc.a(lib_a-memcpy.o)
|
||||
@ -0,0 +1,98 @@
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(__asyst_start)
|
||||
|
||||
/*
|
||||
Memory layout for NXP LPC2138:
|
||||
- 512 KiB FLASH from 0x00000000 to 0x0007ffff
|
||||
- 32 KiB SRAM from 0x40000000 to 0x40007fff
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
MEM_ROM_VECTORS :
|
||||
ORIGIN = 0x00000000, LENGTH = 0x00000040
|
||||
MEM_ROM :
|
||||
ORIGIN = ORIGIN(MEM_ROM_VECTORS) + LENGTH(MEM_ROM_VECTORS), LENGTH = 512k - LENGTH(MEM_ROM_VECTORS)
|
||||
MEM_RAM :
|
||||
ORIGIN = 0x40000000, LENGTH = 32k
|
||||
}
|
||||
__ASYST_STACK_TOP = ORIGIN(MEM_RAM) + LENGTH(MEM_RAM) - 4;
|
||||
__ASYST_HEAP_SIZE = 0x0;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.vectors : /* vector table */
|
||||
{
|
||||
*(.vectors)
|
||||
} > MEM_ROM_VECTORS
|
||||
|
||||
.text :
|
||||
{
|
||||
__ASYST_TEXT_START = .; /* executable code */
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.glue_7t) *(.glue_7)
|
||||
*(.init)
|
||||
*(.fini)
|
||||
*(.gnu.linkonce.t*)
|
||||
__ASYST_TEXT_END = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__ASYST_CTOR_START = .; /* constructors */
|
||||
*(.ctors)
|
||||
__ASYST_CTOR_END = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__ASYST_DTOR_START = .; /* destructors */
|
||||
*(.dtors)
|
||||
__ASYST_DTOR_END = .;
|
||||
} > MEM_ROM
|
||||
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* read-only data */
|
||||
*(.rodata.*)
|
||||
*(.rdata)
|
||||
*(.rdata.*)
|
||||
*(.sdata2) /* small constant data */
|
||||
*(.sdata2.*)
|
||||
*(.gnu.linkonce.r*)
|
||||
} > MEM_ROM
|
||||
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__ASYST_DATA_START = .; /* start of the data */
|
||||
__ASYST_DATA_LOAD = LOADADDR(.data);
|
||||
*(.data) /* data */
|
||||
*(.data.*)
|
||||
*(.sdata) /* small data */
|
||||
*(.sdata.*)
|
||||
*(.gnu.linkonce.d*)
|
||||
__ASYST_DATA_END = .; /* end of the data */
|
||||
} >MEM_RAM AT>MEM_ROM
|
||||
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__ASYST_BSS_START = .; /* start of the bss */
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(COMMON)
|
||||
*(.gnu.linkonce.b*)
|
||||
__ASYST_BSS_END = .; /* end of the bss */
|
||||
end = ALIGN(4) ;
|
||||
} > MEM_RAM
|
||||
|
||||
.heap (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__ASYST_HEAP_START = .; /* start of the heap */
|
||||
. += __ASYST_HEAP_SIZE;
|
||||
} > MEM_RAM
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for arm7/gcc-if07
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/04/09 11:26:38 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,46 @@
|
||||
echo off
|
||||
Rem Batch file to set up environment for GCC ARM7 C compiler from iSYSTEMS
|
||||
Rem for the iF-DEV-LPC kit, for all test programs.
|
||||
Rem
|
||||
Rem Copyright (c) 2008 Tidorum Ltd.
|
||||
Rem
|
||||
Rem $Revision: 1.2 $
|
||||
|
||||
|
||||
Rem GCC installation paths:
|
||||
|
||||
set IFDEVD=C:\iFDEV\2007
|
||||
set GCCD=%IFDEVD%\gcc\arm
|
||||
set GCCbin=%GCCD%\bin
|
||||
set GCClib=%GCCD%\lib
|
||||
|
||||
set PATH=%GCCbin%;%PATH%
|
||||
|
||||
Rem C compiler and options:
|
||||
|
||||
set CC=arm-elf-gcc.exe
|
||||
|
||||
set CCOPT=-c -mcpu=arm7tdmi -g -O2
|
||||
|
||||
set ASOPT=-c -mcpu=arm7tdmi -g
|
||||
|
||||
Rem Linker and options:
|
||||
|
||||
set LD=arm-elf-gcc.exe
|
||||
|
||||
set LDOPT=-nostartfiles ^
|
||||
-mlittle-endian ^
|
||||
-mcpu=arm7tdmi ^
|
||||
-Xlinker -lc ^
|
||||
-lnosys ^
|
||||
-Xlinker -Map=link.map ^
|
||||
-Xlinker -n
|
||||
|
||||
Rem Common runtime files to be included in the link:
|
||||
Rem crt0.s (use ASOPT)
|
||||
Rem intvec.s (use ASOPT)
|
||||
Rem crt_asyst.c (use CCOPT)
|
||||
Rem cpulib.c (use CCOPT)
|
||||
Rem
|
||||
Rem Use the linker script file link.txt, with the LD option
|
||||
Rem -Xlinker --script=%dir%\link.txt.
|
||||
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0x40000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
This version for the target arm7/gcc-if07.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 910
|
||||
/* Set to make the entire program fit in 32 KiB of data memory. */
|
||||
|
||||
#endif
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x1/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x1/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU ARM compiler for the ARM7 as
|
||||
delivered with the IF-DEV-LPC, no kernel.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for ARM7/GCC, where the widths of
|
||||
the integer types are the following (as observed from the code of
|
||||
the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *, void *, int );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for arm7/gcc-if07
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/04/09 11:26:38 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x1/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x1/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0x38000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x2/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x2/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU ARM compiler for the ARM7 as
|
||||
delivered with the IF-DEV-LPC, no kernel.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for ARM7/GCC, where the widths of
|
||||
the integer types are the following (as observed from the code of
|
||||
the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *, void *, int );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for arm7/gcc-if07
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/04/09 11:26:38 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x2/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x2/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0x38000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x4/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x4/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU ARM compiler for the ARM7 as
|
||||
delivered with the IF-DEV-LPC, no kernel.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for ARM7/GCC, where the widths of
|
||||
the integer types are the following (as observed from the code of
|
||||
the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *, void *, int );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for arm7/gcc-if07
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/04/09 11:26:38 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x4/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x4/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0x38000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x8/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x8/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU ARM compiler for the ARM7 as
|
||||
delivered with the IF-DEV-LPC, no kernel.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for ARM7/GCC, where the widths of
|
||||
the integer types are the following (as observed from the code of
|
||||
the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *, void *, int );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for arm7/gcc-if07
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/04/09 11:26:38 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x8/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7-x8/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0x38000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU ARM compiler for the ARM7 as
|
||||
delivered with the IF-DEV-LPC, no kernel.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for ARM7/GCC, where the widths of
|
||||
the integer types are the following (as observed from the code of
|
||||
the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *, void *, int );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
23
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7/problems.h
Normal file
23
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7/problems.h
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for arm7/gcc-if07
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/04/09 11:26:38 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/arm7/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0x40000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
52
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/host-build.sh
Executable file
52
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/host-build.sh
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to compile "debie1" on the host Intel/Linux system
|
||||
# using the target-specific code for mpc5554/gcc. This is
|
||||
# meant to check that the MPC5554 port has no target-specific
|
||||
# behaviour and (by default) no output; it does not generate
|
||||
# an executable for the MPC5554.
|
||||
#
|
||||
# Any command-line arguments go into the CCOPT (eg. -Wpadded).
|
||||
# As default, the trace output from the harness and target
|
||||
# modules are disabled.
|
||||
|
||||
|
||||
# Set tpd to the Test Program Directory:
|
||||
tpd=../..
|
||||
|
||||
# Set hnd to the "harness" directory:
|
||||
|
||||
hnd=${tpd}/harness
|
||||
|
||||
# Native gcc and options:
|
||||
|
||||
export CC="gcc"
|
||||
export CCOPT="-g -O2 -I. -I${hnd} -Wall $*"
|
||||
export LD="gcc"
|
||||
export LDOPT=
|
||||
|
||||
${CC} ${CCOPT} -c ${tpd}/class.c
|
||||
${CC} ${CCOPT} -c ${tpd}/classtab.c
|
||||
${CC} ${CCOPT} -c ${tpd}/debie.c
|
||||
${CC} ${CCOPT} -c -I${tpd} ${hnd}/harness.c
|
||||
${CC} ${CCOPT} -c ${tpd}/health.c
|
||||
${CC} ${CCOPT} -c ${tpd}/hw_if.c
|
||||
${CC} ${CCOPT} -c ${tpd}/measure.c
|
||||
${CC} ${CCOPT} -c -I${tpd} target.c
|
||||
${CC} ${CCOPT} -c ${tpd}/tc_hand.c
|
||||
${CC} ${CCOPT} -c ${tpd}/telem.c
|
||||
|
||||
|
||||
${CC} ${LDOPT} \
|
||||
-o debie1 \
|
||||
class.o \
|
||||
classtab.o \
|
||||
debie.o \
|
||||
harness.o \
|
||||
health.o \
|
||||
hw_if.o \
|
||||
measure.o \
|
||||
target.o \
|
||||
tc_hand.o \
|
||||
telem.o
|
||||
|
||||
166
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/keyword.h
Normal file
166
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/keyword.h
Normal file
@ -0,0 +1,166 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to the GNU C compiler for the MPC5554.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
#include <string.h>
|
||||
/* For memcpy (). */
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for MPC5554/gcc, where the
|
||||
widths the integer types are the following (as observed from the
|
||||
code of the function Check_Type_Size in harness.c):
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler also has alignment concerns, so here we
|
||||
define all telemetry data as octets and access it using memcpy()
|
||||
instead of direct assignment.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
#define COPY(DEST,SOURCE) memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#define TARGET_INIT {}
|
||||
|
||||
#define TARGET_MARK {}
|
||||
#define TARGET_REBOOT {}
|
||||
#define TARGET_START_TEST {}
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,254 @@
|
||||
/* Default linker script, for normal executables */
|
||||
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
|
||||
OUTPUT_ARCH(powerpc:common)
|
||||
ENTRY(_start)
|
||||
|
||||
/* where to search for stuff */
|
||||
SEARCH_DIR("=/usr/local/lib");
|
||||
SEARCH_DIR("=/lib");
|
||||
SEARCH_DIR("=/usr/lib");
|
||||
|
||||
/* end of stack */
|
||||
__stack = 0x4000fff8;
|
||||
___stack = 0x4000fff8;
|
||||
|
||||
/* sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* read-only sections, merged into text segment: */
|
||||
PROVIDE (__executable_start = 0x000002000);
|
||||
. = 0x00002000 + SIZEOF_HEADERS;
|
||||
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.gnu.version : { *(.gnu.version) }
|
||||
.gnu.version_d : { *(.gnu.version_d) }
|
||||
.gnu.version_r : { *(.gnu.version_r) }
|
||||
.rel.init : { *(.rel.init) }
|
||||
.rela.init : { *(.rela.init) }
|
||||
.rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
|
||||
.rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
|
||||
.rel.fini : { *(.rel.fini) }
|
||||
.rela.fini : { *(.rela.fini) }
|
||||
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
||||
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
||||
.rel.data.rel.ro : { *(.rel.data.rel.ro*) }
|
||||
.rela.data.rel.ro : { *(.rel.data.rel.ro*) }
|
||||
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
||||
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
||||
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
||||
.rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
|
||||
.rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
|
||||
.rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rela.got1 : { *(.rela.got1) }
|
||||
.rela.got2 : { *(.rela.got2) }
|
||||
.rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
|
||||
.rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
|
||||
.rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
|
||||
.rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
|
||||
.rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
|
||||
.rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
|
||||
.rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
|
||||
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
|
||||
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
|
||||
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init :
|
||||
{
|
||||
KEEP (*(.init))
|
||||
} =0
|
||||
.text :
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
KEEP (*(.text.*personality*))
|
||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||
*(.gnu.warning)
|
||||
} =0
|
||||
.fini :
|
||||
{
|
||||
KEEP (*(.fini))
|
||||
} =0
|
||||
|
||||
PROVIDE (__etext = .);
|
||||
PROVIDE (_etext = .);
|
||||
PROVIDE (etext = .);
|
||||
|
||||
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
||||
.rodata1 : { *(.rodata1) }
|
||||
.sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
|
||||
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
|
||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
|
||||
|
||||
/* Exception handling */
|
||||
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
|
||||
|
||||
/* Ensure the __preinit_array_start label is properly aligned. We
|
||||
could instead move the label definition inside the section, but
|
||||
the linker would then create the section even if it turns out to
|
||||
be empty, which isn't pretty. */
|
||||
. = ALIGN(32 / 8);
|
||||
|
||||
PROVIDE (__preinit_array_start = .);
|
||||
|
||||
.preinit_array : { KEEP (*(.preinit_array)) }
|
||||
|
||||
PROVIDE (__preinit_array_end = .);
|
||||
PROVIDE (__init_array_start = .);
|
||||
|
||||
.init_array : { KEEP (*(.init_array)) }
|
||||
|
||||
PROVIDE (__init_array_end = .);
|
||||
PROVIDE (__fini_array_start = .);
|
||||
|
||||
.fini_array : { KEEP (*(.fini_array)) }
|
||||
|
||||
PROVIDE (__fini_array_end = .);
|
||||
|
||||
.ctors :
|
||||
{
|
||||
/* gcc uses crtbegin.o to find the start of
|
||||
the constructors, so we make sure it is
|
||||
first. Because this is a wildcard, it
|
||||
doesn't matter if the user does not
|
||||
actually link against crtbegin.o; the
|
||||
linker won't look for a file to match a
|
||||
wildcard. The wildcard also means that it
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
KEEP (*crtbegin*.o(.ctors))
|
||||
|
||||
/* We don't want to include the .ctor section from
|
||||
from the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
}
|
||||
.dtors :
|
||||
{
|
||||
KEEP (*crtbegin*.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
}
|
||||
.jcr : { KEEP (*(.jcr)) }
|
||||
.data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
|
||||
.fixup : { *(.fixup) }
|
||||
.got1 : { *(.got1) }
|
||||
.got2 : { *(.got2) }
|
||||
.dynamic : { *(.dynamic) }
|
||||
.got : { *(.got.plt) *(.got) }
|
||||
.plt : { *(.plt) }
|
||||
|
||||
/* put some stuff into external ram */
|
||||
. = 0x20000000;
|
||||
.externalram : { *(.externalram) }
|
||||
|
||||
/* put data segment into internal sram */
|
||||
. = 0x40000000;
|
||||
. = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
|
||||
|
||||
/* thread Local Storage sections */
|
||||
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||
.data :
|
||||
{
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||
SORT(CONSTRUCTORS)
|
||||
}
|
||||
.data1 : { *(.data1) }
|
||||
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
}
|
||||
_edata = .;
|
||||
|
||||
PROVIDE (edata = .);
|
||||
|
||||
__bss_start = .;
|
||||
.sbss :
|
||||
{
|
||||
PROVIDE (__sbss_start = .);
|
||||
PROVIDE (___sbss_start = .);
|
||||
*(.dynsbss)
|
||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
PROVIDE (__sbss_end = .);
|
||||
PROVIDE (___sbss_end = .);
|
||||
}
|
||||
.bss :
|
||||
{
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
. = ALIGN(32 / 8);
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .;
|
||||
__end = .;
|
||||
|
||||
PROVIDE (end = .);
|
||||
. = DATA_SEGMENT_END (.);
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
|
||||
/* DWARF debug sections.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
/DISCARD/ : { *(.note.GNU-stack) }
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
/*
|
||||
problems.h for mpc5554/gcc.
|
||||
Part of the DEBIE-1 benchmark.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P) {}
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM {}
|
||||
/* A marker to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,12 @@
|
||||
This folder contains header files and a build script
|
||||
that compile and link the DEBIE-1 DPU SW benchmark for
|
||||
execution on an MPC5554 processor. The completed
|
||||
executable file is also provided.
|
||||
|
||||
The generated executable runs the test cases defined
|
||||
in harness.c once and then stops. The executable does not
|
||||
generate any output.
|
||||
|
||||
This port was contributed by Simon Wegener of AbsInt Angewandte
|
||||
Informatik GmbH.
|
||||
|
||||
49
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/target-build.sh
Executable file
49
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/target-build.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to cross-compile "debie1" for the MPC5554 with the
|
||||
# CodeSourcery "G++ lite" GCC package.
|
||||
#
|
||||
# Any command-line arguments go into the CCOPT (eg. -Wpadded).
|
||||
# As default, the trace output from the harness and target
|
||||
# modules are disabled.
|
||||
#
|
||||
# One has to set the path to the compiler (i.e. CC) accordingly.
|
||||
|
||||
|
||||
# Set tpd to the Test Program Directory:
|
||||
tpd=../..
|
||||
|
||||
# Set hnd to the "harness" directory:
|
||||
hnd=${tpd}/harness
|
||||
|
||||
# Target gcc and options:
|
||||
export CC="/local/swegener/CodeSourcery/Sourcery_G++_Lite/bin/powerpc-eabi-gcc"
|
||||
export CCOPT="-te500v1 -fshort-double -g -O2 -I. -I${hnd} -Wall -Wextra $*"
|
||||
export LD="/local/swegener/CodeSourcery/Sourcery_G++_Lite/bin/powerpc-eabi-gcc"
|
||||
export LDOPT="-te500v1 -fshort-double -Wl,-T./linker-mpc55xx-gcc.ld -static"
|
||||
|
||||
${CC} ${CCOPT} -c ${tpd}/class.c
|
||||
${CC} ${CCOPT} -c ${tpd}/classtab.c
|
||||
${CC} ${CCOPT} -c ${tpd}/debie.c
|
||||
${CC} ${CCOPT} -c -I${tpd} ${hnd}/harness.c
|
||||
${CC} ${CCOPT} -c ${tpd}/health.c
|
||||
${CC} ${CCOPT} -c ${tpd}/hw_if.c
|
||||
${CC} ${CCOPT} -c ${tpd}/measure.c
|
||||
${CC} ${CCOPT} -c -I${tpd} target.c
|
||||
${CC} ${CCOPT} -c ${tpd}/tc_hand.c
|
||||
${CC} ${CCOPT} -c ${tpd}/telem.c
|
||||
|
||||
|
||||
${CC} ${LDOPT} \
|
||||
-o debie1.elf \
|
||||
class.o \
|
||||
classtab.o \
|
||||
debie.o \
|
||||
harness.o \
|
||||
health.o \
|
||||
hw_if.o \
|
||||
measure.o \
|
||||
target.o \
|
||||
tc_hand.o \
|
||||
telem.o
|
||||
|
||||
84
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/target.c
Normal file
84
targets/wasm-tacle/parallel/DEBIE/code/arch/mpc5554/target.c
Normal file
@ -0,0 +1,84 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the mpc5554/gcc target.
|
||||
|
||||
Options: if the preprocessor symbol TRACE_TARGET is defined,
|
||||
these operations generate trace message on stdout.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#if defined(TRACE_TARGET)
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
static char data_memory[ 65536 ] __attribute__( ( section( ".externalram" ) ) );
|
||||
/* Simulated 80C32 external data RAM. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return &data_memory[ address ];
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
#if defined(TRACE_TARGET)
|
||||
printf ( "Set_Data_Byte 0x%x to %d = 0x%x\n", addr, value, value );
|
||||
#endif
|
||||
data_memory[ addr ] = value;
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
unsigned char value = data_memory[ addr ];
|
||||
#if defined(TRACE_TARGET)
|
||||
printf ( "Get_Data_Byte 0x%x is %d = 0x%x\n", addr, value, value );
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
#if defined(TRACE_TARGET)
|
||||
/* printf ("Get_Code_Byte 0x%x\n", addr); */
|
||||
/* This would be to much output. Skip. */
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
This version for the target mpc5554/gcc.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1796/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1796/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to GNU GCC on host Intel/Linux.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for GCC on 32-bit Intel/Linux, where
|
||||
the widths of the integer types are the following:
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler accepts unaliged multi-octet data, although
|
||||
access is slower. However, we still access possibly misaligned
|
||||
telemetry data using memcpy() instead of direct assignment,
|
||||
just to test that this approach works.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint32_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint32_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *dest, void *src, int size );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for intel/linux
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/03/28 08:22:17 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marked to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1796/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1796/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0xc0000000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
165
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1797/keyword.h
Normal file
165
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1797/keyword.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to GNU GCC on host Intel/Linux.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for GCC on 32-bit Intel/Linux, where
|
||||
the widths of the integer types are the following:
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler accepts unaliged multi-octet data, although
|
||||
access is slower. However, we still access possibly misaligned
|
||||
telemetry data using memcpy() instead of direct assignment,
|
||||
just to test that this approach works.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint32_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint32_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *dest, void *src, int size );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
|
||||
#define TARGET_INIT
|
||||
#define TARGET_MARK
|
||||
#define TARGET_REBOOT
|
||||
#define TARGET_START_TEST
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
problems.h for intel/linux
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/03/28 08:22:17 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#define FOR_PROBLEM(P)
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
|
||||
#define END_PROBLEM
|
||||
/* A marked to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
67
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1797/target.c
Normal file
67
targets/wasm-tacle/parallel/DEBIE/code/arch/tc1797/target.c
Normal file
@ -0,0 +1,67 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the iF-DEV-LPC kit and the LPC2138 processor.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
#define DATA_MEM_BASE 0xd0006000L
|
||||
/* The SRAM starts at this address. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return ( unsigned char * )( DATA_MEM_BASE + ( uint32_t )address );
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
/* *(Data_Pointer (addr)) = value; */
|
||||
/* Safer to do nothing. */
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
return *( Data_Pointer ( addr ) );
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 1 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
48
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/build.sh
Executable file
48
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/build.sh
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to compile debie1 on the host Intel/Linux system.
|
||||
#
|
||||
# Any arguments go into the CCOPT (eg. -Wpadded).
|
||||
|
||||
|
||||
# Set tpd to the Test Program Directory:
|
||||
tpd=../..
|
||||
|
||||
# Set hnd to the "harness" directory:
|
||||
|
||||
hnd=${tpd}/harness
|
||||
|
||||
# Native gcc and options:
|
||||
|
||||
export CC="gcc"
|
||||
export CCOPT="-g -O2 -I. -I${hnd} -Wall $*"
|
||||
export LD="gcc"
|
||||
export LDOPT=
|
||||
|
||||
${CC} ${CCOPT} -c ${tpd}/class.c
|
||||
${CC} ${CCOPT} -c ${tpd}/classtab.c
|
||||
${CC} ${CCOPT} -c ${tpd}/debie.c
|
||||
${CC} ${CCOPT} -c -I${tpd} ${hnd}/harness.c -DTRACE_HARNESS
|
||||
${CC} ${CCOPT} -c ${tpd}/health.c
|
||||
${CC} ${CCOPT} -c ${tpd}/hw_if.c
|
||||
${CC} ${CCOPT} -c ${tpd}/measure.c
|
||||
${CC} ${CCOPT} -c -I${tpd} target.c -DTRACE_TARGET
|
||||
${CC} ${CCOPT} -c ${tpd}/tc_hand.c
|
||||
${CC} ${CCOPT} -c ${tpd}/telem.c
|
||||
${CC} ${CCOPT} -c wcc_memcpy.c
|
||||
|
||||
|
||||
${CC} ${LDOPT} \
|
||||
-o debie1 \
|
||||
class.o \
|
||||
classtab.o \
|
||||
debie.o \
|
||||
harness.o \
|
||||
health.o \
|
||||
hw_if.o \
|
||||
measure.o \
|
||||
target.o \
|
||||
tc_hand.o \
|
||||
telem.o \
|
||||
wcc_memcpy.o
|
||||
|
||||
166
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/keyword.h
Normal file
166
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/keyword.h
Normal file
@ -0,0 +1,166 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : keyword.h
|
||||
|
||||
Macro definitions for Keil specific keywords to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This version adapted to GNU GCC on host Intel/Linux.
|
||||
|
||||
Based on the SSF DHI file keyword.h, revision 1.9, Tue Mar 09 12:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KEYWORD_H
|
||||
#define KEYWORD_H
|
||||
|
||||
|
||||
/* Integer type definitions for native types that can hold integer
|
||||
values of at least a given number of bits. These types are used
|
||||
as loop counters to give the most natural and speedy code for
|
||||
the current target. This is Not the C99 stdint.h, but the types
|
||||
have similar names.
|
||||
|
||||
There is a particular form of this file for each (kind of) target
|
||||
processor. The present form is for GCC on 32-bit Intel/Linux, where
|
||||
the widths of the integer types are the following:
|
||||
|
||||
Type Octets Bits
|
||||
char 1 8
|
||||
short 2 16
|
||||
int 4 32
|
||||
long 4 32
|
||||
|
||||
This processor/compiler accepts unaliged multi-octet data, although
|
||||
access is slower. However, we still access possibly misaligned
|
||||
telemetry data using memcpy() instead of direct assignment,
|
||||
just to test that this approach works.
|
||||
|
||||
*/
|
||||
|
||||
/* General types */
|
||||
|
||||
typedef int int_least8_t;
|
||||
/* A signed integer covering at least -128 .. +127. */
|
||||
|
||||
typedef unsigned int uint_least8_t;
|
||||
/* An unsigned integer covering at least 0 .. 255. */
|
||||
|
||||
typedef unsigned short uint16_t;
|
||||
/* An unsigned 16-bit integer. */
|
||||
|
||||
typedef int int_least16_t;
|
||||
/* A signed integer covering at least -2**15 .. +2**15 - 1. */
|
||||
|
||||
typedef unsigned int uint_least16_t;
|
||||
/* An unsigned integer covering at least 0 .. 2**16 - 1. */
|
||||
|
||||
typedef uint16_t uskew16_t;
|
||||
/* A 16-bit type, perhaps not an integer, perhaps not 16-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
/* An unsigned 32-bit integer. */
|
||||
|
||||
typedef uint32_t uskew32_t;
|
||||
/* A 32-bit type, perhaps not an integer, perhaps not 32-bit aligned. */
|
||||
/* If it is an integer type, it is unsigned. */
|
||||
|
||||
|
||||
/* DEBIE-specific types */
|
||||
|
||||
typedef uint16_t data_address_t;
|
||||
/* An address into external data memory. */
|
||||
|
||||
typedef uint16_t code_address_t;
|
||||
/* An address into code memory. */
|
||||
|
||||
|
||||
/* Macros for accessing the DPU data memory by numeric address. */
|
||||
|
||||
extern unsigned char *Data_Pointer ( uint16_t address );
|
||||
|
||||
#define DATA_POINTER(ADDR) Data_Pointer (ADDR)
|
||||
|
||||
/* Macros for accessing and copying multi-octet data. */
|
||||
/* These may need target-specific adjustment if there are */
|
||||
/* alignment restrictions on multi-octet integer values, */
|
||||
/* because the operands in these macros may not be aligned */
|
||||
/* in the required way. */
|
||||
|
||||
extern void wcc_memcpy( void *, void *, int );
|
||||
|
||||
#define COPY(DEST,SOURCE) wcc_memcpy (&(DEST), &(SOURCE), sizeof(DEST))
|
||||
/* Copies the value of SOURCE to the location DEST. */
|
||||
|
||||
extern unsigned short Short_Value ( uskew16_t *x );
|
||||
|
||||
#define VALUE_OF(SOURCE) Short_Value (&(SOURCE))
|
||||
/* Returns the (integer) value of SOURCE, type uskew16_t. */
|
||||
|
||||
/* Macros for struct (aggregate) assignment. Some compilers */
|
||||
/* may not support assignment statements for such types. */
|
||||
|
||||
#define STRUCT_ASSIGN(DEST,SOURCE,TYPE) DEST = SOURCE
|
||||
|
||||
/* Macros for calling "patch" functions */
|
||||
|
||||
typedef code_address_t fptr_t;
|
||||
/* A function that is to be called after patching code memory. */
|
||||
/* The function may or may not be part of the patched code. */
|
||||
/* In the real SW this is "typedef void (*fptr_t)(void);" */
|
||||
|
||||
extern void Call_Patch ( fptr_t func );
|
||||
/* "Call" the patch func. */
|
||||
|
||||
#define CALL_PATCH(FUNCTION) Call_Patch (FUNCTION)
|
||||
/* Jump to the patched memory. */
|
||||
|
||||
/* Some macros for task and interrupt management */
|
||||
|
||||
#define TASK(TASK_NUMBER)
|
||||
#define PRIORITY(LEVEL)
|
||||
#define INTERRUPT(SOURCE)
|
||||
#define USED_REG_BANK(BANK)
|
||||
|
||||
/* Macro for declaring re-entrant function */
|
||||
|
||||
#define REENTRANT_FUNC
|
||||
|
||||
/* Memory model handling macros */
|
||||
|
||||
#define COMPACT_DATA
|
||||
#define COMPACT
|
||||
|
||||
#define PROGRAM
|
||||
|
||||
#define EXTERNAL
|
||||
#define DIRECT_INTERNAL
|
||||
#define INDIRECT_INTERNAL
|
||||
|
||||
#define LOCATION(ADDRESS)
|
||||
|
||||
/* Dealing with the benchmark target system */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define TARGET_INIT printf ("Target Init.\n")
|
||||
#define TARGET_MARK printf ("Target Mark.\n")
|
||||
#define TARGET_REBOOT printf ("Target Reboot.\n")
|
||||
#define TARGET_START_TEST printf ("Target Start Test.\n")
|
||||
#define TARGET_REPEAT_TEST 0
|
||||
|
||||
#endif
|
||||
27
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/problems.h
Normal file
27
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/problems.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
problems.h for intel/linux
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: problems.h,v 1.1 2008/03/28 08:22:17 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PROBLEMS_H
|
||||
#define PROBLEMS_H
|
||||
|
||||
#include "rpt_ipoint.h"
|
||||
|
||||
#define FOR_PROBLEM(P) { RPT_Ipoint(3); RPT_Ipoint(P); }
|
||||
/* A marker to indicate that the program is about to execute */
|
||||
/* a test case that is to be included in the analysis problem */
|
||||
/* identified by P. */
|
||||
/* For RapiTime, ipoint 3 shall be defined as an "escape", and */
|
||||
/* the associated info (P) shall be used to "demux" the trace. */
|
||||
|
||||
#define END_PROBLEM { RPT_Ipoint(3); RPT_Ipoint(0); }
|
||||
/* A marked to indicate the end of a test case that is to be */
|
||||
/* included in the analysis problem identified by the last */
|
||||
/* executed FOR_PROBLEM. */
|
||||
|
||||
#endif
|
||||
60396
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/probs.txt
Normal file
60396
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/probs.txt
Normal file
File diff suppressed because it is too large
Load Diff
18
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/rpt_ipoint.h
Normal file
18
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/rpt_ipoint.h
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
rpt_ipoint.h for intel/linux
|
||||
|
||||
Part of the DEBIE-1 benchmark.
|
||||
|
||||
$Id: rpt_ipoint.h,v 1.1 2008/03/28 08:22:18 niklas Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef RPT_IPOINT_H
|
||||
#define RPT_IPOINT_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
//#define RPT_Ipoint(N) printf ("RPT_Ipoint %d\n", N)
|
||||
#define RPT_Ipoint(N)
|
||||
|
||||
#endif
|
||||
84
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/target.c
Normal file
84
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/target.c
Normal file
@ -0,0 +1,84 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW, test harness for WCET analysis
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : target.c
|
||||
|
||||
Target-specific implementations of the DNI operations, specifically
|
||||
for the intel/linux target.
|
||||
|
||||
Options: if the preprocessor symbol TRACE_TARGET is defined,
|
||||
these operations generate trace message on stdout.
|
||||
|
||||
Based, with extensive changes, on parts of the SSF file rtx_if.c,
|
||||
rev 1.13, Fri May 21 00:14:00 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This file contains one set of operations, as follows:
|
||||
|
||||
> memory operations: dpu_ctrl.h
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#if defined(TRACE_TARGET)
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
/* Memory operations : dpu_ctrl.h */
|
||||
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
|
||||
|
||||
static char data_memory[ 65536 ];
|
||||
/* Simulated 80C32 external data RAM. */
|
||||
|
||||
|
||||
unsigned char *Data_Pointer ( uint16_t address )
|
||||
{
|
||||
return &data_memory[ address ];
|
||||
}
|
||||
|
||||
|
||||
void Set_Data_Byte ( data_address_t addr, unsigned char value )
|
||||
{
|
||||
#if defined(TRACE_TARGET)
|
||||
printf ( "Set_Data_Byte 0x%x to %d = 0x%x\n", addr, value, value );
|
||||
#endif
|
||||
data_memory[ addr ] = value;
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Data_Byte ( data_address_t addr )
|
||||
{
|
||||
unsigned char value = data_memory[ addr ];
|
||||
#if defined(TRACE_TARGET)
|
||||
printf ( "Get_Data_Byte 0x%x is %d = 0x%x\n", addr, value, value );
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
unsigned char Get_Code_Byte ( code_address_t addr )
|
||||
{
|
||||
#if defined(TRACE_TARGET)
|
||||
/* printf ("Get_Code_Byte 0x%x\n", addr); */
|
||||
/* This would be to much output. Skip. */
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_tm_data.h
|
||||
|
||||
The target-specific aspects of the Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_TM_DATA_H
|
||||
#define TARGET_TM_DATA_H
|
||||
|
||||
#define MAX_EVENTS 1261
|
||||
/* Same as in the original DEBIE-1 SW, although there limited
|
||||
by the size of the data memory.
|
||||
*/
|
||||
|
||||
#endif
|
||||
10
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/wcc_memcpy.c
Normal file
10
targets/wasm-tacle/parallel/DEBIE/code/arch/x86/wcc_memcpy.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "keyword.h"
|
||||
|
||||
void wcc_memcpy( void *dest, void *src, int size )
|
||||
{
|
||||
int i;
|
||||
_Pragma( "loopbound min 2 max 4" )
|
||||
for ( i = 0; i < size; i++ )
|
||||
( ( unsigned char * )dest )[ i ] = ( ( unsigned char * )src )[ i ];
|
||||
return;
|
||||
}
|
||||
308
targets/wasm-tacle/parallel/DEBIE/code/class.c
Normal file
308
targets/wasm-tacle/parallel/DEBIE/code/class.c
Normal file
@ -0,0 +1,308 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : class.c
|
||||
|
||||
Event-classification module.
|
||||
|
||||
Based on the SSF file class.c, rev 1.10, Tue Jun 01 12:34:56 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "keyword.h"
|
||||
#include "class.h"
|
||||
#include "classtab.h"
|
||||
#include "su_ctrl.h"
|
||||
#include "measure.h"
|
||||
#define MAX_QUALITY 255
|
||||
|
||||
unsigned char RoughLogarithm ( unsigned int x )
|
||||
/* An integer approximation (0..16) of the base-2 log of x */
|
||||
/* computed as the number of the most-significant non-zero bit. */
|
||||
/* When x = 0, returns zero. */
|
||||
/* When x > 0, returns floor(log2(x) + 1). */
|
||||
/* For example, when x = 1, returns 1. */
|
||||
/* when x = 2, returns 2. */
|
||||
/* when x = 7, returns 3. */
|
||||
/* when x = x7FFF, returns 15. */
|
||||
/* when x = x8000, returns 16. */
|
||||
{
|
||||
unsigned char INDIRECT_INTERNAL greatest_non_zero_bit;
|
||||
unsigned int INDIRECT_INTERNAL shifted;
|
||||
|
||||
greatest_non_zero_bit = 0;
|
||||
shifted = x;
|
||||
|
||||
_Pragma( "loopbound min 15 max 15" )
|
||||
while ( shifted ) {
|
||||
greatest_non_zero_bit++;
|
||||
shifted >>= 1;
|
||||
}
|
||||
|
||||
return greatest_non_zero_bit;
|
||||
}
|
||||
|
||||
|
||||
float GetQualityTerm( unsigned char coeff, unsigned int amplitude )
|
||||
/* Purpose : Calculates the ampltude term of the quality formula. */
|
||||
/* Interface : inputs - parameter coeff defines number of the */
|
||||
/* quality coefficient. */
|
||||
/* - parameter amplitude defines the signal */
|
||||
/* amplitude. */
|
||||
/* outputs - quality term value is retruned. */
|
||||
/* subroutines - RoughLogarithm. */
|
||||
/* Preconditions : quality coefficients have valid values. */
|
||||
/* Postconditions : none. */
|
||||
/* Algorithm : quality term is calculated according to following */
|
||||
/* formula : */
|
||||
/* coefficient[ coeff ] */
|
||||
/* * RoughLogaritm(amplitude) */
|
||||
/* / AMPLTUDE_DIVIDER */
|
||||
/* where coefficient[ coeff ] is the amplitude coefficient of */
|
||||
/* the quality term and AMPLTUDE_DIVIDER is a scaling */
|
||||
/* factor whose purpose is scale the result below 5.0. */
|
||||
/* However if the result would become larger than that, */
|
||||
/* 5.0 is returned. */
|
||||
|
||||
{
|
||||
float EXTERNAL quality;
|
||||
|
||||
quality =
|
||||
( float )( telemetry_data.coefficient[ coeff ]
|
||||
* RoughLogarithm( amplitude ) )
|
||||
/ AMPLITUDE_DIVIDER;
|
||||
|
||||
if ( quality > 5.0 )
|
||||
quality = 5.0;
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
|
||||
void CalculateQualityNumber( event_record_t EXTERNAL *new_event )
|
||||
/* Purpose : Calculates the quality number of a particle hit event */
|
||||
/* and stores in the event record. */
|
||||
/* Interface : inputs - event record pointed by the parameter. */
|
||||
/* outputs - event record pointed by the parameter. */
|
||||
/* subroutines - GetQualityTerm. */
|
||||
/* Preconditions : All components of the event record pointed by the */
|
||||
/* parameter which are used as input have valid values. */
|
||||
/* Postconditions : quality_number component of the event record pointed */
|
||||
/* by the parameter has is calculated. */
|
||||
/* Algorithm : quality_number is calculated according to the following */
|
||||
/* formula : */
|
||||
/* 25 * Class + Ai*RoughLogarithm(Si) / Divider , where */
|
||||
/* Class is the class of the event, */
|
||||
/* Ai is the amplitude coefficient of the quality */
|
||||
/* formula */
|
||||
/* Si is a signal amplitude from the Sensor Unit Peak */
|
||||
/* detector */
|
||||
/* Divider is scaling factor whose value is determined by */
|
||||
/* the maximum value (5) of the latter terms */
|
||||
/* and i goes from 1 to 5. */
|
||||
|
||||
{
|
||||
float INDIRECT_INTERNAL quality;
|
||||
|
||||
quality = 25.0 * new_event -> classification;
|
||||
/* First term of the quality formula. */
|
||||
|
||||
quality += GetQualityTerm( 0, VALUE_OF ( new_event -> plasma_1_plus ) );
|
||||
/* Add amplitude term for i=1 (see function algorithm). */
|
||||
|
||||
quality += GetQualityTerm( 1, VALUE_OF ( new_event -> plasma_1_minus ) );
|
||||
/* Add amplitude term for i=2 (see function algorithm). */
|
||||
|
||||
quality += GetQualityTerm( 2, VALUE_OF ( new_event -> piezo_1 ) );
|
||||
/* Add amplitude term for i=3 (see function algorithm). */
|
||||
|
||||
quality += GetQualityTerm( 3, VALUE_OF ( new_event -> piezo_2 ) );
|
||||
/* Add amplitude term for i=4 (see function algorithm). */
|
||||
|
||||
quality += GetQualityTerm( 4, VALUE_OF ( new_event -> plasma_2_plus ) );
|
||||
/* Add amplitude term for i=5 (see function algorithm). */
|
||||
|
||||
new_event -> quality_number = ( unsigned char ) ( quality + 0.5 );
|
||||
/* Store quality number to the event record */
|
||||
}
|
||||
|
||||
|
||||
void ClassifyEvent( event_record_t EXTERNAL *new_event )
|
||||
/* Purpose : Classifies a particle hit event and stores result */
|
||||
/* to the event record pointed by the parameter. */
|
||||
/* Interface : inputs - event record pointed by the parameter. */
|
||||
/* outputs - event record pointed by the parameter. */
|
||||
/* subroutines - CalculateQualityNumber. */
|
||||
/* Preconditions : All components of the event record pointed by the */
|
||||
/* parameter which are used as input have valid values. */
|
||||
/* Postconditions : classification and quality_number components of the */
|
||||
/* event record pointed by the parameter are computed. */
|
||||
/* Algorithm : - class index is determined by comparing signal. */
|
||||
/* amplitudes and time delays to classification */
|
||||
/* thresholds. */
|
||||
/* - class number is read from a look-up table using the */
|
||||
/* class index and stored in the event record. */
|
||||
/* - CalculateQualityNumber is called. */
|
||||
|
||||
{
|
||||
unsigned char INDIRECT_INTERNAL class_index;
|
||||
/* Index for the class look-up table. */
|
||||
|
||||
SU_settings_t EXTERNAL *INDIRECT_INTERNAL limits;
|
||||
/* Pointer to the struct holding classification thresholds. */
|
||||
|
||||
class_index = 0;
|
||||
/* Bits will be set below according to event attributes. */
|
||||
|
||||
switch ( new_event -> SU_number )
|
||||
/* Select proper classification thresholds. */
|
||||
{
|
||||
case SU_1:
|
||||
limits = &telemetry_data.sensor_unit_1;
|
||||
break;
|
||||
|
||||
case SU_2:
|
||||
limits = &telemetry_data.sensor_unit_2;
|
||||
break;
|
||||
|
||||
case SU_3:
|
||||
limits = &telemetry_data.sensor_unit_3;
|
||||
break;
|
||||
|
||||
case SU_4:
|
||||
limits = &telemetry_data.sensor_unit_4;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> plasma_1_plus ) >=
|
||||
( ( limits -> plasma_1_plus_classification ) * 256 ) ) {
|
||||
class_index |= PLASMA_1_PLUS_CLASS;
|
||||
/* Set classification index bit for Plasma1+ peak amplitude. */
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> plasma_1_minus ) >=
|
||||
( ( limits -> plasma_1_minus_classification ) * 256 ) ) {
|
||||
class_index |= PLASMA_1_MINUS_CLASS;
|
||||
/* Set classification index bit for Plasma1- peak amplitude. */
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> piezo_1 ) >=
|
||||
( ( limits -> piezo_1_classification ) * 256 ) ) {
|
||||
class_index |= PIEZO_1_CLASS;
|
||||
/* Set classification index bit for Piezo1 peak amplitude. */
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> piezo_2 ) >=
|
||||
( ( limits -> piezo_2_classification ) * 256 ) ) {
|
||||
class_index |= PIEZO_2_CLASS;
|
||||
/* Set classification index bit for Piezo2 peak amplitude. */
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> plasma_2_plus ) >=
|
||||
( ( limits -> plasma_2_plus_classification ) * 256 ) ) {
|
||||
class_index |= PLASMA_2_PLUS_CLASS;
|
||||
/* Set classification index bit for Plasma2+ peak amplitude. */
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> delay_2 ) >=
|
||||
( ( limits -> plasma_1_plus_to_piezo_min_time ) * 16 ) &&
|
||||
VALUE_OF ( new_event -> delay_2 ) <=
|
||||
( ( limits -> plasma_1_plus_to_piezo_max_time ) * 16 ) ) {
|
||||
class_index |= PLASMA_1_PLUS_TO_PIEZO_CLASS;
|
||||
/* Set classification index bit for Plasma1+ to Piezo delay. */
|
||||
}
|
||||
|
||||
if ( VALUE_OF ( new_event -> delay_3 ) >=
|
||||
( ( limits -> plasma_1_minus_to_piezo_min_time ) * 16 ) &&
|
||||
VALUE_OF ( new_event -> delay_3 ) <=
|
||||
( ( limits -> plasma_1_minus_to_piezo_max_time ) * 16 ) ) {
|
||||
class_index |= PLASMA_1_MINUS_TO_PIEZO_CLASS;
|
||||
/* Set classification index bit for Plasma1- to Piezo delay. */
|
||||
}
|
||||
|
||||
if ( new_event -> delay_1 <=
|
||||
limits -> plasma_1_plus_to_minus_max_time ) {
|
||||
class_index |= PLASMA_1_PLUS_TO_MINUS_CLASS;
|
||||
/* Set classification index bit for Plasma1+ to Plasma1- delay. */
|
||||
}
|
||||
|
||||
new_event -> classification = event_class[ class_index ];
|
||||
/* Store classification number to the event record */
|
||||
|
||||
if ( SU_state[ new_event->SU_number - SU_1 ] == self_test_e )
|
||||
new_event -> quality_number = MAX_QUALITY;
|
||||
|
||||
else
|
||||
CalculateQualityNumber( new_event );
|
||||
|
||||
}
|
||||
|
||||
void InitClassification( void )
|
||||
/* Purpose : Initializes classication coefficients and levels. */
|
||||
/* Interface : inputs - none. */
|
||||
/* outputs - quality coefficients in telemetry_data. */
|
||||
/* - classification levels in telemetry_data. */
|
||||
/* - threshold levels in telemetry_data. */
|
||||
/* - min time window in telemetry_data */
|
||||
/* - max time window in telemetry_data */
|
||||
/* subroutines - Init_SU_Settings */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : outputs have their default values. */
|
||||
/* Algorithm : see below */
|
||||
|
||||
{
|
||||
uint_least8_t EXTERNAL i;
|
||||
/* Loop variable. */
|
||||
|
||||
_Pragma( "loopbound min 5 max 5" )
|
||||
for ( i = 0; i < NUM_QCOEFF; i++ )
|
||||
telemetry_data.coefficient[ i ] = DEFAULT_COEFF;
|
||||
|
||||
Init_SU_Settings ( &telemetry_data.sensor_unit_1 );
|
||||
Init_SU_Settings ( &telemetry_data.sensor_unit_2 );
|
||||
Init_SU_Settings ( &telemetry_data.sensor_unit_3 );
|
||||
Init_SU_Settings ( &telemetry_data.sensor_unit_4 );
|
||||
/* Default values for thresholds, classification levels and min/max times */
|
||||
/* related to classification are set here. */
|
||||
|
||||
}
|
||||
|
||||
void Init_SU_Settings ( SU_settings_t EXTERNAL *set )
|
||||
/* Purpose : Initializes classication parameters */
|
||||
/* Interface : inputs - none. */
|
||||
/* outputs - classification levels in telemetry_data. */
|
||||
/* - threshold levels in telemetry_data. */
|
||||
/* - min time window in telemetry_data */
|
||||
/* - max time window in telemetry_data */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : outputs have their default values. */
|
||||
/* Algorithm : Sets default values to telemetry_data. */
|
||||
{
|
||||
set -> plasma_1_plus_threshold = DEFAULT_THRESHOLD;
|
||||
set -> plasma_1_minus_threshold = DEFAULT_THRESHOLD;
|
||||
set -> piezo_threshold = DEFAULT_THRESHOLD;
|
||||
set -> plasma_1_plus_classification = DEFAULT_CLASSIFICATION_LEVEL;
|
||||
set -> plasma_1_minus_classification = DEFAULT_CLASSIFICATION_LEVEL;
|
||||
set -> piezo_1_classification = DEFAULT_CLASSIFICATION_LEVEL;
|
||||
set -> piezo_2_classification = DEFAULT_CLASSIFICATION_LEVEL;
|
||||
set -> plasma_2_plus_classification = DEFAULT_CLASSIFICATION_LEVEL;
|
||||
set -> plasma_1_plus_to_minus_max_time = DEFAULT_MAX_TIME;
|
||||
set -> plasma_1_plus_to_piezo_min_time = DEFAULT_MIN_TIME;
|
||||
set -> plasma_1_plus_to_piezo_max_time = DEFAULT_MAX_TIME;
|
||||
set -> plasma_1_minus_to_piezo_min_time = DEFAULT_MIN_TIME;
|
||||
set -> plasma_1_minus_to_piezo_max_time = DEFAULT_MAX_TIME;
|
||||
}
|
||||
|
||||
|
||||
72
targets/wasm-tacle/parallel/DEBIE/code/class.h
Normal file
72
targets/wasm-tacle/parallel/DEBIE/code/class.h
Normal file
@ -0,0 +1,72 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : class.h
|
||||
|
||||
Prototypes etc. for the event-classification module Class.
|
||||
|
||||
Based on the SSF file class.h, rev 1.6, Fri Jun 04 14:47:38 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CLASS_H
|
||||
#define CLASS_H
|
||||
|
||||
#include "keyword.h"
|
||||
#include "tm_data.h"
|
||||
|
||||
#define MAX_AMPLITUDE_TERM 5
|
||||
/* Maximum value for an amplitude term in the quality formula. */
|
||||
/* Valid range: 1 - 255. */
|
||||
|
||||
#define DEFAULT_COEFF 5
|
||||
/* Default value for classification coefficient */
|
||||
/* adjustable with telecommands. Gives maximum allowed */
|
||||
/* (5) amplitude term with maximum amplitude with this */
|
||||
/* formula. If amplitudes are going to be smaller, the */
|
||||
/* amplitude can be amplified by setting greater value */
|
||||
/* to the quality coefficient. Minimum amplification is */
|
||||
/* 1/5 and maximum 50. */
|
||||
/* Valid range 1 - 255. */
|
||||
|
||||
#define AMPLITUDE_DIVIDER ((DEFAULT_COEFF * 16.0) / MAX_AMPLITUDE_TERM)
|
||||
/* Divider for an amplitude term in the quality formula. */
|
||||
/* 16 = maxumum value for the rough 2 based logarithm of the */
|
||||
/* signal amplitude in the quality formula. */
|
||||
|
||||
#define PLASMA_1_PLUS_CLASS 0x80
|
||||
#define PLASMA_1_MINUS_CLASS 0x40
|
||||
#define PLASMA_2_PLUS_CLASS 0x08
|
||||
#define PIEZO_1_CLASS 0x20
|
||||
#define PIEZO_2_CLASS 0x10
|
||||
/* Classification index mask values for signal amplitudes */
|
||||
/* above the classification levels. */
|
||||
|
||||
#define PLASMA_1_PLUS_TO_PIEZO_CLASS 0x02
|
||||
#define PLASMA_1_MINUS_TO_PIEZO_CLASS 0x01
|
||||
#define PLASMA_1_PLUS_TO_MINUS_CLASS 0x04
|
||||
/* Classification index mask values for delays inside the */
|
||||
/* time windows. */
|
||||
|
||||
extern void InitClassification( void );
|
||||
/* Inits classification thresholds and coefficients. */
|
||||
|
||||
extern void ClassifyEvent( event_record_t EXTERNAL *new_event );
|
||||
/* Classifies event and calculates the quality number. */
|
||||
|
||||
extern void Init_SU_Settings ( SU_settings_t EXTERNAL *set );
|
||||
/* Sets the default values for classification parameters. */
|
||||
|
||||
#endif
|
||||
283
targets/wasm-tacle/parallel/DEBIE/code/classtab.c
Normal file
283
targets/wasm-tacle/parallel/DEBIE/code/classtab.c
Normal file
@ -0,0 +1,283 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : classtab.c
|
||||
|
||||
Table for classifying event according to multiple measurements.
|
||||
|
||||
Based on the SSF file classtab.c, rev 1.2, Thu Feb 18 15:12:22 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
unsigned char EXTERNAL event_class[ 256 ] = {
|
||||
/* Que Qui P1 P2 Qle dTei dTep dTip */
|
||||
0, /* 0 0 0 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 0 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 0 OUTSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 0 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 0 INSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 0 0 0 INSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 0 INSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 0 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 0 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 1 OUTSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 0 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 1 INSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 0 0 1 INSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 0 0 1 INSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 0 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 0 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 0 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 0 1 0 OUTSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 0 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 0 1 0 INSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 0 1 0 INSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 0 1 0 INSIDE INSIDE INSIDE */
|
||||
3, /* 0 0 0 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 0 0 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
3, /* 0 0 0 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 0 0 1 1 OUTSIDE INSIDE INSIDE */
|
||||
3, /* 0 0 0 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 0 0 1 1 INSIDE OUTSIDE INSIDE */
|
||||
3, /* 0 0 0 1 1 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 0 0 1 1 INSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 1 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 1 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 1 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 1 0 0 OUTSIDE INSIDE INSIDE */
|
||||
0, /* 0 0 1 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 0 1 0 0 INSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 0 1 0 0 INSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 0 1 0 0 INSIDE INSIDE INSIDE */
|
||||
3, /* 0 0 1 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 0 1 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
3, /* 0 0 1 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 0 1 0 1 OUTSIDE INSIDE INSIDE */
|
||||
3, /* 0 0 1 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 0 1 0 1 INSIDE OUTSIDE INSIDE */
|
||||
3, /* 0 0 1 0 1 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 0 1 0 1 INSIDE INSIDE INSIDE */
|
||||
5, /* 0 0 1 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
5, /* 0 0 1 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
5, /* 0 0 1 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
5, /* 0 0 1 1 0 OUTSIDE INSIDE INSIDE */
|
||||
5, /* 0 0 1 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
5, /* 0 0 1 1 0 INSIDE OUTSIDE INSIDE */
|
||||
5, /* 0 0 1 1 0 INSIDE INSIDE OUTSIDE */
|
||||
5, /* 0 0 1 1 0 INSIDE INSIDE INSIDE */
|
||||
8, /* 0 0 1 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
8, /* 0 0 1 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
8, /* 0 0 1 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
8, /* 0 0 1 1 1 OUTSIDE INSIDE INSIDE */
|
||||
8, /* 0 0 1 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
8, /* 0 0 1 1 1 INSIDE OUTSIDE INSIDE */
|
||||
8, /* 0 0 1 1 1 INSIDE INSIDE OUTSIDE */
|
||||
8, /* 0 0 1 1 1 INSIDE INSIDE INSIDE */
|
||||
0, /* 0 1 0 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 1 0 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 1 0 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 1 0 0 0 OUTSIDE INSIDE INSIDE */
|
||||
0, /* 0 1 0 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 0 1 0 0 0 INSIDE OUTSIDE INSIDE */
|
||||
0, /* 0 1 0 0 0 INSIDE INSIDE OUTSIDE */
|
||||
0, /* 0 1 0 0 0 INSIDE INSIDE INSIDE */
|
||||
3, /* 0 1 0 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 1 0 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
3, /* 0 1 0 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 1 0 0 1 OUTSIDE INSIDE INSIDE */
|
||||
3, /* 0 1 0 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 1 0 0 1 INSIDE OUTSIDE INSIDE */
|
||||
3, /* 0 1 0 0 1 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 1 0 0 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 0 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 1 0 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 0 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 1 0 1 0 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 0 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 1 0 1 0 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 0 1 0 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 1 0 1 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 0 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
4, /* 0 1 0 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 0 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
4, /* 0 1 0 1 1 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 0 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
4, /* 0 1 0 1 1 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 0 1 1 INSIDE INSIDE OUTSIDE */
|
||||
4, /* 0 1 0 1 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 1 1 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 1 1 0 0 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 0 1 1 0 0 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 0 0 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 0 1 1 0 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
4, /* 0 1 1 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
4, /* 0 1 1 0 1 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
4, /* 0 1 1 0 1 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 0 1 INSIDE INSIDE OUTSIDE */
|
||||
4, /* 0 1 1 0 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
5, /* 0 1 1 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
5, /* 0 1 1 1 0 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
5, /* 0 1 1 1 0 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 1 0 INSIDE INSIDE OUTSIDE */
|
||||
5, /* 0 1 1 1 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
8, /* 0 1 1 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
8, /* 0 1 1 1 1 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 0 1 1 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
8, /* 0 1 1 1 1 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 0 1 1 1 1 INSIDE INSIDE OUTSIDE */
|
||||
8, /* 0 1 1 1 1 INSIDE INSIDE INSIDE */
|
||||
0, /* 1 0 0 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 1 0 0 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
0, /* 1 0 0 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
0, /* 1 0 0 0 0 OUTSIDE INSIDE INSIDE */
|
||||
0, /* 1 0 0 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
0, /* 1 0 0 0 0 INSIDE OUTSIDE INSIDE */
|
||||
0, /* 1 0 0 0 0 INSIDE INSIDE OUTSIDE */
|
||||
0, /* 1 0 0 0 0 INSIDE INSIDE INSIDE */
|
||||
3, /* 1 0 0 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 1 0 0 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
3, /* 1 0 0 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 1 0 0 0 1 OUTSIDE INSIDE INSIDE */
|
||||
3, /* 1 0 0 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 1 0 0 0 1 INSIDE OUTSIDE INSIDE */
|
||||
3, /* 1 0 0 0 1 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 1 0 0 0 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 0 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 1 0 0 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 1 0 0 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 1 0 0 1 0 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 0 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
3, /* 1 0 0 1 0 INSIDE OUTSIDE INSIDE */
|
||||
1, /* 1 0 0 1 0 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 1 0 0 1 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 0 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 0 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
4, /* 1 0 0 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
4, /* 1 0 0 1 1 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 0 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 0 1 1 INSIDE OUTSIDE INSIDE */
|
||||
4, /* 1 0 0 1 1 INSIDE INSIDE OUTSIDE */
|
||||
4, /* 1 0 0 1 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
3, /* 1 0 1 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
3, /* 1 0 1 0 0 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 0 0 INSIDE OUTSIDE INSIDE */
|
||||
3, /* 1 0 1 0 0 INSIDE INSIDE OUTSIDE */
|
||||
3, /* 1 0 1 0 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
4, /* 1 0 1 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
4, /* 1 0 1 0 1 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 0 1 INSIDE OUTSIDE INSIDE */
|
||||
4, /* 1 0 1 0 1 INSIDE INSIDE OUTSIDE */
|
||||
4, /* 1 0 1 0 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
5, /* 1 0 1 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
5, /* 1 0 1 1 0 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 1 0 INSIDE OUTSIDE INSIDE */
|
||||
5, /* 1 0 1 1 0 INSIDE INSIDE OUTSIDE */
|
||||
5, /* 1 0 1 1 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
8, /* 1 0 1 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
8, /* 1 0 1 1 1 OUTSIDE INSIDE INSIDE */
|
||||
1, /* 1 0 1 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 0 1 1 1 INSIDE OUTSIDE INSIDE */
|
||||
8, /* 1 0 1 1 1 INSIDE INSIDE OUTSIDE */
|
||||
8, /* 1 0 1 1 1 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 1 0 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 1 0 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 1 1 0 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
1, /* 1 1 0 0 0 OUTSIDE INSIDE INSIDE */
|
||||
6, /* 1 1 0 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
6, /* 1 1 0 0 0 INSIDE OUTSIDE INSIDE */
|
||||
6, /* 1 1 0 0 0 INSIDE INSIDE OUTSIDE */
|
||||
6, /* 1 1 0 0 0 INSIDE INSIDE INSIDE */
|
||||
1, /* 1 1 0 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
1, /* 1 1 0 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
1, /* 1 1 0 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
1, /* 1 1 0 0 1 OUTSIDE INSIDE INSIDE */
|
||||
7, /* 1 1 0 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
7, /* 1 1 0 0 1 INSIDE OUTSIDE INSIDE */
|
||||
7, /* 1 1 0 0 1 INSIDE INSIDE OUTSIDE */
|
||||
7, /* 1 1 0 0 1 INSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 0 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 0 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 0 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
2, /* 1 1 0 1 0 OUTSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 0 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 0 1 0 INSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 0 1 0 INSIDE INSIDE OUTSIDE */
|
||||
7, /* 1 1 0 1 0 INSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 0 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 0 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 0 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
2, /* 1 1 0 1 1 OUTSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 0 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 0 1 1 INSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 0 1 1 INSIDE INSIDE OUTSIDE */
|
||||
9, /* 1 1 0 1 1 INSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 0 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 0 0 OUTSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 0 0 OUTSIDE INSIDE OUTSIDE */
|
||||
2, /* 1 1 1 0 0 OUTSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 0 0 INSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 0 0 INSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 0 0 INSIDE INSIDE OUTSIDE */
|
||||
7, /* 1 1 1 0 0 INSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 0 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 0 1 OUTSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 0 1 OUTSIDE INSIDE OUTSIDE */
|
||||
2, /* 1 1 1 0 1 OUTSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 0 1 INSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 0 1 INSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 0 1 INSIDE INSIDE OUTSIDE */
|
||||
9, /* 1 1 1 0 1 INSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 1 0 OUTSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 1 0 OUTSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 1 0 OUTSIDE INSIDE OUTSIDE */
|
||||
2, /* 1 1 1 1 0 OUTSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 1 0 INSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 1 0 INSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 1 0 INSIDE INSIDE OUTSIDE */
|
||||
7, /* 1 1 1 1 0 INSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 1 1 OUTSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 1 1 OUTSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 1 1 OUTSIDE INSIDE OUTSIDE */
|
||||
2, /* 1 1 1 1 1 OUTSIDE INSIDE INSIDE */
|
||||
2, /* 1 1 1 1 1 INSIDE OUTSIDE OUTSIDE */
|
||||
2, /* 1 1 1 1 1 INSIDE OUTSIDE INSIDE */
|
||||
2, /* 1 1 1 1 1 INSIDE INSIDE OUTSIDE */
|
||||
9 /* 1 1 1 1 1 INSIDE INSIDE INSIDE */
|
||||
};
|
||||
32
targets/wasm-tacle/parallel/DEBIE/code/classtab.h
Normal file
32
targets/wasm-tacle/parallel/DEBIE/code/classtab.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : classtab.h
|
||||
|
||||
Prototypes etc. for the ClassTab (event classification table) module.
|
||||
|
||||
Based on the SSF file classtab.h, rev 1.1, Mon Jan 18 11:53:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CLASSTAB_H
|
||||
#define CLASSTAB_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
extern unsigned char EXTERNAL event_class[ 256 ];
|
||||
|
||||
#endif
|
||||
|
||||
57
targets/wasm-tacle/parallel/DEBIE/code/debie.c
Normal file
57
targets/wasm-tacle/parallel/DEBIE/code/debie.c
Normal file
@ -0,0 +1,57 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : debie.c
|
||||
|
||||
Main function.
|
||||
|
||||
Based on the SSF file debie.c, revision 1.4, Tue Jun 01 13:37:20 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "reg52.h"
|
||||
#include "kernobj.h"
|
||||
#include "keyword.h"
|
||||
#include "health.h"
|
||||
#include "taskctrl.h"
|
||||
|
||||
|
||||
int main( void )
|
||||
{
|
||||
TARGET_INIT;
|
||||
/* Initialize the benchmark target system. */
|
||||
|
||||
EA = 0;
|
||||
/* Disable all interrupts */
|
||||
|
||||
Boot();
|
||||
/* Execute boot sequence */
|
||||
|
||||
EA = 1;
|
||||
/* Enable 'enabled' interrupts */
|
||||
|
||||
StartSystem( HEALTH_MONITORING_TASK );
|
||||
/* Start RTX kernel and first task */
|
||||
|
||||
// do not run simulation for ever, just exit here
|
||||
return 0;
|
||||
|
||||
_Pragma( "loopbound min 0 max 0" )
|
||||
while ( 1 ) {
|
||||
/* StartSystem has failed, so we just */
|
||||
/* wait here for a while for the Watch Dog */
|
||||
/* to wake up. */
|
||||
}
|
||||
}
|
||||
|
||||
200
targets/wasm-tacle/parallel/DEBIE/code/dpu_ctrl.h
Normal file
200
targets/wasm-tacle/parallel/DEBIE/code/dpu_ctrl.h
Normal file
@ -0,0 +1,200 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : dpu_ctrl.h
|
||||
|
||||
Operations and macros for low-level control of the Data Processing
|
||||
Unit, the 80C32 computer on which the DEBIE DPU software runs.
|
||||
This includes accessing data and code memories by address; boot
|
||||
and reset operations; watchdog handling; memory patch and test.
|
||||
|
||||
Based on the SSF DHI file dpu_ctrl.h, rev 1.23, Fri May 28 14:59:30 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef DPU_CTRL_H
|
||||
#define DPU_CTRL_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
#define SAME 1
|
||||
#define NOT_SAME 0
|
||||
|
||||
#define MEMORY_PATCHED 1
|
||||
#define MEMORY_NOT_PATCHED 0
|
||||
|
||||
#ifndef HIGH
|
||||
#define HIGH 1
|
||||
#endif
|
||||
|
||||
#ifndef LOW
|
||||
#define LOW 0
|
||||
#endif
|
||||
|
||||
#define SELECTED 1
|
||||
#define NOT_SELECTED 0
|
||||
#define RESET_OK 1
|
||||
#define RESET_NOT_OK 0
|
||||
|
||||
#define ACCEPT_EVENT 1
|
||||
#define REJECT_EVENT 0
|
||||
|
||||
|
||||
/* memory addresses for program copy */
|
||||
#define PROGRAM_COPY_START 0x1000
|
||||
#define PROGRAM_COPY_END 0x8000
|
||||
/* this can be replaced with real end address (+1) of used program code */
|
||||
/* given in the linker map file */
|
||||
|
||||
/* Comment or delete following definition, if program should be executed */
|
||||
/* from RAM */
|
||||
/* #define USE_ALWAYS_PROM */
|
||||
|
||||
/* memory addresses for patching */
|
||||
#define BEGIN_SRAM1 0x1000
|
||||
#define END_SRAM1 0x7FFF
|
||||
#define BEGIN_SRAM3 0x8000
|
||||
#define END_SRAM3 0xFEFF
|
||||
#define BEGIN_DATA_RAM 0x0000
|
||||
|
||||
|
||||
#define SCIENCE_DATA_START_ADDRESS 0x0000
|
||||
/* First free absolute data address. */
|
||||
|
||||
#define INITIAL_CHECKSUM_VALUE 0
|
||||
/* A value given to 'reference_checksum' variable at 'Boot()'. */
|
||||
/* It is zero, since one code byte is dedicated to a constant */
|
||||
/* that ensures that the checksum of the PROM is zero. */
|
||||
|
||||
#include "target_dpu_ctrl.h"
|
||||
|
||||
/*type definitions*/
|
||||
|
||||
typedef unsigned char DEBIE_mode_t;
|
||||
/* Debie mode index. Valid values: */
|
||||
/* 00 DPU self test */
|
||||
/* 01 Stand by */
|
||||
/* 10 Acquisition */
|
||||
|
||||
|
||||
typedef enum {
|
||||
power_up_reset_e = 0, /* Don't change value ! */
|
||||
watchdog_reset_e = 1, /* Don't change value ! */
|
||||
soft_reset_e,
|
||||
warm_reset_e,
|
||||
error_e,
|
||||
checksum_reset_e
|
||||
} reset_class_t;
|
||||
|
||||
extern reset_class_t EXTERNAL s_w_reset;
|
||||
|
||||
typedef enum {
|
||||
PROM_e, SRAM_e
|
||||
} memory_configuration_t;
|
||||
|
||||
|
||||
#define MAX_TIME 0xFFFFFFFF
|
||||
/* Maximum value for DEBIE time. */
|
||||
|
||||
typedef uint32_t dpu_time_t;
|
||||
/* Data type for DEBIE time. */
|
||||
|
||||
/*-------------------------------------------------------*/
|
||||
/* Multi-byte TM types without alignment constraints. */
|
||||
/* The Keil/8051 system does not constrain alignment for */
|
||||
/* multi-byte types such as long int, but the Unix test */
|
||||
/* systems do, and we must declare the TM structures to */
|
||||
/* avoid constraints. */
|
||||
/* Note that we still assume that the two systems have */
|
||||
/* the same endianness. */
|
||||
/* Note also that the native type is used in the TM when */
|
||||
/* the component happens to have the correct alignment. */
|
||||
/* The special types are used only when the alignment is */
|
||||
/* otherwise incorrect. */
|
||||
/* Data is moved between the native type and the special */
|
||||
/* TM type only using the COPY or VALUE_OF macros. Thus, */
|
||||
/* on the 8051 the two types can in fact be identical, */
|
||||
/* with COPY defined as direct assignment ("="). */
|
||||
|
||||
typedef uskew32_t tm_dpu_time_t;
|
||||
/* The TM type corresponding to dpu_time_t (32-bit int). */
|
||||
|
||||
typedef uskew16_t tm_ushort_t;
|
||||
/* The TM type corresponding to unsigned short int. */
|
||||
/* */
|
||||
/*-------------------------------------------------------*/
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char *source;
|
||||
data_address_t destination;
|
||||
uint_least8_t data_amount;
|
||||
unsigned char execution_command;
|
||||
} memory_patch_variables_t;
|
||||
/* Holds parameters for PatchCode function: */
|
||||
/* source source address of the patch */
|
||||
/* (should be between 0x8000 and 0xFF00 - */
|
||||
/* data_amount) */
|
||||
/* destination destination address of the patch */
|
||||
/* (should be between 0x1000 and 0x8000 - */
|
||||
/* data_amount) */
|
||||
/* data_amount amount of bytes to be patched (max 255) */
|
||||
/* execution_command action executed after patch */
|
||||
/* 0x00 - continue normally */
|
||||
/* 0x09 - execute soft reset */
|
||||
/* 0x37 - execute warm reset */
|
||||
/* 0x5A - jump to start address of patched */
|
||||
/* memory area */
|
||||
|
||||
extern unsigned char EXTERNAL code_not_patched;
|
||||
/* Initial value is 1, set at Boot(). Value is 1 when code */
|
||||
/* checksum value is valid, cleared to 0 when code memory is */
|
||||
/* patched, set to 1 when next checksum calculation */
|
||||
/* period is started. */
|
||||
|
||||
extern unsigned char EXTERNAL reference_checksum;
|
||||
/* Expected value for code checksum. Will be changed when */
|
||||
/* code memory is patched. */
|
||||
|
||||
|
||||
/* Function prototypes: */
|
||||
|
||||
extern void Init_DPU ( reset_class_t reset_class );
|
||||
|
||||
extern reset_class_t GetResetClass( void );
|
||||
|
||||
extern void SignalMemoryErrors ( void );
|
||||
|
||||
extern void SetMemoryConfiguration ( memory_configuration_t memory );
|
||||
|
||||
extern memory_configuration_t GetMemoryConfiguration( void )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
extern void PatchCode( memory_patch_variables_t EXTERNAL *patch_variables );
|
||||
|
||||
extern void Reboot( reset_class_t boot_type );
|
||||
|
||||
|
||||
/* Assembly-language function prototypes (asmfuncs.a51): */
|
||||
|
||||
extern unsigned char TestMemBits ( data_address_t address );
|
||||
|
||||
extern unsigned char TestMemData (
|
||||
data_address_t start,
|
||||
uint_least8_t bytes );
|
||||
|
||||
extern unsigned char TestMemSeq (
|
||||
data_address_t start,
|
||||
uint_least8_t bytes );
|
||||
|
||||
#endif
|
||||
3714
targets/wasm-tacle/parallel/DEBIE/code/harness/harness.c
Normal file
3714
targets/wasm-tacle/parallel/DEBIE/code/harness/harness.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_ad_conv.h
|
||||
|
||||
Macros, functions, types and constants for controlling AD converter.
|
||||
|
||||
This version uses the harness functions for I/O and kernel simulation.
|
||||
|
||||
Based on the SSF DHI file ad_conv.h, revision 1.6, Tue Jun 01 12:35:44 1999.
|
||||
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TARGET_AD_CONV_H
|
||||
#define TARGET_AD_CONV_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
/* AD converter control functions, simulated in harness.c */
|
||||
|
||||
extern void Update_ADC_Channel_Reg ( unsigned char channel );
|
||||
extern void Start_Conversion ( void );
|
||||
extern unsigned char End_Of_ADC ( void );
|
||||
extern unsigned char Get_Result ( void );
|
||||
extern void Set_DAC_Output ( unsigned char level );
|
||||
|
||||
/* AD converter control macros */
|
||||
|
||||
#define UPDATE_ADC_CHANNEL_REG Update_ADC_Channel_Reg (ADC_channel_register)
|
||||
#define START_CONVERSION Start_Conversion ()
|
||||
#define END_OF_ADC End_Of_ADC ()
|
||||
#define GET_RESULT Get_Result ()
|
||||
#define SET_DAC_OUTPUT(LEVEL) Set_DAC_Output (LEVEL)
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,68 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_dpu_ctrl.h
|
||||
|
||||
Operations and macros for low-level control of the Data Processing
|
||||
Unit, the 80C32 computer on which the DEBIE DPU software runs.
|
||||
This includes accessing data and code memories by address; boot
|
||||
and reset operations; watchdog handling; memory patch and test.
|
||||
|
||||
This version uses the harness functions for I/O and kernel simulation.
|
||||
|
||||
Based on the SSF DHI file dpu_ctrl.h, rev 1.23, Fri May 28 14:59:30 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TARGET_DPU_CTRL_H
|
||||
#define TARGET_DPU_CTRL_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
extern unsigned char Event_Flag ( void );
|
||||
|
||||
#define EVENT_FLAG Event_Flag()
|
||||
/* Event storage condition signal. */
|
||||
|
||||
|
||||
/* Access simulated memory */
|
||||
|
||||
extern void Set_Data_Byte ( data_address_t addr, unsigned char value );
|
||||
extern unsigned char Get_Data_Byte ( data_address_t addr );
|
||||
extern unsigned char Get_Code_Byte ( code_address_t addr );
|
||||
|
||||
|
||||
/* Functions and macros to access external memory by numerical address. */
|
||||
|
||||
#define SET_DATA_BYTE(ADDR,VALUE) Set_Data_Byte (ADDR, VALUE)
|
||||
#define GET_DATA_BYTE(ADDR) Get_Data_Byte (ADDR)
|
||||
#define GET_CODE_BYTE(ADDR) Get_Code_Byte (ADDR)
|
||||
|
||||
|
||||
/* Controlling the watchdog and the memory mapping: */
|
||||
|
||||
#define SET_WD_RESET_HIGH {}
|
||||
#define SET_WD_RESET_LOW {}
|
||||
#define SET_MEM_CONF_PROM {}
|
||||
#define SET_MEM_CONF_SRAM {}
|
||||
|
||||
|
||||
/* macro used in healthmonitoring */
|
||||
|
||||
extern unsigned char Check_Current ( unsigned char bits );
|
||||
|
||||
#define CHECK_CURRENT(BIT_NUMBERS) Check_Current (BIT_NUMBERS)
|
||||
/* Checks whether given bit in the HV Status Register is HIGH or LOW. */
|
||||
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,71 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_isr_ctrl.h
|
||||
|
||||
Macros and operations to control and handle interrupts.
|
||||
|
||||
This version uses the harness functions for I/O and kernel simulation.
|
||||
|
||||
Based on the SSF DHI file isr_ctrl.h, rev 1.16, Sun Jul 25 15:02:08 1999.
|
||||
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TARGET_ISR_CTRL_H
|
||||
#define TARGET_ISR_CTRL_H
|
||||
|
||||
|
||||
/* Simulation of hit trigger. */
|
||||
|
||||
extern void Enable_Hit_Trigger ( void );
|
||||
extern void Disable_Hit_Trigger ( void );
|
||||
extern unsigned char Hit_Trigger_Flag ( void );
|
||||
|
||||
/* Macros for access to hit trigger. */
|
||||
|
||||
#define SET_HIT_TRIGGER_ISR_FLAG {}
|
||||
#define CLEAR_HIT_TRIGGER_ISR_FLAG {}
|
||||
#define ENABLE_HIT_TRIGGER Enable_Hit_Trigger ()
|
||||
#define DISABLE_HIT_TRIGGER Disable_Hit_Trigger ();
|
||||
#define HIT_TRIGGER_FLAG Hit_Trigger_Flag ()
|
||||
|
||||
|
||||
#define SET_INTERRUPT_PRIORITIES {}
|
||||
/* Sets Timer 1, Timer 2 and External interrupt 0 and 1 */
|
||||
/* priorities high, others to low. */
|
||||
|
||||
#define DISABLE_INTERRUPT_MASTER {}
|
||||
#define ENABLE_INTERRUPT_MASTER {}
|
||||
/* Clear and set interrupt master enable bit */
|
||||
|
||||
/* Simulation of Telecommand Timer */
|
||||
|
||||
extern unsigned char TC_Timer_Overflow_Flag ( void );
|
||||
extern void Clear_TC_Timer_Overflow_Flag ( void );
|
||||
extern void Set_TC_Timer_Overflow_Flag ( void );
|
||||
|
||||
/* Macros for Telecommand Timer */
|
||||
|
||||
#define DISABLE_TC_TIMER_ISR {}
|
||||
/* Macro for clearing TC timer interrupt enable flag */
|
||||
|
||||
#define TC_TIMER_OVERFLOW_FLAG TC_Timer_Overflow_Flag ()
|
||||
/* TC timer overflow flag */
|
||||
|
||||
#define CLEAR_TC_TIMER_OVERFLOW_FLAG Clear_TC_Timer_Overflow_Flag ()
|
||||
#define SET_TC_TIMER_OVERFLOW_FLAG Set_TC_Timer_Overflow_Flag ()
|
||||
/* TC timer overflow flag manipulation macros. */
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,36 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_reg52.h
|
||||
|
||||
Definitions for 80C32 Special Function Registers to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
This "null" (DNI) version declares these Special Function Registers
|
||||
as global "unsigned char" variables.
|
||||
|
||||
Created for the DEBIE-I WCET benchmark program. Not based directly
|
||||
on any SSF sources.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TARGET_REG52_H
|
||||
#define TARGET_REG52_H
|
||||
|
||||
|
||||
extern unsigned char EA;
|
||||
/* Interrupt enable register. */
|
||||
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,66 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_su_ctrl.h
|
||||
|
||||
Macros, functions, constants and types for controlling Sensor Units.
|
||||
|
||||
This version uses the harness functions for I/O and kernel simulation.
|
||||
|
||||
Based on the SSF DHI file su_ctrl.h, rev 1.28, Tue Sep 14 14:51:26 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TARGET_SU_CTRL_H
|
||||
#define TARGET_SU_CTRL_H
|
||||
|
||||
/* Simulation of counter access */
|
||||
|
||||
extern unsigned char Get_MSB_Counter ( void );
|
||||
extern unsigned char Get_LSB1_Counter ( void );
|
||||
extern unsigned char Get_LSB2_Counter ( void );
|
||||
extern unsigned char Rise_Time_Counter ( void );
|
||||
|
||||
/* Counter access macros */
|
||||
|
||||
#define GET_MSB_COUNTER Get_MSB_Counter ()
|
||||
#define GET_LSB1_COUNTER Get_LSB1_Counter ()
|
||||
#define GET_LSB2_COUNTER Get_LSB2_Counter ()
|
||||
#define RISE_TIME_COUNTER Rise_Time_Counter ()
|
||||
|
||||
#define SET_COUNTER_RESET(LEVEL) {}
|
||||
|
||||
/* Simulation of trigger signal */
|
||||
|
||||
extern unsigned char Trigger_Source_0 ( void );
|
||||
extern unsigned char Trigger_Source_1 ( void );
|
||||
extern unsigned char V_Down ( void );
|
||||
|
||||
/* Macros to access trigger signals */
|
||||
|
||||
#define TRIGGER_SOURCE_0 Trigger_Source_0 ()
|
||||
#define TRIGGER_SOURCE_1 Trigger_Source_1 ()
|
||||
#define V_DOWN V_Down ()
|
||||
|
||||
/* Simulation of SU Self Test functions */
|
||||
|
||||
extern void Set_SU_Self_Test_Ch ( unsigned char value );
|
||||
extern void Set_Test_Pulse_Level ( unsigned char level );
|
||||
|
||||
#define SET_SU_SELF_TEST_CH(value) Set_SU_Self_Test_Ch (value)
|
||||
#define SET_TEST_PULSE_LEVEL(level) Set_Test_Pulse_Level(level)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : target_ttc_ctrl.h
|
||||
|
||||
Macros and function prototypes for handling the Telecommand
|
||||
and Telemetry interface.
|
||||
|
||||
This version uses the harness functions for I/O and kernel simulation.
|
||||
|
||||
Based on the SSF DHI file ttc_ctrl.h, rev 1.11, Sun May 16 09:20:10 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TARGET_TTC_CTRL_H
|
||||
#define TARGET_TTC_CTRL_H
|
||||
|
||||
/* TC/TM interface functions, simulated */
|
||||
|
||||
extern unsigned char Read_TC_MSB ( void );
|
||||
extern unsigned char Read_TC_LSB ( void );
|
||||
extern void Write_TM_LSB ( unsigned char value );
|
||||
extern void Write_TM_MSB ( unsigned char value );
|
||||
|
||||
/* TC and TM register handling */
|
||||
|
||||
#define READ_TC_MSB Read_TC_MSB()
|
||||
#define READ_TC_LSB Read_TC_LSB()
|
||||
|
||||
#define WRITE_TM_LSB(TM_LSB) Write_TM_LSB(TM_LSB)
|
||||
#define WRITE_TM_MSB(TM_MSB) Write_TM_MSB(TM_MSB)
|
||||
|
||||
/* TM Interrupt flag */
|
||||
|
||||
#define CLEAR_TM_INTERRUPT_FLAG {}
|
||||
|
||||
/* TC Interrupt flag*/
|
||||
|
||||
#define CLEAR_TC_INTERRUPT_FLAG {}
|
||||
|
||||
/* TM and TC interrupt controls*/
|
||||
|
||||
#define SET_INT_TYPE1_EDGE {}
|
||||
#define SET_INT_TYPE0_EDGE {}
|
||||
|
||||
/* TC timer controls */
|
||||
|
||||
#define SET_TC_TIMER_MODE {}
|
||||
/* Set TC timer (0) mode : Mode 1, counter operation, SW control */
|
||||
|
||||
#define INIT_TC_TIMER_MSB {}
|
||||
#define INIT_TC_TIMER_LSB {}
|
||||
/* TC timer initialization macros */
|
||||
|
||||
#define START_TC_TIMER {}
|
||||
#define STOP_TC_TIMER {}
|
||||
/* TC timer run control macros */
|
||||
|
||||
#endif
|
||||
2637
targets/wasm-tacle/parallel/DEBIE/code/health.c
Normal file
2637
targets/wasm-tacle/parallel/DEBIE/code/health.c
Normal file
File diff suppressed because it is too large
Load Diff
120
targets/wasm-tacle/parallel/DEBIE/code/health.h
Normal file
120
targets/wasm-tacle/parallel/DEBIE/code/health.h
Normal file
@ -0,0 +1,120 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : health.h
|
||||
|
||||
Prototypes etc. for the Health module.
|
||||
|
||||
Based on the SSF file health.h, revision 1.12, Wed Oct 13 19:50:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef HEALTH_H
|
||||
#define HEALTH_H
|
||||
|
||||
#include "keyword.h"
|
||||
#include "dpu_ctrl.h"
|
||||
#include "su_ctrl.h"
|
||||
|
||||
#define CH_SELECTED 1
|
||||
#define CH_NOT_SELECTED 0
|
||||
|
||||
#define RESULT_OK 1
|
||||
#define CONVERSION_ACTIVE 0
|
||||
#define HIT_OCCURRED 2
|
||||
|
||||
#define CONVERSION_STARTED 1
|
||||
|
||||
#define TEST_OK 1
|
||||
|
||||
#define LOW 0
|
||||
#define HIGH 1
|
||||
|
||||
/* Health monitoring round identification numbering. */
|
||||
|
||||
#define HEALTH_COUNT 9
|
||||
/* Health Monitoring loop count. */
|
||||
|
||||
#define VOLTAGE_COUNT 17
|
||||
/* Voltage Measurement loop count. */
|
||||
|
||||
#define TEMP_COUNT 5
|
||||
/* Temperature measurement loop count. Its value must equal or greater than */
|
||||
/* NUM_SU, because its value defines the SU whos temperatures are to be */
|
||||
/* measured. */
|
||||
|
||||
#define CHECK_COUNT 59
|
||||
/* Checksum loop count. */
|
||||
|
||||
#define MAX_TEMP_1 0xFA
|
||||
#define MAX_TEMP_2 0xF4
|
||||
/* Maximum temperature (0xFA = 90 C and 0xF4 = 85C) for a Sensor Unit. */
|
||||
|
||||
#define CHECK_SIZE 547
|
||||
/* Checksum is counted for code memory 547 bytes per check round. */
|
||||
|
||||
#define CODE_MEMORY_END 0x7FFF
|
||||
/* The last code memory address to be checked in function */
|
||||
/* 'CalculateChecksum'. */
|
||||
/* 'CODE_MEMORY_END' should have a value smaller */
|
||||
/* than 2^16 - 1. Otherwise it will affect a 'for' */
|
||||
/* loop in 'CalculateChecksum' function in a way */
|
||||
/* that makes this loop infinite. */
|
||||
|
||||
#define MAX_CHECKSUM_COUNT 59
|
||||
#define MIN_CHECKSUM_COUNT 0
|
||||
/* Limiting values used in function 'CalculateChecksum'. */
|
||||
|
||||
typedef enum {
|
||||
round_0_e, round_1_e, round_2_e, round_3_e, round_4_e,
|
||||
round_5_e, round_6_e, round_7_e, round_8_e, round_9_e
|
||||
} round_t;
|
||||
|
||||
extern uint_least8_t EXTERNAL health_mon_round;
|
||||
extern uint_least8_t EXTERNAL temp_meas_count;
|
||||
extern uint_least8_t EXTERNAL voltage_meas_count;
|
||||
extern uint_least8_t EXTERNAL checksum_count;
|
||||
extern unsigned char EXTERNAL code_checksum;
|
||||
|
||||
extern EXTERNAL unsigned char confirm_hit_result;
|
||||
extern EXTERNAL dpu_time_t internal_time;
|
||||
|
||||
extern void SetSoftwareError ( unsigned char error )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
extern void ClearSoftwareError ( void );
|
||||
extern void SetModeStatusError ( unsigned char mode_status_error )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
extern void ClearModeStatusError( void );
|
||||
|
||||
extern void SetMode ( DEBIE_mode_t mode )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
extern DEBIE_mode_t GetMode( void );
|
||||
extern void Clear_SU_Error( void );
|
||||
extern void Set_SU_Error( sensor_index_t SU_index, unsigned char SU_error );
|
||||
extern void SetErrorStatus( unsigned char error_source );
|
||||
extern void ClearErrorStatus( void );
|
||||
extern void Clear_RTX_Errors( void );
|
||||
|
||||
|
||||
extern void Boot ( void );
|
||||
|
||||
/* Task functions, for testing: */
|
||||
|
||||
extern void InitHealthMonitoring ( void );
|
||||
extern void HandleHealthMonitoring ( void );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
1048
targets/wasm-tacle/parallel/DEBIE/code/hw_if.c
Normal file
1048
targets/wasm-tacle/parallel/DEBIE/code/hw_if.c
Normal file
File diff suppressed because it is too large
Load Diff
44
targets/wasm-tacle/parallel/DEBIE/code/isr_ctrl.h
Normal file
44
targets/wasm-tacle/parallel/DEBIE/code/isr_ctrl.h
Normal file
@ -0,0 +1,44 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : isr_ctrl.h
|
||||
|
||||
Macros and operations to control and handle interrupts.
|
||||
|
||||
Based on the SSF DHI file isr_ctrl.h, rev 1.16, Sun Jul 25 15:02:08 1999.
|
||||
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ISR_CTRL_H
|
||||
#define ISR_CTRL_H
|
||||
|
||||
#include "target_isr_ctrl.h"
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
extern void AttachInterrupt( unsigned char ISR_VectorNumber );
|
||||
|
||||
extern void EnableInterrupt( unsigned char ISR_VectorNumber );
|
||||
|
||||
extern void DisableInterrupt( unsigned char ISR_VectorNumber );
|
||||
|
||||
extern signed char SetInterruptMask( unsigned char ISR_MaskNumber );
|
||||
|
||||
extern signed char ResetInterruptMask( unsigned char ISR_MaskNumber );
|
||||
|
||||
extern void WaitInterrupt ( unsigned char ISR_VectorNumber,
|
||||
unsigned char timer );
|
||||
|
||||
#endif
|
||||
56
targets/wasm-tacle/parallel/DEBIE/code/kernobj.h
Normal file
56
targets/wasm-tacle/parallel/DEBIE/code/kernobj.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : kernobj.h
|
||||
|
||||
Definitions for the interface to the real-time kernel.
|
||||
|
||||
Based on the SSF file kernobj.h, revision 1.3, Thu Sep 09 16:01:56 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Definitions of kernel objects (eg. task and mailbox numbers) */
|
||||
|
||||
/* Task numbers */
|
||||
|
||||
#ifndef KERNOBJ_H
|
||||
#define KERNOBJ_H
|
||||
|
||||
#define HEALTH_MONITORING_TASK 0
|
||||
#define TC_TM_INTERFACE_TASK 1
|
||||
#define ACQUISITION_TASK 2
|
||||
|
||||
#define HIT_TRIGGER_ISR_TASK 3
|
||||
|
||||
/* Task priorities */
|
||||
|
||||
#define HEALTH_MONITORING_PR 0
|
||||
#define ACQUISITION_PR 1
|
||||
#define TC_TM_INTERFACE_PR 2
|
||||
|
||||
#define HIT_TRIGGER_PR 3
|
||||
|
||||
/* Mailbox numbers */
|
||||
|
||||
#define TCTM_MAILBOX 0
|
||||
#define ACQUISITION_MAILBOX 1
|
||||
|
||||
/* ISR source numbers */
|
||||
|
||||
#define TC_ISR_SOURCE 0
|
||||
#define TM_ISR_SOURCE 2
|
||||
#define HIT_TRIGGER_ISR_SOURCE 5
|
||||
|
||||
#endif
|
||||
|
||||
755
targets/wasm-tacle/parallel/DEBIE/code/measure.c
Normal file
755
targets/wasm-tacle/parallel/DEBIE/code/measure.c
Normal file
@ -0,0 +1,755 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : measure.c
|
||||
|
||||
Event Measurement module.
|
||||
|
||||
Based on the SSF file measure.c, rev 1.51, Wed Oct 13 19:48:50 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "keyword.h"
|
||||
#include "kernobj.h"
|
||||
#include "tm_data.h"
|
||||
#include "isr_ctrl.h"
|
||||
#include "msg_ctrl.h"
|
||||
#include "tc_hand.h"
|
||||
#include "telem.h"
|
||||
#include "ttc_ctrl.h"
|
||||
#include "su_ctrl.h"
|
||||
#include "health.h"
|
||||
#include "ad_conv.h"
|
||||
#include "measure.h"
|
||||
#include "taskctrl.h"
|
||||
#include "class.h"
|
||||
|
||||
sensor_number_t EXTERNAL self_test_SU_number = NO_SU;
|
||||
/* By default this variable indicates that no SU self test */
|
||||
/* sequence is running. */
|
||||
/* Number of SU being self tested (SU_1, SU_2, SU_3 or SU_4) */
|
||||
/* or NO_SU if no SU is being self tested. */
|
||||
|
||||
unsigned char EXTERNAL test_channel;
|
||||
/* Channel being tested in SU Self Test. Valid only if triggering SU */
|
||||
/* (indicated by self_test_SU) is in Self Test state. */
|
||||
|
||||
SU_test_level_t EXTERNAL test_level;
|
||||
/* Test level being used in SU Self Test. */
|
||||
|
||||
SU_state_t EXTERNAL SU_state[ NUM_SU ] = {off_e, off_e, off_e, off_e};
|
||||
|
||||
/*This array contains information about the state of a given Sensor Unit. */
|
||||
/*Default value is 'off'. */
|
||||
|
||||
EXTERNAL unsigned short int ADC_result[ NUM_CH ];
|
||||
/*Used to temporarily store AD conversion results. */
|
||||
|
||||
EXTERNAL unsigned char confirm_hit_result;
|
||||
/*This variable indicates a hit with a high value. */
|
||||
|
||||
uint_least8_t EXTERNAL hit_budget = HIT_BUDGET_DEFAULT;
|
||||
uint_least8_t EXTERNAL hit_budget_left = HIT_BUDGET_DEFAULT;
|
||||
|
||||
#ifdef REG52_DEFINED
|
||||
#pragma REGISTERBANK(1)
|
||||
#endif
|
||||
|
||||
void _Pragma( "entrypoint" ) InitHitTriggerTask ( void )
|
||||
|
||||
/* Purpose : Initialize the global state of Hit Trigger handling */
|
||||
/* Interface : inputs - none */
|
||||
/* outputs - none */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : Calling task attached as Hit Trigger ISR. */
|
||||
/* Hit Trigger interrupt enabled */
|
||||
/* Algorithm : - attach current task as Hit Trigger ISR */
|
||||
/* - enable Hit Trigger interrupt */
|
||||
|
||||
{
|
||||
AttachInterrupt( HIT_TRIGGER_ISR_SOURCE );
|
||||
/*Now 'HitTriggerTask()' will listen for Hit trigger interrupt. */
|
||||
|
||||
ENABLE_HIT_TRIGGER;
|
||||
}
|
||||
|
||||
void _Pragma( "entrypoint" ) HandleHitTrigger ( void )
|
||||
|
||||
/* Purpose : Wait for and handle one Hit Trigger interrupt */
|
||||
/* Interface : inputs - Five analog outputs from Peak Detectors */
|
||||
/* outputs - Acquisition task mailbox */
|
||||
/* - Sampled ADC_result */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : Message holding the number of triggering Sensor Unit is */
|
||||
/* sent to Aqcuisition task. */
|
||||
/* Algorithm : - wait for Hit Trigger interrupt */
|
||||
/* - Read Peak Detector outputs from hardware registers. */
|
||||
/* - Sample and store these into a buffer. */
|
||||
/* - Send number of triggering Sensor Unit to Aqcuisition */
|
||||
/* task mailbox. */
|
||||
|
||||
{
|
||||
unsigned char EXTERNAL initial_delay;
|
||||
/* Delay before the first AD channel is selected in */
|
||||
/* ShortDelay() units. */
|
||||
|
||||
unsigned char EXTERNAL delay_limit;
|
||||
/* Delay between channel selection and start of conversion in */
|
||||
/* ShortDelay() units. */
|
||||
|
||||
INDIRECT_INTERNAL sensor_number_t trigger;
|
||||
/*Used to store Sensor Unit number, which has beem hit. */
|
||||
|
||||
INDIRECT_INTERNAL channel_t CH_base;
|
||||
/* First ADC channel number for the relevant Sensor Unit. */
|
||||
|
||||
DIRECT_INTERNAL uint_least8_t i;
|
||||
/* Used in a for -loop, which reads the peak sensor outputs. */
|
||||
|
||||
DIRECT_INTERNAL unsigned char lsb, msb;
|
||||
/*These variables are used to combine two bytes into one word. */
|
||||
|
||||
DIRECT_INTERNAL uint_least8_t conversion_try_count;
|
||||
/*This variable stores the number of failed conversion starts. */
|
||||
|
||||
initial_delay = ( uint_least8_t ) ( DELAY_LIMIT( 100 ) );
|
||||
/* Initial delay before converting first channel. */
|
||||
|
||||
delay_limit = ( uint_least8_t ) ( DELAY_LIMIT( 100 ) );
|
||||
/* The signal settling delay is 100 microseconds. */
|
||||
|
||||
WaitInterrupt ( HIT_TRIGGER_ISR_SOURCE, 255 );
|
||||
/* Interrupt arrival is awaited. */
|
||||
/* Execution result is not handled. */
|
||||
|
||||
CLEAR_HIT_TRIGGER_ISR_FLAG;
|
||||
/* Acknowledge the interrupt. */
|
||||
/* This bit must be cleared by software. */
|
||||
|
||||
if ( hit_budget_left == 0 ) {
|
||||
/* Too many hit triggers during one Health Monitoring period. */
|
||||
|
||||
if ( telemetry_data.hit_budget_exceedings < 255 )
|
||||
telemetry_data.hit_budget_exceedings++;
|
||||
|
||||
DISABLE_HIT_TRIGGER;
|
||||
/* No more hit triggers will be handled before next Health */
|
||||
/* Monitoring period starts (or DEBIE is reset). */
|
||||
} else {
|
||||
/* Some hit budget left; this hit will be handled. */
|
||||
|
||||
hit_budget_left--;
|
||||
|
||||
confirm_hit_result = 1;
|
||||
/*This variable indicates a hit with a high value. */
|
||||
|
||||
ADC_channel_register &= BP_DOWN;
|
||||
UPDATE_ADC_CHANNEL_REG;
|
||||
/*AD converter is set to unipolar mode */
|
||||
|
||||
START_CONVERSION;
|
||||
/*Dummy cycle to set unipolar mode. */
|
||||
|
||||
conversion_try_count = 0;
|
||||
|
||||
_Pragma( "loopbound min 0 max 25" )
|
||||
while ( conversion_try_count < ADC_MAX_TRIES
|
||||
&& END_OF_ADC != CONVERSION_ACTIVE ) {
|
||||
conversion_try_count++;
|
||||
/*Conversion try counter is increased. If this counter exeeds the*/
|
||||
/*maximum number of conversion start tries the conversion will be*/
|
||||
/*dropped. */
|
||||
}
|
||||
|
||||
if ( self_test_SU_number != NO_SU ) {
|
||||
/* Some Sensor Unit is being Self Tested. */
|
||||
trigger = self_test_SU_number;
|
||||
|
||||
if ( SU_state[ self_test_SU_number - SU1 ] == self_test_e ) {
|
||||
/* Some Sensor Unit is being Self Tested but this is */
|
||||
/* not the right self test pulse. */
|
||||
|
||||
trigger |= HIT_SELF_TEST_RESET ;
|
||||
/* Self test pulse is incorrect and an indication */
|
||||
/* of this is stored in to 'trigger' variable. */
|
||||
/* The AcquisitionTask will adjust its operation */
|
||||
/* based on this indication result. */
|
||||
}
|
||||
|
||||
else
|
||||
if ( SU_state[ self_test_SU_number - SU1 ] == self_test_trigger_e ) {
|
||||
/* Some Sensor Unit is being Self Tested and this is the correct. */
|
||||
/* self test pulse. */
|
||||
|
||||
SU_state[ self_test_SU_number - SU1 ] = self_test_e;
|
||||
/* Indication of a succesfully received self test pulse */
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
/* There is no Sensor Unit Self Test in progress. */
|
||||
|
||||
trigger = ( ( int )TRIGGER_SOURCE_0
|
||||
+ 2
|
||||
* ( int )TRIGGER_SOURCE_1 )
|
||||
+ SU1;
|
||||
/* Sensor Unit which caused the hit trigger is resolved. */
|
||||
}
|
||||
|
||||
CH_base =
|
||||
( ( int )( trigger - SU_1 ) & 2 ) * 12 + ( ( int )( trigger - SU_1 ) & 1 ) * 8;
|
||||
/* First channel address for the given SU is calculated. */
|
||||
|
||||
ShortDelay( initial_delay );
|
||||
/* Delay before converting first channel. */
|
||||
|
||||
ADC_channel_register =
|
||||
( ADC_channel_register & 0xC0 ) | CH_base;
|
||||
UPDATE_ADC_CHANNEL_REG;
|
||||
/* First channel is selected. */
|
||||
|
||||
ShortDelay( delay_limit );
|
||||
/* Delay of 100 microseconds (+ function call overhead). */
|
||||
|
||||
|
||||
_Pragma( "loopbound min 5 max 5" )
|
||||
for ( i = 0; i < NUM_CH; i++ ) {
|
||||
|
||||
ShortDelay( delay_limit );
|
||||
/* Delay of 100 microseconds (+ function call overhead). */
|
||||
|
||||
START_CONVERSION;
|
||||
/* AD conversion for the selected channel is started. */
|
||||
|
||||
ADC_channel_register =
|
||||
( ADC_channel_register & 0xC0 ) | ( CH_base + i + 1 );
|
||||
UPDATE_ADC_CHANNEL_REG;
|
||||
/* Next channel is selected. */
|
||||
|
||||
conversion_try_count = 0;
|
||||
|
||||
_Pragma( "loopbound min 0 max 25" )
|
||||
while ( conversion_try_count < ADC_MAX_TRIES
|
||||
&& END_OF_ADC != CONVERSION_ACTIVE ) {
|
||||
conversion_try_count++;
|
||||
/*Conversion try counter is increased. If this counter exeeds */
|
||||
/*the maximum number of conversion start tries the conversion */
|
||||
/*will be dropped. */
|
||||
}
|
||||
|
||||
if ( conversion_try_count < ADC_MAX_TRIES ) {
|
||||
msb = GET_RESULT;
|
||||
/*Most significant byte is read from ADC result address. */
|
||||
|
||||
lsb = GET_RESULT;
|
||||
/*Least significant byte is read from ADC result address. */
|
||||
|
||||
ADC_result[ i ] =
|
||||
( ( unsigned int )msb << 8 ) | ( unsigned int )lsb;
|
||||
/*Msb and lsb are combined into one word. */
|
||||
}
|
||||
|
||||
else {
|
||||
trigger |= HIT_ADC_ERROR;
|
||||
/*Conversion has failed and an indication of this is stored in*/
|
||||
/*to 'trigger' variable by setting the Most Significant Bit */
|
||||
/*(MSB) high. The AcquisitionTask will adjust its operation */
|
||||
/*based on this indication result. */
|
||||
|
||||
ADC_result[ i ] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SendTaskMail( ACQUISITION_MAILBOX, trigger, 0 );
|
||||
/*The number of the Sensor unit that has caused the hit trigger */
|
||||
/*interrupt is sent to a mailbox for the acquisition task. */
|
||||
|
||||
} /* end if (hit budget left) */
|
||||
|
||||
}
|
||||
|
||||
void HitTriggerTask( void ) TASK( HIT_TRIGGER_ISR_TASK ) PRIORITY(
|
||||
HIT_TRIGGER_PR )
|
||||
|
||||
/* Purpose : Handles the Hit Trigger interrupts */
|
||||
/* Interface : inputs - Five analog outputs from Peak Detectors */
|
||||
/* outputs - Acquisition task mailbox */
|
||||
/* - Sampled ADC_result */
|
||||
/* Preconditions : Aqcuisition enabled */
|
||||
/* Postconditions : Message holding the number of triggering Sensor Unit is */
|
||||
/* sent to Aqcuisition task. */
|
||||
/* Algorithm : - InitHitTriggerTask */
|
||||
/* - loop forever: */
|
||||
/* - HandleHitTrigger */
|
||||
|
||||
{
|
||||
InitHitTriggerTask ();
|
||||
|
||||
_Pragma( "loopbound min 0 max 0" )
|
||||
while ( 1 )
|
||||
HandleHitTrigger ();
|
||||
}
|
||||
|
||||
|
||||
#ifdef REG52_DEFINED
|
||||
#pragma REGISTERBANK(0)
|
||||
#endif
|
||||
|
||||
|
||||
static EXTERNAL incoming_mail_t ACQ_mail;
|
||||
/* Holds parameters for the mail waiting function. */
|
||||
/* Must be in xdata memory because parameter of subroutine is pointer */
|
||||
/* to xdata area. */
|
||||
|
||||
static EXTERNAL uint16_t trigger_unit;
|
||||
/* Number of the triggering Sensor Unit. */
|
||||
|
||||
|
||||
void _Pragma( "entrypoint" ) InitAcquisitionTask ( void )
|
||||
/* Purpose : Initialize the global state of the Acquisition task. */
|
||||
/* Interface : inputs - none */
|
||||
/* outputs - ACQ_mail static fields. */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : AcqusitionTask is operational. */
|
||||
/* Algorithm : - initialize task variables */
|
||||
{
|
||||
/* ACQ_mail struct fields are set. */
|
||||
ACQ_mail.mailbox_number = ACQUISITION_MAILBOX;
|
||||
ACQ_mail.message = &trigger_unit;
|
||||
ACQ_mail.timeout = 0;
|
||||
}
|
||||
|
||||
|
||||
void _Pragma( "entrypoint" ) HandleAcquisition ( void )
|
||||
|
||||
/* Purpose : Acquires the data for one hit event. */
|
||||
/* Interface : inputs - Acquisition task mailbox */
|
||||
/* - Mail from Hit Trigger interrupt service */
|
||||
/* - Buffer with sampled Peak detector outputs */
|
||||
/* - Housekeeping Telemetry registers */
|
||||
/* outputs - Science data */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : one message processed from Acquisition task mailbox */
|
||||
/* Algorithm : - wait for mail to Acquisition task mailbox */
|
||||
/* - if mail is "SU_NUMBER" */
|
||||
/* - get Peak Detector Outputs sampled by the interrupt */
|
||||
/* service */
|
||||
/* - measure Pulse Rise Time */
|
||||
/* - measure delays between trigger signals */
|
||||
/* - get measurement time */
|
||||
/* - get sensor unit temperatures from Housekeeping */
|
||||
/* Telemetry registers */
|
||||
/* - calculate time difference between Plasma1- and */
|
||||
/* Plasma1+ trigger signals */
|
||||
/* - calculate quality number */
|
||||
/* - call RecordEvent() */
|
||||
|
||||
{
|
||||
EXTERNAL unsigned char *EXTERNAL checksum_pointer;
|
||||
unsigned char EXTERNAL event_checksum;
|
||||
uint_least8_t EXTERNAL i;
|
||||
/* These variables are used when checksum is computed for a given event */
|
||||
/* before storing it to Science data area. */
|
||||
|
||||
event_record_t EXTERNAL *event;
|
||||
/* Pointer to the new event record. */
|
||||
|
||||
EXTERNAL delays_t delay_counters;
|
||||
/*This is a struct which stores the Delay Counter time data. */
|
||||
|
||||
DIRECT_INTERNAL signed int time_delay;
|
||||
/*This variable is used to store the delay from plasma 1+ to plasma 1-. */
|
||||
|
||||
SU_state_t EXTERNAL state = off_e;
|
||||
/* Used to store sensor unit state. */
|
||||
|
||||
WaitMail( &ACQ_mail );
|
||||
|
||||
if ( trigger_unit & HIT_ADC_ERROR ) {
|
||||
/* There has been an error in AD conversion */
|
||||
/* in Hit trigger processing. */
|
||||
SetModeStatusError( ADC_ERROR );
|
||||
}
|
||||
|
||||
if ( trigger_unit == SU_1 || trigger_unit == SU_2 ||
|
||||
trigger_unit == SU_3 || trigger_unit == SU_4 )
|
||||
|
||||
{
|
||||
state = SU_state[ trigger_unit - SU_1 ];
|
||||
|
||||
if ( ( state == self_test_e || state == acquisition_e )
|
||||
&& ( EVENT_FLAG == ACCEPT_EVENT ) ) {
|
||||
event = GetFreeRecord();
|
||||
/* Get pointer to the new event record. */
|
||||
|
||||
|
||||
/*Number of the Sensor Unit, which has been hit, is stored into */
|
||||
/*Event Record. */
|
||||
event -> SU_number = ( unsigned char )( trigger_unit & 0xFF );
|
||||
|
||||
/*Contents of a temporary buffer is stored into Event Record. */
|
||||
COPY ( event -> plasma_1_plus, ADC_result[ 0 ] );
|
||||
COPY ( event -> plasma_1_minus, ADC_result[ 1 ] );
|
||||
COPY ( event -> piezo_1, ADC_result[ 2 ] );
|
||||
COPY ( event -> piezo_2, ADC_result[ 3 ] );
|
||||
COPY ( event -> plasma_2_plus, ADC_result[ 4 ] );
|
||||
|
||||
/*Rise time counter is read in to Event Record. */
|
||||
event -> rise_time = ReadRiseTimeCounter();
|
||||
|
||||
/*Delay counters are read in to a struct. */
|
||||
ReadDelayCounters( &delay_counters );
|
||||
|
||||
/*Delay from plasma 1+ to PZT 1/2 is stored into Event Record. */
|
||||
COPY ( event -> delay_2, delay_counters.FromPlasma1Plus );
|
||||
|
||||
/*Delay from plasma 1- to PZT 1/2 is stored into Event Record. */
|
||||
COPY ( event -> delay_3, delay_counters.FromPlasma1Minus );
|
||||
|
||||
/*Delay from plasma 1+ to plasma 1- is calculated and stored into*/
|
||||
/*Event Record. */
|
||||
|
||||
time_delay = delay_counters.FromPlasma1Plus
|
||||
- delay_counters.FromPlasma1Minus;
|
||||
if ( time_delay > 127 ) {
|
||||
event -> delay_1 = 127;
|
||||
/*If the delay from plasma 1+ to plasma 1- is positive and */
|
||||
/*doesn't fit into signed char 'event_record.delay_1', then */
|
||||
/*the largest value for the signed char is stored instead. */
|
||||
}
|
||||
|
||||
else
|
||||
if ( time_delay < -128 ) {
|
||||
event -> delay_1 = -128;
|
||||
/*If the delay from plasma 1+ to plasma 1- is negative and */
|
||||
/*doesn't fit into signed char 'event_record.delay_1', then */
|
||||
/*the smallest value for the signed char is stored instead. */
|
||||
}
|
||||
|
||||
else {
|
||||
event -> delay_1 = time_delay;
|
||||
/*Delay from plasma 1+ to plasma 1- is calculated and stored */
|
||||
/*into Event Record. */
|
||||
}
|
||||
|
||||
/*Measurement time is stored into Event Record. */
|
||||
COPY ( event -> hit_time, internal_time );
|
||||
|
||||
/*Unit temperatures are stored into Event Record. */
|
||||
|
||||
event -> SU_temperature_1 =
|
||||
telemetry_data.SU_temperature[ trigger_unit - SU1 ][ 0 ];
|
||||
|
||||
event -> SU_temperature_2 =
|
||||
telemetry_data.SU_temperature[ trigger_unit - SU1 ][ 1 ];
|
||||
|
||||
ClassifyEvent( event );
|
||||
/* New event is classified. */
|
||||
|
||||
checksum_pointer = ( EXTERNAL unsigned char * )event;
|
||||
event_checksum = 0;
|
||||
|
||||
_Pragma( "loopbound min 27 max 27" )
|
||||
for ( i = 1; i < sizeof( event_record_t ); i++ ) {
|
||||
event_checksum ^= *checksum_pointer;
|
||||
checksum_pointer++;
|
||||
}
|
||||
|
||||
event -> checksum = event_checksum;
|
||||
|
||||
/* After the event record is filled up, it is stored into science*/
|
||||
/* data. */
|
||||
RecordEvent();
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
/*The received mail contained an invalid Sensor unit number. */
|
||||
}
|
||||
|
||||
trigger_unit &= SU_NUMBER_MASK;
|
||||
/* Delete possible error bits. */
|
||||
|
||||
WaitTimeout( PEAK_RESET_MIN_DELAY );
|
||||
|
||||
ResetPeakDetector( trigger_unit );
|
||||
/*Peak detector for this Sensor Unit is resetted. */
|
||||
|
||||
WaitTimeout( PEAK_RESET_MIN_DELAY );
|
||||
|
||||
ResetPeakDetector( trigger_unit );
|
||||
/*Peak detector for this Sensor Unit is resetted again. */
|
||||
|
||||
WaitTimeout( COUNTER_RESET_MIN_DELAY );
|
||||
|
||||
ResetDelayCounters();
|
||||
/*The Delay Counters are resetted. */
|
||||
}
|
||||
|
||||
|
||||
void AcquisitionTask( void ) TASK( ACQUISITION_TASK ) PRIORITY( ACQUISITION_PR )
|
||||
/* Purpose : Implements the Acquisition task. */
|
||||
/* Interface : inputs - Acquisition task mailbox */
|
||||
/* - Mail from Hit Trigger interrupt service */
|
||||
/* - Buffer with sampled Peak detector outputs */
|
||||
/* - Housekeeping Telemetry registers */
|
||||
/* outputs - Science data */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : This function does not return. */
|
||||
/* Algorithm : - InitAcquisitionTask */
|
||||
/* - loop forever: */
|
||||
/* - HandleAcquisition */
|
||||
{
|
||||
InitAcquisitionTask ();
|
||||
|
||||
_Pragma( "loopbound min 0 max 0" )
|
||||
while ( 1 )
|
||||
HandleAcquisition ();
|
||||
}
|
||||
|
||||
|
||||
/*Assign pointers to tasks*/
|
||||
void ( * EXTERNAL hit_task )( void ) = HitTriggerTask;
|
||||
void ( * EXTERNAL acq_task )( void ) = AcquisitionTask;
|
||||
|
||||
void Switch_SU_State( sensor_unit_t EXTERNAL *SU_setting )
|
||||
COMPACT_DATA REENTRANT_FUNC
|
||||
/* Purpose : Used when only the SU_state variable must be modified. */
|
||||
/* Interface : inputs - SU_state */
|
||||
/* - An Address of 'sensor_unit_t' type of a */
|
||||
/* struct. */
|
||||
/* outputs - SU_state */
|
||||
/* - SU_setting.execution_result */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : SU_state variable is conditionally modified. */
|
||||
/* Algorithm : */
|
||||
/* - If the expected SU_state variable value related to the */
|
||||
/* given SU_index number is not valid, variable value is */
|
||||
/* not changed. Error indication is recorded instead. */
|
||||
/* - Else state variable value is changed and an indication */
|
||||
/* of this is recorded. */
|
||||
{
|
||||
if ( SU_state[ ( SU_setting -> SU_number ) - SU_1 ] !=
|
||||
SU_setting -> expected_source_state )
|
||||
{
|
||||
/* The original SU state is wrong. */
|
||||
|
||||
SU_setting -> execution_result = SU_STATE_TRANSITION_FAILED;
|
||||
}
|
||||
|
||||
else
|
||||
if ( SU_setting -> SU_state == self_test_mon_e &&
|
||||
self_test_SU_number != NO_SU )
|
||||
{
|
||||
/* There is a self test sequence running already */
|
||||
|
||||
SU_setting -> execution_result = SU_STATE_TRANSITION_FAILED;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/* The original SU state is correct. */
|
||||
|
||||
if ( SU_setting -> SU_state == self_test_mon_e ) {
|
||||
self_test_SU_number = SU_setting -> SU_number;
|
||||
/* Number of the SU under self test is recorded. */
|
||||
}
|
||||
|
||||
else
|
||||
if ( SU_setting -> SU_number == self_test_SU_number ) {
|
||||
self_test_SU_number = NO_SU;
|
||||
/* Reset self test state i.e. no self test is running. */
|
||||
}
|
||||
|
||||
SU_state[ ( SU_setting -> SU_number ) - SU_1 ] = SU_setting -> SU_state;
|
||||
SU_setting->execution_result = SU_STATE_TRANSITION_OK;
|
||||
}
|
||||
}
|
||||
|
||||
void Start_SU_SwitchingOn(
|
||||
sensor_index_t SU,
|
||||
unsigned char EXTERNAL *exec_result ) COMPACT_DATA REENTRANT_FUNC
|
||||
/* Purpose : Transition to SU state on. */
|
||||
/* Interface : inputs - Sensor_index number */
|
||||
/* - An Address of 'exec_result' variable */
|
||||
/* - SU_state */
|
||||
/* outputs - SU_state */
|
||||
/* - 'exec_result' */
|
||||
/* subroutines - Switch_SU_On */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : Under valid conditions transition to 'on' state is */
|
||||
/* completed. */
|
||||
/* Algorithm : */
|
||||
/* - If the original SU_state variable value related to the */
|
||||
/* given SU_index number is not valid, variable value is */
|
||||
/* not changed. Error indication is recorded instead. */
|
||||
/* - Else */
|
||||
/* - Disable interrups */
|
||||
/* - 'Switch_SU_On' function is called and an */
|
||||
/* indication of this transition is recorded. */
|
||||
/* - Enable interrupts */
|
||||
{
|
||||
*exec_result = SU_STATE_TRANSITION_OK;
|
||||
/* Default value, may be changed below. */
|
||||
|
||||
if ( SU_state[ SU ] != off_e )
|
||||
{
|
||||
/* The original SU state is wrong. */
|
||||
|
||||
*exec_result = SU_STATE_TRANSITION_FAILED;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* The original SU state is correct. */
|
||||
|
||||
DISABLE_INTERRUPT_MASTER;
|
||||
|
||||
/* SU state is still off_e, because there is only one task */
|
||||
/* which can switch SU state from off_e to any other state. */
|
||||
|
||||
Switch_SU_On(
|
||||
SU + SU_1,
|
||||
exec_result );
|
||||
|
||||
if ( *exec_result == SU + SU_1 ) {
|
||||
/* Transition succeeds. */
|
||||
|
||||
SU_state[ SU ] = start_switching_e;
|
||||
}
|
||||
|
||||
else {
|
||||
/* Transition fails. */
|
||||
|
||||
*exec_result = SU_STATE_TRANSITION_FAILED;
|
||||
}
|
||||
|
||||
ENABLE_INTERRUPT_MASTER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SetSensorUnitOff(
|
||||
sensor_index_t SU,
|
||||
unsigned char EXTERNAL *exec_result ) COMPACT_DATA REENTRANT_FUNC
|
||||
/* Purpose : Transition to SU state off. */
|
||||
/* Interface : inputs - Sensor_index number */
|
||||
/* - An Address of 'exec_result' variable */
|
||||
/* - SU_state */
|
||||
/* outputs - SU_state */
|
||||
/* - 'exec_result' */
|
||||
/* subroutines - Switch_SU_Off */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : Under valid conditions transition to 'off' state is */
|
||||
/* completed. */
|
||||
/* Algorithm : */
|
||||
/* - Disable interrups */
|
||||
/* - 'Switch_SU_Off' function is called. */
|
||||
/* - If transition succeeds, */
|
||||
/* - 'Off' state is recorded to 'SU_state' variable. */
|
||||
/* - Indication of transition is recorded to */
|
||||
/* 'exec_result'. */
|
||||
/* - Else if transition fails, */
|
||||
/* - Indication of this is recorded to 'exec_result'. */
|
||||
/* - Enable interrupts */
|
||||
{
|
||||
static sensor_unit_t EXTERNAL SU_setting;
|
||||
/* Holds parameters for "Switch_SU_State" operation */
|
||||
/* Must be in external memory, because the parameter to the function */
|
||||
/* is pointer to external memory */
|
||||
|
||||
DISABLE_INTERRUPT_MASTER;
|
||||
|
||||
Switch_SU_Off(
|
||||
SU + SU_1,
|
||||
exec_result );
|
||||
|
||||
if ( *exec_result == SU + SU_1 )
|
||||
{
|
||||
/* Transition succeeds. */
|
||||
|
||||
SU_setting.SU_number = SU + SU_1;
|
||||
SU_setting.expected_source_state = SU_state[ SU ];
|
||||
SU_setting.SU_state = off_e;
|
||||
Switch_SU_State ( &SU_setting );
|
||||
*exec_result = SU_STATE_TRANSITION_OK;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Transition fails. */
|
||||
|
||||
*exec_result = SU_STATE_TRANSITION_FAILED;
|
||||
}
|
||||
|
||||
ENABLE_INTERRUPT_MASTER;
|
||||
}
|
||||
|
||||
SU_state_t ReadSensorUnit( unsigned char SU_number ) COMPACT_DATA
|
||||
REENTRANT_FUNC
|
||||
/* Purpose : To find out whether given Sensor Unit is switched on or */
|
||||
/* off. */
|
||||
/* Interface : */
|
||||
/* Preconditions : SU_Number should be 1,2,3 or 4. */
|
||||
/* Postconditions : Value of state variable is returned. */
|
||||
/* Algorithm : Value of state variable (on_e or off_e) is returned. */
|
||||
{
|
||||
return SU_state[ SU_number - 1 ];
|
||||
}
|
||||
|
||||
|
||||
void Update_SU_State( sensor_index_t SU_index ) COMPACT_DATA REENTRANT_FUNC
|
||||
/* Purpose : Sensor unit state is updated. */
|
||||
/* Interface : inputs - SU_state */
|
||||
/* - SU_index number */
|
||||
/* outputs - SU_state */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none */
|
||||
/* Postconditions : SU_state variable is modified. */
|
||||
/* Algorithm : - Disable interrups */
|
||||
/* - Change SU_state variable value related to the given */
|
||||
/* SU_index number. Selection of the new state depends on */
|
||||
/* the present one. */
|
||||
/* - Enable interrups */
|
||||
{
|
||||
DISABLE_INTERRUPT_MASTER;
|
||||
|
||||
if ( SU_state[ SU_index ] == start_switching_e )
|
||||
SU_state[ SU_index ] = switching_e;
|
||||
|
||||
else
|
||||
if ( SU_state[ SU_index ] == switching_e )
|
||||
{
|
||||
ResetPeakDetector( SU_index + SU_1 );
|
||||
/*Peak detector for this Sensor Unit is resetted. */
|
||||
|
||||
WaitTimeout( PEAK_RESET_MIN_DELAY );
|
||||
|
||||
ResetPeakDetector( SU_index + SU_1 );
|
||||
/*Peak detector for this Sensor Unit is resetted again. */
|
||||
|
||||
SU_state[ SU_index ] = on_e;
|
||||
}
|
||||
|
||||
ENABLE_INTERRUPT_MASTER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
132
targets/wasm-tacle/parallel/DEBIE/code/measure.h
Normal file
132
targets/wasm-tacle/parallel/DEBIE/code/measure.h
Normal file
@ -0,0 +1,132 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : measure.h
|
||||
|
||||
Prototypes etc. for the Measure module.
|
||||
|
||||
Based on the SSF file measure.h, rev 1.14, Mon Aug 16 17:29:40 1999 .
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MEASURE_H
|
||||
#define MEASURE_H
|
||||
|
||||
|
||||
#include "keyword.h"
|
||||
#include "kernobj.h"
|
||||
#include "su_ctrl.h"
|
||||
|
||||
/*Maximum number of conversion start tries allowed in the HitTriggerTask*/
|
||||
#define ADC_MAX_TRIES 25
|
||||
|
||||
#define HIT_BUDGET_DEFAULT 20
|
||||
/* Default limit for the events handled during one Health Monitoring */
|
||||
/* period. Valid values 1 .. 255. */
|
||||
|
||||
#define PEAK_RESET_MIN_DELAY 1
|
||||
/* Peak detector reset min delay: 1 * 10ms. */
|
||||
|
||||
#define COUNTER_RESET_MIN_DELAY 1
|
||||
/* Delay counter reset min delay: 1 * 10 ms. */
|
||||
/* NOTE that specifications would allow delay */
|
||||
/* of 1ms, but minimum delay that is possible */
|
||||
/* to be generated with RTX is one tick = 10ms */
|
||||
|
||||
#define SELF_TEST_DELAY 4
|
||||
/* This delay equals the length of 4 system cycles. */
|
||||
|
||||
/*Sensor Unit numbers*/
|
||||
#define SU1 1
|
||||
#define SU2 2
|
||||
#define SU3 3
|
||||
#define SU4 4
|
||||
|
||||
#define HIT_ADC_ERROR 0x80
|
||||
#define HIT_SELF_TEST_RESET 0x40
|
||||
#define SU_NUMBER_MASK 0x07
|
||||
|
||||
/*type definitions*/
|
||||
typedef enum {
|
||||
off_e, /* SU off state - power is Off. */
|
||||
start_switching_e, /* Transition to On state is starting. */
|
||||
switching_e, /* Transition to On state is started. */
|
||||
on_e, /* SU on state - power is On. */
|
||||
self_test_mon_e, /* Selt Test, Voltage and Temperature monitoring */
|
||||
self_test_e, /* Selt Test, test pulse setup. */
|
||||
self_test_trigger_e, /* Self test, test pulse handling */
|
||||
acquisition_e /* Power is On and Hit Events are accepted. */
|
||||
|
||||
} SU_state_t;
|
||||
/* From these only off_e, on_e and self_test_e are actual SU states */
|
||||
/* defined in the User Requirements. Those and 'acquisition_e' are */
|
||||
/* the main states between which the SU state transitions are made. */
|
||||
|
||||
typedef struct {
|
||||
sensor_number_t SU_number; /* Sensor Unit number */
|
||||
SU_state_t SU_state; /* Sensor unit states can be either On */
|
||||
/* or Off. */
|
||||
SU_state_t expected_source_state; /* Excpected source state of the SU */
|
||||
/* state transition. */
|
||||
unsigned char execution_result; /* This variable is used to indicate */
|
||||
/* execution results. */
|
||||
|
||||
} sensor_unit_t;
|
||||
|
||||
extern SU_state_t EXTERNAL SU_state[ 4 ];
|
||||
|
||||
extern sensor_number_t EXTERNAL self_test_SU_number;
|
||||
|
||||
typedef enum {high_e, low_e} SU_test_level_t;
|
||||
|
||||
extern uint_least8_t EXTERNAL hit_budget;
|
||||
extern uint_least8_t EXTERNAL hit_budget_left;
|
||||
|
||||
|
||||
/*function prototypes*/
|
||||
extern void Switch_SU_State( sensor_unit_t EXTERNAL *SU_setting )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
|
||||
extern void Start_SU_SwitchingOn(
|
||||
sensor_index_t SU,
|
||||
unsigned char EXTERNAL *exec_result )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
|
||||
extern void SetSensorUnitOff(
|
||||
sensor_index_t SU,
|
||||
unsigned char EXTERNAL *exec_result )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
|
||||
extern SU_state_t ReadSensorUnit( unsigned char SU_number )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
|
||||
extern void Update_SU_State( sensor_index_t SU_index )
|
||||
COMPACT_DATA REENTRANT_FUNC;
|
||||
|
||||
/*pointers to tasks*/
|
||||
|
||||
extern void ( * EXTERNAL hit_task )( void );
|
||||
extern void ( * EXTERNAL acq_task )( void );
|
||||
|
||||
/* Task functions, for testing: */
|
||||
|
||||
extern void InitHitTriggerTask ( void );
|
||||
extern void HandleHitTrigger ( void );
|
||||
extern void InitAcquisitionTask ( void );
|
||||
extern void HandleAcquisition ( void );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
61
targets/wasm-tacle/parallel/DEBIE/code/msg_ctrl.h
Normal file
61
targets/wasm-tacle/parallel/DEBIE/code/msg_ctrl.h
Normal file
@ -0,0 +1,61 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : msg_ctrl.h
|
||||
|
||||
Macros and operations for sending messages between tasks and
|
||||
from interrupt handlers to tasks.
|
||||
|
||||
Based on the SSF DHI file msg_ctrl.h, rev 1.11, Mon May 17 22:50:44 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MSG_CTRL_H
|
||||
#define MSR_CTRL_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
|
||||
#define MSG_RECEIVED 1
|
||||
/* The value of execution_result in incoming_mail_t that */
|
||||
/* signifies that a mail message has been received. */
|
||||
/* Must be different from NOT_OK as defined in RTX51.h. */
|
||||
|
||||
#define TIMEOUT_OCCURRED 4
|
||||
/* The value of execution_result in incoming_mail_t that */
|
||||
/* signifies that the wait for mail has timed out. */
|
||||
/* Must be different from NOT_OK as defined in RTX51.h. */
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char mailbox_number;
|
||||
unsigned char timeout;
|
||||
uint16_t EXTERNAL *message;
|
||||
signed char execution_result; /* This variable is used to indicate */
|
||||
/* execution results. */
|
||||
|
||||
signed char wait_result; /* Result from a RTX operation. */
|
||||
|
||||
unsigned char event_selector; /* The value of this variable defines the */
|
||||
/* execution of the wait-task. */
|
||||
} incoming_mail_t ;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
extern void WaitMail( incoming_mail_t EXTERNAL *message )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
#endif
|
||||
|
||||
30
targets/wasm-tacle/parallel/DEBIE/code/reg52.h
Normal file
30
targets/wasm-tacle/parallel/DEBIE/code/reg52.h
Normal file
@ -0,0 +1,30 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : reg52.h
|
||||
|
||||
Definitions for 80C32 Special Function Registers to be used
|
||||
in portable parts of the DEBIE DPU software.
|
||||
|
||||
Created for the DEBIE-I WCET benchmark program. Not based directly
|
||||
on any SSF sources.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef REG52_H
|
||||
#define REG52_H
|
||||
|
||||
#include "target_reg52.h"
|
||||
|
||||
#endif
|
||||
222
targets/wasm-tacle/parallel/DEBIE/code/su_ctrl.h
Normal file
222
targets/wasm-tacle/parallel/DEBIE/code/su_ctrl.h
Normal file
@ -0,0 +1,222 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : su_ctrl.h
|
||||
|
||||
Macros, functions, constants and types for controlling Sensor Units.
|
||||
|
||||
Based on the SSF DHI file su_ctrl.h, rev 1.28, Tue Sep 14 14:51:26 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SU_CTRL_H
|
||||
#define SU_CTRL_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
/* Sensor Channels */
|
||||
|
||||
#define NUM_CH 5
|
||||
/* Number of recorded measurement channels per sensor unit. */
|
||||
/* The PZT_1_2 channel is not recorded, as such. */
|
||||
|
||||
#define PLASMA_1_PLUS 0
|
||||
#define PLASMA_1_MINUS 1
|
||||
#define PZT_1 2
|
||||
#define PZT_2 3
|
||||
#define PLASMA_2_PLUS 4
|
||||
#define PZT_1_2 5
|
||||
|
||||
|
||||
#define SU_1 1
|
||||
#define SU_2 2
|
||||
#define SU_3 3
|
||||
#define SU_4 4
|
||||
|
||||
#define SU_1_ON 1
|
||||
#define SU_2_ON 2
|
||||
#define SU_3_ON 3
|
||||
#define SU_4_ON 4
|
||||
|
||||
#define SU_1_OFF 1
|
||||
#define SU_2_OFF 2
|
||||
#define SU_3_OFF 3
|
||||
#define SU_4_OFF 4
|
||||
|
||||
#define LOW_PLASMA_SELF_TEST_THRESHOLD 0x15
|
||||
#define LOW_PIEZO_SELF_TEST_THRESHOLD 0x0D
|
||||
#define HIGH_PLASMA_1_PLUS_SELF_TEST_THRESHOLD 0xAB
|
||||
#define HIGH_PLASMA_SELF_TEST_THRESHOLD 0x80
|
||||
#define HIGH_PIEZO_SELF_TEST_THRESHOLD 0x2B
|
||||
#define MAX_PLASMA_SELF_TEST_THRESHOLD 0xFF
|
||||
#define MAX_PIEZO_SELF_TEST_THRESHOLD 0xFF
|
||||
/* Self test threshold levels. */
|
||||
|
||||
#define PLASMA_1_PLUS_LOW 0x13
|
||||
#define PLASMA_1_MINUS_LOW 0x08
|
||||
#define PLASMA_2_PLUS_LOW 0x10
|
||||
#define PZT_1_LOW 0x36
|
||||
#define PZT_2_LOW 0x36
|
||||
/* Low level test pulses. */
|
||||
|
||||
#define PLASMA_1_PLUS_HIGH 0x5A
|
||||
#define PLASMA_1_MINUS_HIGH 0x2A
|
||||
#define PLASMA_2_PLUS_HIGH 0x50
|
||||
#define PZT_1_HIGH 0xF6
|
||||
#define PZT_2_HIGH 0xE8
|
||||
/* High level test pulses. */
|
||||
|
||||
#define SU_NOT_ACTIVATED 0
|
||||
#define SU_NOT_DEACTIVATED 0
|
||||
|
||||
#define CHANNEL_NOT_SELECTED 5
|
||||
#define SU_NOT_SELECTED 6
|
||||
|
||||
#define TRIGGER_SET_OK 1
|
||||
|
||||
#define DEFAULT_THRESHOLD 0x0D
|
||||
/* Default Trigger threshold is mid-scale value. */
|
||||
|
||||
#define DEFAULT_TEST_PULSE_LEVEL 0x00
|
||||
|
||||
#define DEFAULT_CLASSIFICATION_LEVEL 0
|
||||
#define DEFAULT_MAX_TIME 255
|
||||
#define DEFAULT_MIN_TIME 0
|
||||
/* These default levels are only temporary */
|
||||
|
||||
#define SU_ONOFF_MASK 3
|
||||
/* Bit mask for SU Status register manipulation when SU is */
|
||||
/* switched ON or OFF. */
|
||||
|
||||
#define SU_STATE_TRANSITION_OK 1
|
||||
#define SU_STATE_TRANSITION_FAILED 0
|
||||
|
||||
#define NO_SU 0
|
||||
|
||||
/* Trigger level register base addresses */
|
||||
|
||||
#define SU_1_TRIGGER_BASE 0xFFB0
|
||||
#define SU_2_TRIGGER_BASE 0xFFB3
|
||||
#define SU_3_TRIGGER_BASE 0xFFC0
|
||||
#define SU_4_TRIGGER_BASE 0xFFC3
|
||||
|
||||
#define SU_CONTROL 0xFFD0
|
||||
|
||||
#define SU_1_MINUS_50 1
|
||||
#define SU_1_PLUS_50 2
|
||||
#define SU_2_MINUS_50 4
|
||||
#define SU_2_PLUS_50 8
|
||||
#define SU_3_MINUS_50 16
|
||||
#define SU_3_PLUS_50 32
|
||||
#define SU_4_MINUS_50 64
|
||||
#define SU_4_PLUS_50 128
|
||||
|
||||
#define HV_STATUS 0xFF70
|
||||
|
||||
#include "target_su_ctrl.h"
|
||||
|
||||
/* Type definitions */
|
||||
|
||||
typedef uint_least8_t sensor_number_t;
|
||||
/* Sensor Unit number. Valid values SU_1, SU_2, SU_3 and SU_4 */
|
||||
/* which must be successive integers. */
|
||||
/* As a special case for some variables, the value NO_SU */
|
||||
/* indicates "no Sensor Unit". This possibility is always */
|
||||
/* shown by a comment on that variable, otherwise only real */
|
||||
/* SU numbers are allowed. */
|
||||
|
||||
#define NUM_SU 4
|
||||
/* The number of sensor units. */
|
||||
|
||||
typedef uint_least8_t sensor_index_t;
|
||||
/* Sensor Unit index. Valid values 0 .. NUM_SU - 1. */
|
||||
/* Index 0 corresponds to Sensor Unit number SU_1. */
|
||||
|
||||
typedef uint_least8_t channel_t;
|
||||
/* The number of an A/D channel. */
|
||||
|
||||
typedef struct {
|
||||
unsigned short int FromPlasma1Plus;
|
||||
unsigned short int FromPlasma1Minus;
|
||||
} delays_t ;
|
||||
|
||||
typedef struct {
|
||||
sensor_number_t sensor_unit;
|
||||
channel_t channel;
|
||||
unsigned char level;
|
||||
unsigned char execution_result;
|
||||
unsigned int base;
|
||||
} trigger_set_t ;
|
||||
|
||||
typedef struct {
|
||||
unsigned char V_down_bit;
|
||||
unsigned char HV_status;
|
||||
} voltage_status_t ;
|
||||
|
||||
|
||||
extern unsigned char EXTERNAL SU_ctrl_register;
|
||||
/* This variable stores values of write-only registers */
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/* Sensor Unit status */
|
||||
|
||||
|
||||
/* Delay and rise time counters */
|
||||
extern void ReadDelayCounters ( delays_t EXTERNAL *delay );
|
||||
extern unsigned char ReadRiseTimeCounter( void ) COMPACT REENTRANT_FUNC;
|
||||
extern void ResetDelayCounters( void ) COMPACT REENTRANT_FUNC;
|
||||
extern void ResetPeakDetector( sensor_number_t unit );
|
||||
extern void SignalPeakDetectorReset(
|
||||
unsigned char low_reset_value,
|
||||
unsigned char high_reset_value );
|
||||
|
||||
|
||||
/* Trigger levels */
|
||||
extern void SetTriggerLevel( trigger_set_t EXTERNAL *setting )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
/* Test pulse level */
|
||||
extern void SetTestPulseLevel( unsigned char level )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
extern void GetVoltageStatus( voltage_status_t EXTERNAL *v_status )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
|
||||
/* Sensor Unit power control */
|
||||
extern void Switch_SU_On (
|
||||
sensor_number_t SU_Number,
|
||||
unsigned char EXTERNAL *execution_result )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
extern void Switch_SU_Off (
|
||||
sensor_number_t SU_Number,
|
||||
unsigned char EXTERNAL *execution_result )
|
||||
COMPACT REENTRANT_FUNC;
|
||||
|
||||
/* Sensor Unit calibration */
|
||||
|
||||
extern void EnableAnalogSwitch( sensor_index_t self_test_SU_index );
|
||||
extern void DisableAnalogSwitch( sensor_index_t self_test_SU_index );
|
||||
extern void SelectSelfTestChannel( unsigned char channel );
|
||||
extern void SelectTriggerSwitchLevel(
|
||||
unsigned char test_channel,
|
||||
sensor_index_t self_test_SU_index );
|
||||
extern void SelectStartSwitchLevel(
|
||||
unsigned char test_channel,
|
||||
sensor_index_t self_test_SU_index );
|
||||
|
||||
|
||||
#endif
|
||||
91
targets/wasm-tacle/parallel/DEBIE/code/taskctrl.h
Normal file
91
targets/wasm-tacle/parallel/DEBIE/code/taskctrl.h
Normal file
@ -0,0 +1,91 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DNI (DEBIE Null Interface)
|
||||
Module : taskctrl.h
|
||||
|
||||
Macros and function prototypes for operations dealing with the
|
||||
kernel, task switching, message passing. The contents of this
|
||||
DNI version of this header file are identical to the DHI version.
|
||||
The DNI/DHI difference is in the bodies of the operations.
|
||||
|
||||
Based on the SSF DHI file taskctrl.h, revision 1.11, Mon May 17 22:51:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Type definitions */
|
||||
|
||||
#ifndef TASKCTRL_H
|
||||
#define TASKCTRL_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
#define MACHINE_CYCLE 1.085
|
||||
/* The machine (processor) cycle time, in microseconds. */
|
||||
|
||||
#define DELAY_LIMIT(TIME) (unsigned short)((((TIME) / MACHINE_CYCLE) - 4) / 2)
|
||||
/* Computes the number of ShortDelay() argument-units that corresponds */
|
||||
/* to a certain delay TIME in microseconds. Note that this formula can */
|
||||
/* yield values larger than ShortDelay() can implement in one call. */
|
||||
/* This formula is mainly intended for use with compile-time constant */
|
||||
/* values for TIME. */
|
||||
|
||||
#define MAX_SHORT_DELAY 255
|
||||
/* The largest possible argument for ShortDelay(). */
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned char rtx_task_number;
|
||||
void ( *task_main_function )( void );
|
||||
} task_info_t;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
extern void ShortDelay ( uint_least8_t delay_loops );
|
||||
|
||||
extern void CreateTask( task_info_t EXTERNAL *new_task );
|
||||
|
||||
extern void WaitInterval( unsigned char time );
|
||||
|
||||
extern void WaitTimeout( unsigned char time ) COMPACT REENTRANT_FUNC;
|
||||
|
||||
extern void SetTimeSlice( unsigned int time_slice );
|
||||
|
||||
extern void StartSystem( unsigned char task_number );
|
||||
|
||||
extern void SendTaskMail (
|
||||
unsigned char mailbox,
|
||||
uint16_t message,
|
||||
unsigned char timeout );
|
||||
|
||||
extern unsigned char isr_send_message (
|
||||
unsigned char mailbox,
|
||||
uint16_t message );
|
||||
|
||||
#define OK 8
|
||||
#define NOT_OK 9
|
||||
|
||||
#define Send_ISR_Mail(mailbox,message) \
|
||||
if (isr_send_message (mailbox, message) == NOT_OK) \
|
||||
{ \
|
||||
telemetry_data.isr_send_message_error = mailbox; \
|
||||
}
|
||||
/* Send_ISR_Mail is to be used from C51 interrupt routines to send */
|
||||
/* mail messages to tasks. If RTX-51 reports an error, the mailbox */
|
||||
/* number is set in telemetry. The reason is probably the following: */
|
||||
/* -Specified mailbox does not exist(wrong mailbox parameter). */
|
||||
/* Send_ISR_Mail is made a macro instead of a function to avoid using */
|
||||
/* reentrant functions from interrupt routines. */
|
||||
/* Users of Send_ISR_Mail must have access to telemetry_data. */
|
||||
|
||||
#endif
|
||||
1517
targets/wasm-tacle/parallel/DEBIE/code/tc_hand.c
Normal file
1517
targets/wasm-tacle/parallel/DEBIE/code/tc_hand.c
Normal file
File diff suppressed because it is too large
Load Diff
176
targets/wasm-tacle/parallel/DEBIE/code/tc_hand.h
Normal file
176
targets/wasm-tacle/parallel/DEBIE/code/tc_hand.h
Normal file
@ -0,0 +1,176 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : tc_hand.h
|
||||
|
||||
Prototypes etc. for the Telecommand Handler module, TC_Hand.
|
||||
|
||||
Based on the SSF file tc_hand.h, rev 1.11, Mon Mar 22 11:39:54 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TC_HAND_H
|
||||
#define TC_HAND_H
|
||||
|
||||
#include "keyword.h"
|
||||
#include "kernobj.h"
|
||||
|
||||
/* Valid telecommand address codes: */
|
||||
/* NOTE that all codes are not yet defined, because */
|
||||
/* all telecommands are not implemented in the */
|
||||
/* Prototype SW. */
|
||||
|
||||
#define UNUSED_TC_ADDRESS 0x00
|
||||
|
||||
#define START_ACQUISITION 0x01
|
||||
#define STOP_ACQUISITION 0x02
|
||||
|
||||
#define ERROR_STATUS_CLEAR 0x03
|
||||
|
||||
#define SEND_STATUS_REGISTER 0x05
|
||||
#define SEND_SCIENCE_DATA_FILE 0x06
|
||||
|
||||
#define SET_TIME_BYTE_0 0x0C
|
||||
#define SET_TIME_BYTE_1 0x0D
|
||||
#define SET_TIME_BYTE_2 0x0E
|
||||
#define SET_TIME_BYTE_3 0x0F
|
||||
|
||||
#define SOFT_RESET 0x09
|
||||
|
||||
#define CLEAR_WATCHDOG_FAILURES 0x0A
|
||||
#define CLEAR_CHECKSUM_FAILURES 0x0B
|
||||
|
||||
#define WRITE_CODE_MEMORY_MSB 0x10
|
||||
#define WRITE_CODE_MEMORY_LSB 0x6F
|
||||
#define WRITE_DATA_MEMORY_MSB 0x15
|
||||
#define WRITE_DATA_MEMORY_LSB 0x6A
|
||||
#define READ_DATA_MEMORY_MSB 0x1F
|
||||
#define READ_DATA_MEMORY_LSB 0x60
|
||||
|
||||
#define SWITCH_SU_1 0x20
|
||||
#define SWITCH_SU_2 0x30
|
||||
#define SWITCH_SU_3 0x40
|
||||
#define SWITCH_SU_4 0x50
|
||||
|
||||
#define SET_SU_1_PLASMA_1P_THRESHOLD 0x21
|
||||
#define SET_SU_2_PLASMA_1P_THRESHOLD 0x31
|
||||
#define SET_SU_3_PLASMA_1P_THRESHOLD 0x41
|
||||
#define SET_SU_4_PLASMA_1P_THRESHOLD 0x51
|
||||
|
||||
#define SET_SU_1_PLASMA_1M_THRESHOLD 0x22
|
||||
#define SET_SU_2_PLASMA_1M_THRESHOLD 0x32
|
||||
#define SET_SU_3_PLASMA_1M_THRESHOLD 0x42
|
||||
#define SET_SU_4_PLASMA_1M_THRESHOLD 0x52
|
||||
|
||||
#define SET_SU_1_PIEZO_THRESHOLD 0x23
|
||||
#define SET_SU_2_PIEZO_THRESHOLD 0x33
|
||||
#define SET_SU_3_PIEZO_THRESHOLD 0x43
|
||||
#define SET_SU_4_PIEZO_THRESHOLD 0x53
|
||||
|
||||
#define SET_SU_1_PLASMA_1P_CLASS_LEVEL 0x24
|
||||
#define SET_SU_2_PLASMA_1P_CLASS_LEVEL 0x34
|
||||
#define SET_SU_3_PLASMA_1P_CLASS_LEVEL 0x44
|
||||
#define SET_SU_4_PLASMA_1P_CLASS_LEVEL 0x54
|
||||
|
||||
#define SET_SU_1_PLASMA_1M_CLASS_LEVEL 0x25
|
||||
#define SET_SU_2_PLASMA_1M_CLASS_LEVEL 0x35
|
||||
#define SET_SU_3_PLASMA_1M_CLASS_LEVEL 0x45
|
||||
#define SET_SU_4_PLASMA_1M_CLASS_LEVEL 0x55
|
||||
|
||||
#define SET_SU_1_PLASMA_2P_CLASS_LEVEL 0x28
|
||||
#define SET_SU_2_PLASMA_2P_CLASS_LEVEL 0x38
|
||||
#define SET_SU_3_PLASMA_2P_CLASS_LEVEL 0x48
|
||||
#define SET_SU_4_PLASMA_2P_CLASS_LEVEL 0x58
|
||||
|
||||
#define SET_SU_1_PIEZO_1_CLASS_LEVEL 0x26
|
||||
#define SET_SU_2_PIEZO_1_CLASS_LEVEL 0x36
|
||||
#define SET_SU_3_PIEZO_1_CLASS_LEVEL 0x46
|
||||
#define SET_SU_4_PIEZO_1_CLASS_LEVEL 0x56
|
||||
|
||||
#define SET_SU_1_PIEZO_2_CLASS_LEVEL 0x27
|
||||
#define SET_SU_2_PIEZO_2_CLASS_LEVEL 0x37
|
||||
#define SET_SU_3_PIEZO_2_CLASS_LEVEL 0x47
|
||||
#define SET_SU_4_PIEZO_2_CLASS_LEVEL 0x57
|
||||
|
||||
#define SET_SU_1_PLASMA_1E_1I_MAX_TIME 0x29
|
||||
#define SET_SU_2_PLASMA_1E_1I_MAX_TIME 0x39
|
||||
#define SET_SU_3_PLASMA_1E_1I_MAX_TIME 0x49
|
||||
#define SET_SU_4_PLASMA_1E_1I_MAX_TIME 0x59
|
||||
|
||||
#define SET_SU_1_PLASMA_1E_PZT_MIN_TIME 0x2A
|
||||
#define SET_SU_2_PLASMA_1E_PZT_MIN_TIME 0x3A
|
||||
#define SET_SU_3_PLASMA_1E_PZT_MIN_TIME 0x4A
|
||||
#define SET_SU_4_PLASMA_1E_PZT_MIN_TIME 0x5A
|
||||
|
||||
#define SET_SU_1_PLASMA_1E_PZT_MAX_TIME 0x2B
|
||||
#define SET_SU_2_PLASMA_1E_PZT_MAX_TIME 0x3B
|
||||
#define SET_SU_3_PLASMA_1E_PZT_MAX_TIME 0x4B
|
||||
#define SET_SU_4_PLASMA_1E_PZT_MAX_TIME 0x5B
|
||||
|
||||
#define SET_SU_1_PLASMA_1I_PZT_MIN_TIME 0x2C
|
||||
#define SET_SU_2_PLASMA_1I_PZT_MIN_TIME 0x3C
|
||||
#define SET_SU_3_PLASMA_1I_PZT_MIN_TIME 0x4C
|
||||
#define SET_SU_4_PLASMA_1I_PZT_MIN_TIME 0x5C
|
||||
|
||||
#define SET_SU_1_PLASMA_1I_PZT_MAX_TIME 0x2D
|
||||
#define SET_SU_2_PLASMA_1I_PZT_MAX_TIME 0x3D
|
||||
#define SET_SU_3_PLASMA_1I_PZT_MAX_TIME 0x4D
|
||||
#define SET_SU_4_PLASMA_1I_PZT_MAX_TIME 0x5D
|
||||
|
||||
#define SET_COEFFICIENT_1 0x70
|
||||
#define SET_COEFFICIENT_2 0x71
|
||||
#define SET_COEFFICIENT_3 0x72
|
||||
#define SET_COEFFICIENT_4 0x73
|
||||
#define SET_COEFFICIENT_5 0x74
|
||||
|
||||
/* TC codes for SWITCH_SU_x: */
|
||||
|
||||
#define ON_VALUE 0x55
|
||||
#define OFF_VALUE 0x73
|
||||
#define SELF_TEST 0x99
|
||||
|
||||
/* Last TC code for SEND_STATUS_REGISTER: */
|
||||
|
||||
#define LAST_EVEN 0x74
|
||||
|
||||
/* State of Telecommand Execution task */
|
||||
|
||||
typedef enum {
|
||||
TC_handling_e,
|
||||
read_memory_e,
|
||||
memory_dump_e,
|
||||
write_memory_e,
|
||||
memory_patch_e,
|
||||
register_TM_e,
|
||||
SC_TM_e
|
||||
} TC_state_t;
|
||||
|
||||
extern EXTERNAL TC_state_t TC_state;
|
||||
|
||||
/*pointer to a task*/
|
||||
extern void ( * EXTERNAL TC_task )( void );
|
||||
|
||||
/* Functions prototype */
|
||||
extern void Set_TC_Error( void );
|
||||
|
||||
/* Task functions, for testing: */
|
||||
|
||||
extern void TC_InterruptService ( void )
|
||||
INTERRUPT( TC_ISR_SOURCE ) USED_REG_BANK( 2 );
|
||||
extern void InitTelecommandTask ( void );
|
||||
extern void HandleTelecommand ( void );
|
||||
|
||||
#endif
|
||||
|
||||
504
targets/wasm-tacle/parallel/DEBIE/code/telem.c
Normal file
504
targets/wasm-tacle/parallel/DEBIE/code/telem.c
Normal file
@ -0,0 +1,504 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : telem.c
|
||||
|
||||
Telemetry module.
|
||||
|
||||
Based on the SSF file telem.c, rev 1.28, Wed Oct 13 19:49:34 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "keyword.h"
|
||||
#include "kernobj.h"
|
||||
#include "tm_data.h"
|
||||
#include "msg_ctrl.h"
|
||||
#include "tc_hand.h"
|
||||
#include "telem.h"
|
||||
#include "ttc_ctrl.h"
|
||||
#include "su_ctrl.h"
|
||||
#include "dpu_ctrl.h"
|
||||
#include "isr_ctrl.h"
|
||||
#include "taskctrl.h"
|
||||
#include "health.h"
|
||||
|
||||
EXTERNAL telemetry_data_t telemetry_data;
|
||||
|
||||
EXTERNAL science_data_file_t LOCATION( SCIENCE_DATA_START_ADDRESS )
|
||||
science_data;
|
||||
|
||||
uint_least16_t EXTERNAL max_events;
|
||||
/* This variable is used to speed up certain */
|
||||
/* Functional Test by adding the possibility */
|
||||
/* to restrict the amount of events. */
|
||||
/* It is initialised to value MAX_EVENTS at */
|
||||
/* Boot. */
|
||||
|
||||
unsigned char EXTERNAL *telemetry_pointer;
|
||||
|
||||
unsigned char EXTERNAL *telemetry_end_pointer;
|
||||
|
||||
unsigned char EXTERNAL read_memory_checksum;
|
||||
/* Checksum to be sent at the end of Read Memory sequence. */
|
||||
|
||||
event_record_t EXTERNAL event_queue[ MAX_QUEUE_LENGTH ];
|
||||
/* Holds event records before they are copied to the */
|
||||
/* Science Data memory. Normally there is only data */
|
||||
/* from the new event whose data is beign collected, */
|
||||
/* but during Science Telemetry there can be stored */
|
||||
/* several older events which are copied to the */
|
||||
/* Science Data memory after telemetry ends. */
|
||||
|
||||
uint_least8_t EXTERNAL event_queue_length;
|
||||
/* Number of event records stored in the queue. */
|
||||
/* These records are stored into event_queue table */
|
||||
/* in order starting from the first element. */
|
||||
/* Initialised to zero on power-up. */
|
||||
|
||||
uint_least16_t EXTERNAL free_slot_index;
|
||||
/* Index to the first free record in the Science */
|
||||
/* Data memory, or if it is full equals to 'max_events'. */
|
||||
/* Initialised to zero on power-up. */
|
||||
|
||||
|
||||
event_record_t EXTERNAL *GetFreeRecord( void )
|
||||
|
||||
/* Purpose : Returns pointer to free event record in event queue. */
|
||||
/* Interface : inputs - event_queue_length, legnth of the event */
|
||||
/* queue. */
|
||||
/* outputs - return value, pointer to the free record. */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : none. */
|
||||
/* Algorithm : -If the queue is not full */
|
||||
/* -return pointer to the next free record */
|
||||
/* -else */
|
||||
/* -return pointer to the last record */
|
||||
|
||||
{
|
||||
if ( event_queue_length < MAX_QUEUE_LENGTH )
|
||||
return &( event_queue[ event_queue_length ] );
|
||||
|
||||
else
|
||||
return &( event_queue[ MAX_QUEUE_LENGTH - 1 ] );
|
||||
}
|
||||
|
||||
|
||||
void TM_InterruptService ( void ) INTERRUPT( TM_ISR_SOURCE ) USED_REG_BANK( 2 )
|
||||
/* Purpose : This function handles the TM interrupts. */
|
||||
/* Interface : inputs - telemetry_pointer */
|
||||
/* telemetry_end_pointer */
|
||||
/* TC_state */
|
||||
/* telemetry_data */
|
||||
/* outputs - telemetry_pointer */
|
||||
/* TM HW reigsiters */
|
||||
/* Telemcommand Execution task mailbox */
|
||||
/* Preconditions : telemetry_pointer and telemetry_end_pointer have valid */
|
||||
/* values (TM interrupts should be enabled only when this */
|
||||
/* condition is true) */
|
||||
/* Postconditions : Next two bytes are written to TM HW registers and if they*/
|
||||
/* were the last bytes to be written, a "TM_READY" mail is */
|
||||
/* sent to the Telecommand Execution task */
|
||||
/* Algorithm : - if telemetry_pointer < telemetry_end_pointer */
|
||||
/* - write next two bytes from location pointed by */
|
||||
/* telemetry_pointer and increase it by two */
|
||||
/* - else if TC_state == register_TM_e */
|
||||
/* - write first two TM data registers and set */
|
||||
/* telemetry_pointer to point to the third TM data */
|
||||
/* register */
|
||||
/* - else */
|
||||
/* - send TM_READY message to Telecommand Execution task */
|
||||
/* mailbox */
|
||||
|
||||
{
|
||||
unsigned char EXTERNAL tm_byte;
|
||||
|
||||
CLEAR_TM_INTERRUPT_FLAG;
|
||||
/*The interrupt flag is put down by setting high bit 3 'INT1' in port 3. */
|
||||
|
||||
if ( telemetry_pointer == ( unsigned char * ) &telemetry_data.time )
|
||||
COPY ( telemetry_data.time, internal_time );
|
||||
|
||||
if ( telemetry_pointer < telemetry_end_pointer ) {
|
||||
/* There are bytes left to be sent to TM. */
|
||||
|
||||
tm_byte = *telemetry_pointer;
|
||||
WRITE_TM_MSB ( tm_byte );
|
||||
read_memory_checksum ^= tm_byte;
|
||||
|
||||
telemetry_pointer++;
|
||||
|
||||
tm_byte = *telemetry_pointer;
|
||||
WRITE_TM_LSB ( tm_byte );
|
||||
read_memory_checksum ^= tm_byte;
|
||||
|
||||
telemetry_pointer++;
|
||||
} else
|
||||
if ( TC_state == register_TM_e )
|
||||
/* Start to send TM data registers starting from the first ones */
|
||||
{
|
||||
telemetry_pointer = ( EXTERNAL unsigned char * )&telemetry_data;
|
||||
WRITE_TM_MSB ( *telemetry_pointer );
|
||||
telemetry_pointer++;
|
||||
WRITE_TM_LSB ( *telemetry_pointer );
|
||||
telemetry_pointer++;
|
||||
} else
|
||||
if ( TC_state == memory_dump_e ) {
|
||||
WRITE_TM_MSB( 0 );
|
||||
WRITE_TM_LSB( read_memory_checksum );
|
||||
/* Last two bytes of Read Memory sequence. */
|
||||
|
||||
Send_ISR_Mail( TCTM_MAILBOX, TM_READY );
|
||||
} else
|
||||
/* It is time to stop sending telemetry */
|
||||
Send_ISR_Mail ( TCTM_MAILBOX, TM_READY );
|
||||
}
|
||||
|
||||
|
||||
dpu_time_t GetElapsedTime( unsigned int event_number )
|
||||
/* Purpose : Returns the hit time of a given event. */
|
||||
/* Interface : inputs - event_number (parameter) */
|
||||
/* science_data[ event_number ].hit_time, hit */
|
||||
/* time of the given event record. */
|
||||
/* outputs - return value, hit time. */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : none. */
|
||||
/* Algorithm : -copy hit time of an event to a local variable hit */
|
||||
/* time */
|
||||
/* -return the value of hit time */
|
||||
{
|
||||
dpu_time_t INDIRECT_INTERNAL hit_time;
|
||||
/* Hit time. */
|
||||
|
||||
COPY ( hit_time, science_data.event[ event_number ].hit_time );
|
||||
|
||||
return hit_time;
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned int FindMinQualityRecord( void )
|
||||
|
||||
/* Purpose : Finds event with lowest quality from Science Data memory.*/
|
||||
/* Interface : inputs - science_data.event, event records */
|
||||
/* outputs - return value, index of event record with */
|
||||
/* the lowest quality. */
|
||||
/* subroutines - GetElapsedTime */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : none. */
|
||||
/* Algorithm : -Select first the first event record. */
|
||||
/* -Loop from the second record to the last: */
|
||||
/* -if the quality of the record is lower than the */
|
||||
/* quality of the selected one, select the record. */
|
||||
/* -else if the quality of the record equals the quality */
|
||||
/* of selected one and it is older than the selected */
|
||||
/* one, select the record. */
|
||||
/* -End loop. */
|
||||
/* -return the index of the selected record. */
|
||||
|
||||
{
|
||||
unsigned int INDIRECT_INTERNAL min_quality_number;
|
||||
/* The quality number of an event which has the lowest quality */
|
||||
/* number in the science data. */
|
||||
|
||||
unsigned int INDIRECT_INTERNAL min_quality_location;
|
||||
/* The location of an event which has the lowest quality number */
|
||||
/* in the science data. */
|
||||
|
||||
dpu_time_t DIRECT_INTERNAL min_time;
|
||||
/* Elapsed time of the oldest event. */
|
||||
|
||||
dpu_time_t DIRECT_INTERNAL time;
|
||||
/* Elapsed time as previously mentioned. */
|
||||
|
||||
uint_least16_t DIRECT_INTERNAL i;
|
||||
/* Loop variable. */
|
||||
|
||||
|
||||
min_time = GetElapsedTime( 0 );
|
||||
min_quality_number = science_data.event[ 0 ].quality_number;
|
||||
min_quality_location = 0;
|
||||
/* First event is selected and compared against */
|
||||
/* the following events in the science_data. */
|
||||
|
||||
_Pragma( "loopbound min 1260 max 1260" )
|
||||
for ( i = 1; i < max_events; i++ ) {
|
||||
time = GetElapsedTime( i );
|
||||
|
||||
if ( science_data.event[ i ].quality_number < min_quality_number ) {
|
||||
min_time = time;
|
||||
min_quality_number = science_data.event[ i ].quality_number;
|
||||
min_quality_location = i;
|
||||
/* If an event in the science_data has a lower quality number than */
|
||||
/* any of the previous events, its quality_number and location is */
|
||||
/* stored into variables. */
|
||||
}
|
||||
|
||||
else
|
||||
if ( ( science_data.event[ i ].quality_number == min_quality_number )
|
||||
&& ( time < min_time ) ) {
|
||||
min_time = time;
|
||||
min_quality_location = i;
|
||||
/* If an event in the science_data has an equal quality number with */
|
||||
/* any of the previous events and it's older, event's */
|
||||
/* quality_number and location are stored into variables. */
|
||||
}
|
||||
}
|
||||
|
||||
return min_quality_location;
|
||||
}
|
||||
|
||||
|
||||
void IncrementCounters(
|
||||
sensor_index_t sensor_unit,
|
||||
unsigned char classification )
|
||||
|
||||
/* Purpose : Increments given event counters. */
|
||||
/* Interface : inputs - sensor_unit (parameter) */
|
||||
/* classification (parameter) */
|
||||
/* outputs - telemetry_data.SU_hits, counter of hits of */
|
||||
/* given Sensor Unit */
|
||||
/* science_data.event_counter, counter of */
|
||||
/* events with given classification and SU. */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : Given counters are incremented, if they had not their */
|
||||
/* maximum values. */
|
||||
/* Algorithm : Increment given counters, if they are less than their */
|
||||
/* maximum values. Calculate checksum for event counter. */
|
||||
/* */
|
||||
/* This function is used by Acquisition and TelecommandExecutionTask. */
|
||||
/* However, it does not have to be of re-entrant type because collision */
|
||||
/* is avoided through design, as follows. */
|
||||
/* If Science Telemetry is in progress when Acquisition task is handling */
|
||||
/* an event, the event record cannot be written to the Science Data */
|
||||
/* memory. Instead it is left to the temporary queue which will be */
|
||||
/* copied to the Science Data memory after the Science telemetry is */
|
||||
/* completed. For the same reason call for IncrementCounters is */
|
||||
/* disabled. */
|
||||
/* On the other hand, when Acquisition task is handling an event with */
|
||||
/* RecordEvent all interrupts are disabled i.e. TelecommandExecutionTask */
|
||||
/* cannot use IncrementCounters simultaniously. */
|
||||
|
||||
|
||||
|
||||
{
|
||||
unsigned char EXTERNAL counter;
|
||||
unsigned char EXTERNAL new_checksum;
|
||||
|
||||
|
||||
if ( telemetry_data.SU_hits[ sensor_unit ] < 0xFFFF ) {
|
||||
telemetry_data.SU_hits[ sensor_unit ]++;
|
||||
/* SU hit counter is incremented. */
|
||||
}
|
||||
|
||||
if ( science_data.event_counter[ sensor_unit ][ classification ] < 0xFF ) {
|
||||
|
||||
counter = science_data.event_counter[ sensor_unit ][ classification ];
|
||||
|
||||
new_checksum =
|
||||
science_data.counter_checksum ^ counter;
|
||||
/* Delete effect of old counter value from the checksum. */
|
||||
|
||||
counter++;
|
||||
|
||||
new_checksum ^= counter;
|
||||
/* Add effect of new counter value to the checksum. */
|
||||
|
||||
science_data.event_counter[ sensor_unit ][ classification ] = counter;
|
||||
/* The event counter is incremented. */
|
||||
|
||||
science_data.counter_checksum = new_checksum;
|
||||
/* Event counter checksum is updated. */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* tm_data.h */
|
||||
/*****************************************************************************/
|
||||
|
||||
void RecordEvent( void )
|
||||
/* Purpose : This function increments proper event counter and stores */
|
||||
/* the new event record to the science data memory. */
|
||||
/* Interface : inputs - free_slot_index, index of next free event */
|
||||
/* record in the Science Data memory. */
|
||||
/* TC_state, state of the TC Execution task. */
|
||||
/* event_queue_length, length of the event */
|
||||
/* record queue. */
|
||||
/* event_queue, event record queue. */
|
||||
/* outputs - event_queue_length, as above. */
|
||||
/* science_data.event, event records in */
|
||||
/* Science Data memory. */
|
||||
/* free_slot_index, as above. */
|
||||
/* subroutines - FindMinQualityRecord */
|
||||
/* IncrementCounters */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : If Science telemetry is not in progress, event data is */
|
||||
/* stored in its proper place in the science data, */
|
||||
/* otherwise event data is left in the queue and one record */
|
||||
/* is reserved from the queue unless it is already full. */
|
||||
/* Algorithm : If there is room in the Science Data memory, the event */
|
||||
/* data is tried to be stored there, otherwise the event */
|
||||
/* with the lowest quality is searched and tried to be */
|
||||
/* replaced. If the Science telemetry is in progress the */
|
||||
/* event data is left in the queue and the length of the */
|
||||
/* queue is incremented unless the queue is already full. */
|
||||
/* If the Science telemetry is not in progress the event */
|
||||
/* data is copied to the Science Data to the location */
|
||||
/* defined earlier as described above. */
|
||||
|
||||
{
|
||||
uint_least16_t INDIRECT_INTERNAL record_index;
|
||||
|
||||
DISABLE_INTERRUPT_MASTER;
|
||||
|
||||
record_index = free_slot_index;
|
||||
|
||||
if ( record_index >= max_events && TC_state != SC_TM_e ) {
|
||||
/* Science Data memory was full and Science TM was not in progress */
|
||||
|
||||
ENABLE_INTERRUPT_MASTER;
|
||||
record_index = FindMinQualityRecord();
|
||||
DISABLE_INTERRUPT_MASTER;
|
||||
}
|
||||
|
||||
if ( TC_state == SC_TM_e ) {
|
||||
/* Science Telemetry is in progress, so the event record */
|
||||
/* cannot be written to the Science Data memory. Instead */
|
||||
/* it is left to the temporary queue which will be */
|
||||
/* copied to the Science Data memory after the Science */
|
||||
/* telemetry is completed. */
|
||||
|
||||
if ( event_queue_length < MAX_QUEUE_LENGTH ) {
|
||||
/* There is still room in the queue. */
|
||||
|
||||
event_queue_length++;
|
||||
/* Prevent the event data from being overwritten. */
|
||||
}
|
||||
ENABLE_INTERRUPT_MASTER;
|
||||
}
|
||||
|
||||
else {
|
||||
if ( free_slot_index < max_events ) {
|
||||
/* Science Data memory was not full */
|
||||
|
||||
record_index = free_slot_index;
|
||||
science_data.event[ record_index ].quality_number = 0;
|
||||
free_slot_index++;
|
||||
}
|
||||
|
||||
|
||||
/* Increment event counters. */
|
||||
IncrementCounters(
|
||||
event_queue[ 0 ].SU_number - 1,
|
||||
event_queue[ 0 ].classification );
|
||||
|
||||
ENABLE_INTERRUPT_MASTER;
|
||||
|
||||
if ( event_queue[ 0 ].quality_number >=
|
||||
science_data.event[ record_index ].quality_number )
|
||||
|
||||
{
|
||||
STRUCT_ASSIGN (
|
||||
science_data.event[ record_index ],
|
||||
event_queue[ 0 ],
|
||||
event_record_t );
|
||||
|
||||
/* In this state the event data is located always to */
|
||||
/* the first element of the queue. */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ClearEvents( void )
|
||||
/* Cleares the event counters and the quality numbers of */
|
||||
/* the event records in the science data memory */
|
||||
|
||||
{
|
||||
DIRECT_INTERNAL uint_least8_t i;
|
||||
/* This variable is used in the for-loop which goes through */
|
||||
/* the science data event counter. */
|
||||
|
||||
DIRECT_INTERNAL uint_least8_t j;
|
||||
/* This variable is used in the for-loop which goes through */
|
||||
/* the science data event counter. */
|
||||
|
||||
/* Interrupts does not need to be disabled as long as */
|
||||
/* Telecommand Execution task has higher priority than */
|
||||
/* Acquisition task. */
|
||||
|
||||
_Pragma( "loopbound min 4 max 4" )
|
||||
for ( i = 0; i < NUM_SU; i++ ) {
|
||||
telemetry_data.SU_hits[ i ] = 0;
|
||||
|
||||
_Pragma( "loopbound min 10 max 10" )
|
||||
for ( j = 0; j < NUM_CLASSES; j++ )
|
||||
science_data.event_counter[ i ][ j ] = 0;
|
||||
/*event counters are cleared in science_data */
|
||||
}
|
||||
|
||||
_Pragma( "loopbound min 10 max 10" )
|
||||
for ( i = 0; i < event_queue_length; i++ ) {
|
||||
/* Events from the event queue are copied to the Science */
|
||||
/* Data memory. */
|
||||
|
||||
STRUCT_ASSIGN (
|
||||
science_data.event[ i ],
|
||||
event_queue[ i ],
|
||||
event_record_t );
|
||||
|
||||
IncrementCounters(
|
||||
event_queue[ i ].SU_number - 1,
|
||||
event_queue[ i ].classification );
|
||||
|
||||
/* One more event is stored in the Science Data memory. */
|
||||
/* NOTE that the event queue should always be smaller */
|
||||
/* than the space reserved for event records in the */
|
||||
/* Science Data memory. */
|
||||
}
|
||||
|
||||
free_slot_index = event_queue_length;
|
||||
|
||||
event_queue_length = 0;
|
||||
/* Empty the event queue. */
|
||||
|
||||
science_data.counter_checksum = 0;
|
||||
science_data.not_used = 0;
|
||||
}
|
||||
|
||||
void ResetEventQueueLength( void )
|
||||
/* Purpose : Empty the event queue length. */
|
||||
/* Interface : inputs - none */
|
||||
/* outputs - none */
|
||||
/* subroutines - none */
|
||||
/* Preconditions : none. */
|
||||
/* Postconditions : none. */
|
||||
/* Algorithm : - reset event queue length. */
|
||||
{
|
||||
event_queue_length = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
62
targets/wasm-tacle/parallel/DEBIE/code/telem.h
Normal file
62
targets/wasm-tacle/parallel/DEBIE/code/telem.h
Normal file
@ -0,0 +1,62 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : telem.h
|
||||
|
||||
Prototypes etc. for the Telem module.
|
||||
|
||||
Based on the SSF file telem.h, rev 1.11, Wed May 12 13:08:26 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TELEM_H
|
||||
#define TELEM_H
|
||||
|
||||
#include "keyword.h"
|
||||
#include "kernobj.h"
|
||||
#include "tm_data.h"
|
||||
|
||||
/* Special value for TC/TM mail to be used only */
|
||||
/* telemetry is ready */
|
||||
|
||||
#define TM_READY 0xFFFF
|
||||
|
||||
#define MAX_QUEUE_LENGTH 10
|
||||
/* Maximum amount of event records in the queue. */
|
||||
/* Is expected to be at most 255 (unsigned char). */
|
||||
|
||||
extern uint_least8_t EXTERNAL event_queue_length;
|
||||
|
||||
extern unsigned char EXTERNAL *telemetry_pointer;
|
||||
extern unsigned char EXTERNAL *telemetry_end_pointer;
|
||||
extern unsigned int EXTERNAL free_slot_index;
|
||||
|
||||
extern unsigned char EXTERNAL read_memory_checksum;
|
||||
/* Checksum to be sent at the end of Read Memory sequence. */
|
||||
|
||||
|
||||
extern event_record_t EXTERNAL *GetFreeRecord( void );
|
||||
/* Returns pointer to next free event record from the */
|
||||
/* event record queue, or pointer to the last record */
|
||||
/* od the queue, if the queue is full. */
|
||||
|
||||
extern void ResetEventQueueLength( void );
|
||||
|
||||
/* Task functions, for testing: */
|
||||
|
||||
extern void TM_InterruptService ( void )
|
||||
INTERRUPT( TM_ISR_SOURCE ) USED_REG_BANK( 2 );
|
||||
|
||||
#endif
|
||||
|
||||
199
targets/wasm-tacle/parallel/DEBIE/code/tm_data.h
Normal file
199
targets/wasm-tacle/parallel/DEBIE/code/tm_data.h
Normal file
@ -0,0 +1,199 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : tm_data.h
|
||||
|
||||
The Telemetry Data Structure.
|
||||
|
||||
Based on the SSF file tm_data.h, rev 1.22, Mon May 31 10:10:12 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TM_DATA_H
|
||||
#define TM_DATA_H
|
||||
|
||||
#include "keyword.h"
|
||||
|
||||
#include "dpu_ctrl.h"
|
||||
#include "su_ctrl.h"
|
||||
|
||||
#include "target_tm_data.h"
|
||||
|
||||
#define NUM_CLASSES 10
|
||||
#define NUM_TEMP 2
|
||||
#define NUM_NOT_USED (4 + 0x70 - 0x6A)
|
||||
|
||||
#define DPU_SELF_TEST 0
|
||||
#define STAND_BY 1
|
||||
#define ACQUISITION 2
|
||||
|
||||
#define MODE_BITS_MASK 3
|
||||
|
||||
/* Definitions related to error indicating bits in mode status register: */
|
||||
#define SUPPLY_ERROR 0x80
|
||||
#define DATA_MEMORY_ERROR 0x40
|
||||
#define PROGRAM_MEMORY_ERROR 0x20
|
||||
#define MEMORY_WRITE_ERROR 0x10
|
||||
#define ADC_ERROR 0x04
|
||||
|
||||
|
||||
/* Definitions related to error indicating bits in SU status register: */
|
||||
#define HV_SUPPLY_ERROR 0x80
|
||||
#define LV_SUPPLY_ERROR 0x40
|
||||
#define TEMPERATURE_ERROR 0x20
|
||||
#define SELF_TEST_ERROR 0x10
|
||||
#define HV_LIMIT_ERROR 0x08
|
||||
#define LV_LIMIT_ERROR 0x04
|
||||
#define SUPPLY_VOLTAGE_MASK 0x03
|
||||
|
||||
/* Used when error indiacting bits are cleared. */
|
||||
|
||||
|
||||
|
||||
/* Definitions related to error indicating bits in error status register: */
|
||||
#define CHECKSUM_ERROR 0x08
|
||||
#define WATCHDOG_ERROR 0x04
|
||||
#define OVERALL_SU_ERROR 0xF0
|
||||
/* Used to indicate error in all of the SUs. */
|
||||
|
||||
#define ERROR_STATUS_OFFSET 0x10
|
||||
/* Used when SU error indicating bit is selected. */
|
||||
|
||||
|
||||
/* Definitions related to error indicating bits in software error register: */
|
||||
#define MEASUREMENT_ERROR 0x01
|
||||
#define OS_START_SYSTEM_ERROR 0x02
|
||||
#define OS_WAIT_ERROR 0x04
|
||||
#define OS_SET_SLICE_ERROR 0x08
|
||||
|
||||
|
||||
#define NUM_QCOEFF 5
|
||||
/* Number of Quality Coefficients. */
|
||||
|
||||
/* Sensor Unit low power and TC settings : */
|
||||
|
||||
typedef struct {
|
||||
unsigned char plus_5_voltage; /* byte 1 */
|
||||
unsigned char minus_5_voltage; /* byte 2 */
|
||||
unsigned char plasma_1_plus_threshold; /* byte 3 */
|
||||
unsigned char plasma_1_minus_threshold; /* byte 4 */
|
||||
unsigned char piezo_threshold; /* byte 5 */
|
||||
unsigned char plasma_1_plus_classification; /* byte 6 */
|
||||
unsigned char plasma_1_minus_classification; /* byte 7 */
|
||||
unsigned char piezo_1_classification; /* byte 8 */
|
||||
unsigned char piezo_2_classification; /* byte 9 */
|
||||
unsigned char plasma_2_plus_classification; /* byte 10 */
|
||||
unsigned char plasma_1_plus_to_minus_max_time; /* byte 11 */
|
||||
unsigned char plasma_1_plus_to_piezo_min_time; /* byte 12 */
|
||||
unsigned char plasma_1_plus_to_piezo_max_time; /* byte 13 */
|
||||
unsigned char plasma_1_minus_to_piezo_min_time; /* byte 14 */
|
||||
unsigned char plasma_1_minus_to_piezo_max_time; /* byte 15 */
|
||||
} SU_settings_t;
|
||||
|
||||
/* TM data registers : */
|
||||
|
||||
typedef struct {
|
||||
unsigned char error_status; /* reg 0 */
|
||||
unsigned char mode_status; /* reg 1 */
|
||||
uint16_t TC_word; /* reg 2 - 3 */
|
||||
dpu_time_t TC_time_tag; /* reg 4 - 7 */
|
||||
unsigned char watchdog_failures; /* reg 8 */
|
||||
unsigned char checksum_failures; /* reg 9 */
|
||||
unsigned char SW_version; /* reg 10 */
|
||||
unsigned char isr_send_message_error; /* reg 11 */
|
||||
unsigned char SU_status[NUM_SU]; /* reg 12 - 15 */
|
||||
unsigned char SU_temperature[NUM_SU][NUM_TEMP]; /* reg 16 - 23 */
|
||||
unsigned char DPU_plus_5_digital; /* reg 24 */
|
||||
unsigned char os_send_message_error; /* reg 25 */
|
||||
unsigned char os_create_task_error; /* reg 26 */
|
||||
unsigned char SU_plus_50; /* reg 27 */
|
||||
unsigned char SU_minus_50; /* reg 28 */
|
||||
unsigned char os_disable_isr_error; /* reg 29 */
|
||||
unsigned char not_used_1; /* reg 30 */
|
||||
SU_settings_t sensor_unit_1; /* reg 31 - 45 */
|
||||
unsigned char os_wait_error; /* reg 46 */
|
||||
SU_settings_t sensor_unit_2; /* reg 47 - 61 */
|
||||
unsigned char os_attach_interrupt_error; /* reg 62 */
|
||||
SU_settings_t sensor_unit_3; /* reg 63 - 77 */
|
||||
unsigned char os_enable_isr_error; /* reg 78 */
|
||||
SU_settings_t sensor_unit_4; /* reg 79 - 93 */
|
||||
code_address_t failed_code_address; /* reg 94 - 95 */
|
||||
data_address_t failed_data_address; /* reg 96 - 97 */
|
||||
uint16_t SU_hits[NUM_SU]; /* reg 98 - 105 */
|
||||
tm_dpu_time_t time; /* reg 106 - 109 */
|
||||
unsigned char software_error; /* reg 110 */
|
||||
unsigned char hit_budget_exceedings; /* reg 111 */
|
||||
unsigned char coefficient[NUM_QCOEFF]; /* reg 112 - 116 */
|
||||
unsigned char not_used; /* reg 117 */
|
||||
|
||||
/* The last register of telemetry data should be 'not_used'. */
|
||||
/* This is necessary for correct operation of telemetry */
|
||||
/* retrieving TCs i.e. number of bytes should be even. */
|
||||
|
||||
} telemetry_data_t;
|
||||
|
||||
extern EXTERNAL telemetry_data_t telemetry_data;
|
||||
|
||||
/* Hit trigger event record : */
|
||||
|
||||
typedef struct {
|
||||
unsigned char quality_number; /* byte 0 */
|
||||
unsigned char classification; /* byte 1 */
|
||||
unsigned char SU_number; /* byte 2 */
|
||||
tm_dpu_time_t hit_time; /* byte 3 - 6 */
|
||||
unsigned char SU_temperature_1; /* byte 7 */
|
||||
unsigned char SU_temperature_2; /* byte 8 */
|
||||
tm_ushort_t plasma_1_plus; /* byte 9 - 10 */
|
||||
tm_ushort_t plasma_1_minus; /* byte 11 - 12 */
|
||||
tm_ushort_t piezo_1; /* byte 13 - 14 */
|
||||
tm_ushort_t piezo_2; /* byte 15 - 16 */
|
||||
tm_ushort_t plasma_2_plus; /* byte 17 - 18 */
|
||||
unsigned char rise_time; /* byte 19 */
|
||||
signed char delay_1; /* byte 20 */
|
||||
tm_ushort_t delay_2; /* byte 21 - 22 */
|
||||
tm_ushort_t delay_3; /* byte 23 - 24 */
|
||||
unsigned char checksum; /* byte 25 */
|
||||
} event_record_t;
|
||||
|
||||
/* Science Data File : */
|
||||
|
||||
typedef struct {
|
||||
unsigned short int length;
|
||||
unsigned char event_counter[NUM_SU][NUM_CLASSES];
|
||||
unsigned char not_used;
|
||||
unsigned char counter_checksum;
|
||||
event_record_t event[MAX_EVENTS];
|
||||
} science_data_file_t;
|
||||
|
||||
extern EXTERNAL science_data_file_t
|
||||
LOCATION( SCIENCE_DATA_START_ADDRESS ) science_data;
|
||||
|
||||
extern uint_least16_t EXTERNAL max_events;
|
||||
/* This variable is used to speed up certain */
|
||||
/* Functional Test by adding the possibility */
|
||||
/* to restrict the amount of events. */
|
||||
/* It is initialised to value MAX_EVENTS at */
|
||||
/* Boot. */
|
||||
|
||||
extern void RecordEvent( void );
|
||||
/* This function increments proper event counter and stores */
|
||||
/* the new event record to the science data memory, if there */
|
||||
/* is free place or events with lower or equal quality number */
|
||||
|
||||
|
||||
extern void ClearEvents( void );
|
||||
/* Cleares the event counters and the quality numbers of */
|
||||
/* the event records in the science data memory */
|
||||
|
||||
#endif
|
||||
39
targets/wasm-tacle/parallel/DEBIE/code/ttc_ctrl.h
Normal file
39
targets/wasm-tacle/parallel/DEBIE/code/ttc_ctrl.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Module : ttc_ctrl.h
|
||||
|
||||
Macros and function prototypes for handling the Telecommand
|
||||
and Telemetry interface.
|
||||
|
||||
Based on the SSF DHI file ttc_ctrl.h, rev 1.11, Sun May 16 09:20:10 1999.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TTC_CTRL_H
|
||||
#define TTC_CTRL_H
|
||||
|
||||
#include "target_ttc_ctrl.h"
|
||||
|
||||
/* TM interrupt service handling */
|
||||
#define TM_ISR_MASK 0x04
|
||||
|
||||
/* Error Status register bits concerning TM/TC interface */
|
||||
|
||||
#define PARITY_ERROR 2
|
||||
#define TC_ERROR 1
|
||||
|
||||
#define TC_OR_PARITY_ERROR (TC_ERROR + PARITY_ERROR)
|
||||
|
||||
#endif
|
||||
45
targets/wasm-tacle/parallel/DEBIE/code/version.h
Normal file
45
targets/wasm-tacle/parallel/DEBIE/code/version.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*------------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1998 : Space Systems Finland Ltd.
|
||||
|
||||
Space Systems Finland Ltd (SSF) allows you to use this version of
|
||||
the DEBIE-I DPU software for the specific purpose and under the
|
||||
specific conditions set forth in the Terms Of Use document enclosed
|
||||
with or attached to this software. In particular, the software
|
||||
remains the property of SSF and you must not distribute the software
|
||||
to third parties without written and signed authorization from SSF.
|
||||
|
||||
System Name: DEBIE DPU SW
|
||||
Subsystem : DAS
|
||||
Module : version.h
|
||||
|
||||
DEBIE SW version and checksum.
|
||||
|
||||
Based on the SSF file version.h, rev 1.30, Wed Feb 23 12:17:32 2000.
|
||||
|
||||
- * --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define SW_VERSION 24
|
||||
/* Software version. Unique for each delivered build of the software. */
|
||||
|
||||
#define CODE_CHECKSUM 0x9F
|
||||
/* This must be set so that the checksum calculated from the code */
|
||||
/* memory becomes zero (this value will then be actually equal to */
|
||||
/* the code checksum when this value would be zero). */
|
||||
/* So the procedure is as follows: */
|
||||
/* 1. Update source code file(s), including SW_VERSION above. */
|
||||
/* 2. Set CODE_CHECKSUM to zero. */
|
||||
/* 3. Compile and link DEBIE into a .hex file. */
|
||||
/* 4. Compute the XOR of the .hex data (using e.g. 'hexor'). */
|
||||
/* 5. Set CODE_CHECKSUM to the value computed in step 3. */
|
||||
/* 6. Recompile and relink DEBIE into a new .hex file. */
|
||||
/* 7. Verify that XOR of the new .hex file is zero. */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
BIN
targets/wasm-tacle/parallel/DEBIE/orig-docs/design_1_4.pdf
Normal file
BIN
targets/wasm-tacle/parallel/DEBIE/orig-docs/design_1_4.pdf
Normal file
Binary file not shown.
BIN
targets/wasm-tacle/parallel/DEBIE/orig-docs/srd_1_3.pdf
Normal file
BIN
targets/wasm-tacle/parallel/DEBIE/orig-docs/srd_1_3.pdf
Normal file
Binary file not shown.
BIN
targets/wasm-tacle/parallel/DEBIE/orig-docs/sum_1_3.pdf
Normal file
BIN
targets/wasm-tacle/parallel/DEBIE/orig-docs/sum_1_3.pdf
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user