Add wasm tacle-bench targets
This commit is contained in:
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;
|
||||
}
|
||||
Reference in New Issue
Block a user