Skip to content

Commit

Permalink
Adapt addressability test to tapeout configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed Mar 23, 2024
1 parent 02d7cef commit 72d1218
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions sw/tests/bare-metal/hostd/addressability_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,41 +144,41 @@ int main(void) {

// Init the HW
// Safety Island
car_enable_domain(CAR_SAFETY_RST);
// car_enable_domain(CAR_SAFETY_RST);

// PULP Island
car_enable_domain(CAR_PULP_RST);

// Spatz Island
car_enable_domain(CAR_SPATZ_RST);
// car_enable_domain(CAR_SPATZ_RST);

int errors = 0;

// Probe an address range with pseudo-random values and read after each write
// (wrwr)

// L2 shared memory
errors += probe_range_lfsr_wrwr((uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_BASE_ADDR(car_l2_intl_1),
(uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_END_ADDR(car_l2_intl_1), N_SAMPLES);
if (errors) {
char str[] = "1\n";
diyprintf(str, sizeof(str));
}

errors += probe_range_lfsr_wrwr((uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_BASE_ADDR(car_l2_cont_1),
(uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_END_ADDR(car_l2_cont_1), N_SAMPLES);
if (errors) {
char str[] = "2\n";
diyprintf(str, sizeof(str));
}
// errors += probe_range_lfsr_wrwr((uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_BASE_ADDR(car_l2_intl_1),
// (uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_END_ADDR(car_l2_intl_1), N_SAMPLES);
// if (errors) {
// char str[] = "1\n";
// diyprintf(str, sizeof(str));
// }

// errors += probe_range_lfsr_wrwr((uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_BASE_ADDR(car_l2_cont_1),
// (uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_END_ADDR(car_l2_cont_1), N_SAMPLES);
// if (errors) {
// char str[] = "2\n";
// diyprintf(str, sizeof(str));
// }

// Safety Island
errors += probe_range_lfsr_wrwr((uint64_t *)CAR_SAFETY_ISLAND_SPM_BASE_ADDR(car_safety_island),
(uint64_t *)CAR_SAFETY_ISLAND_SPM_END_ADDR(car_safety_island), N_SAMPLES);
if (errors) {
char str[] = "3\n";
diyprintf(str, sizeof(str));
}
// errors += probe_range_lfsr_wrwr((uint64_t *)CAR_SAFETY_ISLAND_SPM_BASE_ADDR(car_safety_island),
// (uint64_t *)CAR_SAFETY_ISLAND_SPM_END_ADDR(car_safety_island), N_SAMPLES);
// if (errors) {
// char str[] = "3\n";
// diyprintf(str, sizeof(str));
// }
// Integer Cluster
errors += probe_range_lfsr_wrwr((uint64_t *)CAR_INT_CLUSTER_SPM_BASE_ADDR(car_integer_cluster), (uint64_t *)CAR_INT_CLUSTER_SPM_END_ADDR(car_integer_cluster),
N_SAMPLES);
Expand All @@ -193,38 +193,38 @@ int main(void) {
diyprintf(str, sizeof(str));
}
// FP Cluster
errors += probe_range_lfsr_wrwr((uint64_t *)CAR_FP_CLUSTER_SPM_BASE_ADDR(car_spatz_cluster), (uint64_t *)CAR_FP_CLUSTER_SPM_END_ADDR(car_spatz_cluster),
N_SAMPLES);
if (errors) {
char str[] = "6\n";
diyprintf(str, sizeof(str));
}
// errors += probe_range_lfsr_wrwr((uint64_t *)CAR_FP_CLUSTER_SPM_BASE_ADDR(car_spatz_cluster), (uint64_t *)CAR_FP_CLUSTER_SPM_END_ADDR(car_spatz_cluster),
// N_SAMPLES);
// if (errors) {
// char str[] = "6\n";
// diyprintf(str, sizeof(str));
// }
// TODO Mailboxes

// Probe an address space with pseudo-random values and read all after
// writing (wwrr)

// L2 shared memory
errors += probe_range_lfsr_wwrr((uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_BASE_ADDR(car_l2_intl_1),
(uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_END_ADDR(car_l2_intl_1), N_SAMPLES);
if (errors) {
char str[] = "7\n";
diyprintf(str, sizeof(str));
}
errors += probe_range_lfsr_wwrr((uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_BASE_ADDR(car_l2_cont_1),
(uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_END_ADDR(car_l2_cont_1), N_SAMPLES);
if (errors) {
char str[] = "8\n";
diyprintf(str, sizeof(str));
}
// errors += probe_range_lfsr_wwrr((uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_BASE_ADDR(car_l2_intl_1),
// (uint64_t *)CAR_L2_SPM_PORT1_INTERLEAVED_END_ADDR(car_l2_intl_1), N_SAMPLES);
// if (errors) {
// char str[] = "7\n";
// diyprintf(str, sizeof(str));
// }
// errors += probe_range_lfsr_wwrr((uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_BASE_ADDR(car_l2_cont_1),
// (uint64_t *)CAR_L2_SPM_PORT1_CONTIGUOUS_END_ADDR(car_l2_cont_1), N_SAMPLES);
// if (errors) {
// char str[] = "8\n";
// diyprintf(str, sizeof(str));
// }

// Safety Island
errors += probe_range_lfsr_wwrr((uint64_t *)CAR_SAFETY_ISLAND_SPM_BASE_ADDR(car_safety_island),
(uint64_t *)CAR_SAFETY_ISLAND_SPM_END_ADDR(car_safety_island), N_SAMPLES);
if (errors) {
char str[] = "9\n";
diyprintf(str, sizeof(str));
}
// errors += probe_range_lfsr_wwrr((uint64_t *)CAR_SAFETY_ISLAND_SPM_BASE_ADDR(car_safety_island),
// (uint64_t *)CAR_SAFETY_ISLAND_SPM_END_ADDR(car_safety_island), N_SAMPLES);
// if (errors) {
// char str[] = "9\n";
// diyprintf(str, sizeof(str));
// }
// Integer Cluster
errors += probe_range_lfsr_wwrr((uint64_t *)CAR_INT_CLUSTER_SPM_BASE_ADDR(car_integer_cluster), (uint64_t *)CAR_INT_CLUSTER_SPM_END_ADDR(car_integer_cluster),
N_SAMPLES);
Expand All @@ -239,12 +239,12 @@ int main(void) {
diyprintf(str, sizeof(str));
}
// FP Cluster
errors += probe_range_lfsr_wrwr((uint64_t *)CAR_FP_CLUSTER_SPM_BASE_ADDR(car_spatz_cluster), (uint64_t *)CAR_FP_CLUSTER_SPM_END_ADDR(car_spatz_cluster),
N_SAMPLES);
if (errors) {
char str[] = "c\n";
diyprintf(str, sizeof(str));
}
// errors += probe_range_lfsr_wrwr((uint64_t *)CAR_FP_CLUSTER_SPM_BASE_ADDR(car_spatz_cluster), (uint64_t *)CAR_FP_CLUSTER_SPM_END_ADDR(car_spatz_cluster),
// N_SAMPLES);
// if (errors) {
// char str[] = "c\n";
// diyprintf(str, sizeof(str));
// }
// TODO Mailboxes

return errors;
Expand Down

0 comments on commit 72d1218

Please sign in to comment.