Skip to content

Commit d561ecf

Browse files
author
Yvan Tortorella
committed
Fix software.
1 parent 8ffa237 commit d561ecf

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

sw/redmule.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int main() {
2626
uint8_t *w = w_inp;
2727
uint8_t *y = y_inp;
2828
uint8_t *z = z_oup; // golden_out //1c010000
29-
uint32_t *gold;
29+
uint32_t *gold = golden;
3030

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

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

39-
for (int i = 0; i < golden_size; i++)
40-
*(gold + i) = golden[i];
41-
4239
volatile int errors = 0;
4340
int gold_sum = 0, check_sum = 0;
4441
int i, j;

sw/utils/redmule_utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) {
6666
errors += error;
6767

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

7272
#ifdef VERBOSE
7373
if (error) {
7474
if (errors == 1) tfp_printf(" golden <- actual @ address @ index\n");
75-
tfp_printf("0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z + i),
75+
tfp_printf("0x%08lx <- 0x%08lx @ 0x%08ln @ 0x%08x\n", golden_word, actual_word, (actual_z + i),
7676
i * 4);
7777
}
7878
#endif
@@ -170,13 +170,13 @@ int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int m, int k) {
170170
errors += error;
171171

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

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

0 commit comments

Comments
 (0)