Skip to content

Commit

Permalink
Non-self-hosted code was out of sync.
Browse files Browse the repository at this point in the history
When `EE_CFG_SELFHOSTED != 1`, the harness initialized the
the timestamp the wrong way and did not supress all verification
timestamps, which cause failures in both GUI runner programs.

The code has been reverted back to the expected behavior and
validated on the both current versions of (license) GUIs.

* Version 1.0.2.000 energy runner

* Version 1.0.2.001 performance runner

Both GUIs should generate 45 timestamps in both configurations,
`EE_CFG_ENERGY_MODE` set to `0` and `1` with the GUI scripts.
  • Loading branch information
petertorelli committed Aug 3, 2021
1 parent fac5953 commit f66dc1c
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions monitor/th_api/th_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@

#include "th_lib.h"

#if EE_CFG_ENERGY_MODE == 1
#else
extern bool g_verify_mode; // see th_timestamp()
#endif

#if EE_CFG_SELFHOSTED != 1

Expand All @@ -39,9 +36,6 @@ th_timestamp_initialize(void)
// USER CODE 1 END
// Always print this message
th_printf(EE_MSG_TIMESTAMP_MODE);
/* Always call the timestamp on initialize so that the open-drain output
is set to "1" (so that we catch a falling edge) */
th_timestamp();
}

/**
Expand All @@ -53,23 +47,20 @@ th_timestamp_initialize(void)
void
th_timestamp(void)
{
// Don't print timestamps during verification mode!
if (g_verify_mode != 0)
{
return;
}
#warning "th_timestamp() not implemented"
#if EE_CFG_ENERGY_MODE==1
// 1. pull pin low
// 2. wait at least 62.5ns
// 3. set pin high
#else
// Don't print timestamps during verification mode!
if (g_verify_mode != 0)
{
return;
}
else
{
uint32_t elapsedMicroSeconds = 0;
// Print out the timestamp in this exact format:
th_printf(EE_MSG_TIMESTAMP, elapsedMicroSeconds);
}
uint32_t elapsedMicroSeconds = 0;
// Print out the timestamp in this exact format:
th_printf(EE_MSG_TIMESTAMP, elapsedMicroSeconds);
#endif
}

Expand Down

0 comments on commit f66dc1c

Please sign in to comment.