WATERS_UNSYNCHRONIZED
This commit is contained in:
parent
b9f51f80fc
commit
ce132131b3
@ -36,10 +36,10 @@
|
|||||||
#define DO_TIME(X,Y) WASTE_USEC((X))
|
#define DO_TIME(X,Y) WASTE_USEC((X))
|
||||||
|
|
||||||
#ifdef INSERT_WC
|
#ifdef INSERT_WC
|
||||||
#define DEBUG_VAL(X,D) (D)
|
#define DEBUG_VAL(X,D) (D+0*X)
|
||||||
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_USEC(UB)
|
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_USEC(UB)
|
||||||
#else
|
#else
|
||||||
#define DEBUG_VAL(X,D) (X)
|
#define DEBUG_VAL(X,D) ((X)+(D)*0)
|
||||||
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_USEC(CLAMP(X,LB,UB))
|
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_USEC(CLAMP(X,LB,UB))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,13 +34,19 @@
|
|||||||
#include "fuzzhelper.c"
|
#include "fuzzhelper.c"
|
||||||
|
|
||||||
#ifdef INSERT_WC
|
#ifdef INSERT_WC
|
||||||
#define DEBUG_VAL(X,D) (D)
|
#define DEBUG_VAL(X,D) (D+0*X)
|
||||||
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_NSEC(UB)
|
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_NSEC((X)*0+UB)
|
||||||
#else
|
#else
|
||||||
#define DEBUG_VAL(X,D) (X)
|
#define DEBUG_VAL(X,D) (X+0*D)
|
||||||
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_NSEC(CLAMP(X,LB,UB))
|
#define WCET_CLAMP(X, LB, UB, LABEL) WASTE_NSEC(CLAMP(X,LB,UB))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WATERS_UNSYNCHRONIZED
|
||||||
|
#define NOTIFY_WAIT_TIME 0
|
||||||
|
#else
|
||||||
|
#define NOTIFY_WAIT_TIME portMAX_DELAY
|
||||||
|
#endif
|
||||||
|
|
||||||
static void prvTaskC21( void * pvParameters );
|
static void prvTaskC21( void * pvParameters );
|
||||||
static void prvTaskC22( void * pvParameters );
|
static void prvTaskC22( void * pvParameters );
|
||||||
static void prvTaskC32( void * pvParameters );
|
static void prvTaskC32( void * pvParameters );
|
||||||
@ -419,7 +425,7 @@ static void prvTaskC12( void * pvParameters ) {
|
|||||||
// Output: g(x) = x % 8 == y
|
// Output: g(x) = x % 8 == y
|
||||||
// WC Input: x = 12000, y = 0
|
// WC Input: x = 12000, y = 0
|
||||||
uint16_t x = INPUT_SHORT_NEXT;
|
uint16_t x = INPUT_SHORT_NEXT;
|
||||||
int y = ulTaskNotifyTake(pdTRUE, portMAX_DELAY)-1;
|
int y = ulTaskNotifyTake(pdTRUE, NOTIFY_WAIT_TIME)-1;
|
||||||
xTaskNotify(xTaskC13, DEBUG_VAL((x % 8 == y) + 1, 2), eSetValueWithOverwrite);
|
xTaskNotify(xTaskC13, DEBUG_VAL((x % 8 == y) + 1, 2), eSetValueWithOverwrite);
|
||||||
volatile int torun = 0;
|
volatile int torun = 0;
|
||||||
if (x % 8 == y) {
|
if (x % 8 == y) {
|
||||||
@ -451,7 +457,7 @@ static void prvTaskC13( void * pvParameters ) {
|
|||||||
// WC Input: x = 65535 , y = 1 for "short" run
|
// WC Input: x = 65535 , y = 1 for "short" run
|
||||||
// globally, short runs consume more time in subsequent jobs
|
// globally, short runs consume more time in subsequent jobs
|
||||||
volatile uint32_t x = INPUT_SHORT_NEXT;
|
volatile uint32_t x = INPUT_SHORT_NEXT;
|
||||||
int y = ulTaskNotifyTake(pdTRUE, portMAX_DELAY)-1;
|
int y = ulTaskNotifyTake(pdTRUE, NOTIFY_WAIT_TIME)-1;
|
||||||
volatile int do_short_run = (y + ((x%100)<=5)) == 1; // XOR
|
volatile int do_short_run = (y + ((x%100)<=5)) == 1; // XOR
|
||||||
xTaskNotify(xTaskC14, DEBUG_VAL(do_short_run+1, 2), eSetValueWithOverwrite);
|
xTaskNotify(xTaskC14, DEBUG_VAL(do_short_run+1, 2), eSetValueWithOverwrite);
|
||||||
int torun = 0;
|
int torun = 0;
|
||||||
@ -482,7 +488,7 @@ static void prvTaskC14( void * pvParameters ) {
|
|||||||
// Exectime: f(x,y) = if y ? c1+2*x : c2-x
|
// Exectime: f(x,y) = if y ? c1+2*x : c2-x
|
||||||
// longmax - shortmax: 76955
|
// longmax - shortmax: 76955
|
||||||
volatile uint32_t x = INPUT_SHORT_NEXT;
|
volatile uint32_t x = INPUT_SHORT_NEXT;
|
||||||
int y = ulTaskNotifyTake(pdTRUE, portMAX_DELAY)-1;
|
int y = ulTaskNotifyTake(pdTRUE, NOTIFY_WAIT_TIME)-1;
|
||||||
volatile int torun = 0;
|
volatile int torun = 0;
|
||||||
if (y) {
|
if (y) {
|
||||||
torun = x*3;
|
torun = x*3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user