Skip to content

Commit

Permalink
Fix software.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed May 5, 2024
1 parent 8ffa237 commit c64d63d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions sw/redmule.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main() {
uint8_t *w = w_inp;
uint8_t *y = y_inp;
uint8_t *z = z_oup; // golden_out //1c010000
uint32_t *gold;
uint32_t *gold = golden;

uint8_t float_fmt = (SRC_FMT == FP8) ? (uint8_t)Float8
: (SRC_FMT == FP8ALT) ? (uint8_t)Float8Alt
Expand All @@ -36,9 +36,6 @@ int main() {

int golden_size = (float_fmt == (Float8 | Float8Alt)) ? m_size*k_size/4 : m_size*k_size/2;

for (int i = 0; i < golden_size; i++)
*(gold + i) = golden[i];

volatile int errors = 0;
int gold_sum = 0, check_sum = 0;
int i, j;
Expand Down
8 changes: 4 additions & 4 deletions sw/utils/redmule_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) {
errors += error;

#ifdef DEBUG
tfp_printf("Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word);
tfp_printf("Golden: 0x%08lx @ 0x%08ln; Actual: 0x%08lx @ 0x%08ln,\n", golden_word, (golden_z + i), actual_word, (actual_z + i));
#endif

#ifdef VERBOSE
if (error) {
if (errors == 1) tfp_printf(" golden <- actual @ address @ index\n");
tfp_printf("0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z + i),
tfp_printf("0x%08lx <- 0x%08lx @ 0x%08ln @ 0x%08x\n", golden_word, actual_word, (actual_z + i),
i * 4);
}
#endif
Expand Down Expand Up @@ -170,13 +170,13 @@ int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int m, int k) {
errors += error;

#ifdef DEBUG
tfp_printf("Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word);
tfp_printf("Golden: 0x%08x @ 0x%08x; Actual: 0x%08x @ 0x%08x,\n", golden_word, (golden_z + i), actual_word, (actual_z + i));
#endif

#ifdef VERBOSE
if (error) {
if (errors == 1) tfp_printf(" golden <- actual @ address @ index\n");
tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z + i),
tfp_printf(" 0x%x <- 0x%x @ 0x%x @ 0x%x\n", golden_word, actual_word, (actual_z + i),
i * 4);
}
#endif
Expand Down

0 comments on commit c64d63d

Please sign in to comment.