Skip to content

Commit

Permalink
Revert "change macro BANSHEE_SIMULATION to SIMULATORS"
Browse files Browse the repository at this point in the history
This reverts commit 3d81eb3.

	#
  • Loading branch information
tahaelbayad committed Dec 18, 2024
1 parent 7db6f83 commit 847c83e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
_dumpCycleCntTemplate = NodeTemplate("""
snrt_cluster_hw_barrier();
if (snrt_is_dm_core()) {
#ifndef SIMULATORS
#ifndef EMULATORS
DUMP(getCycles());
#else
printf("${position} of ${nodeName} block at cycle %d \\n", getCycles());
Expand Down
14 changes: 7 additions & 7 deletions DeeployTest/Platforms/MemPool/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "testinputs.h"
#include "testoutputs.h"

#ifndef SIMULATORS
#ifndef BANSHEE_SIMULATION
dump(timer_cycle, 0);
dump(timer_instr, 1);
dump(expected, 2);
Expand All @@ -61,7 +61,7 @@ int main() {

mempool_timer_t instr_init, instr_end;
mempool_timer_t timer_init, timer_end;
#ifdef SIMULATORS
#ifdef BANSHEE_SIMULATION
uint32_t const num_cores = NUM_THREADS;
#else
uint32_t const num_cores = mempool_get_core_count();
Expand All @@ -72,7 +72,7 @@ int main() {
// Initialize synchronization variables
mempool_barrier_init(core_id, num_cores);

#ifdef SIMULATORS
#ifdef BANSHEE_SIMULATION
if (core_id == num_cores - 1) {
printf("Network running on %ld of %ld cores\r\n", num_cores,
mempool_get_core_count());
Expand All @@ -82,7 +82,7 @@ int main() {
// Wait until initialization is done
mempool_barrier(num_cores);

#ifdef SIMULATORS
#ifdef BANSHEE_SIMULATION
if (core_id == 0) {
printf("Init network...\r\n");
}
Expand All @@ -96,7 +96,7 @@ int main() {
mempool_barrier(num_cores);

if (core_id == 0) {
#if SIMULATORS
#if BANSHEE_SIMULATION
for (uint32_t buf = 0; buf < DeeployNetwork_num_inputs; buf++) {
memcpy(DeeployNetwork_inputs[buf], testInputVector[buf],
DeeployNetwork_inputs_bytes[buf]);
Expand All @@ -115,7 +115,7 @@ int main() {
// Wait until initialization is done
mempool_barrier(num_cores);

#ifdef SIMULATORS
#ifdef BANSHEE_SIMULATION
if (core_id == 0) {
for (uint32_t buf = 0; buf < DeeployNetwork_num_inputs; buf++) {
printf("testInputVector%d @ %p\r\n", buf, testInputVector[buf]);
Expand Down Expand Up @@ -155,7 +155,7 @@ int main() {
int32_t diff;
int32_t expected, actual;

#ifdef SIMULATORS
#ifdef BANSHEE_SIMULATION
uint32_t tot = 0;
// Sequential part executed by all cores
if (core_id != 0) {
Expand Down
10 changes: 5 additions & 5 deletions DeeployTest/Platforms/Snitch/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(void) {
uint32_t core_id = snrt_global_core_idx();
uint32_t compute_core_id = snrt_global_compute_core_idx();

#ifdef SIMULATORS
#ifdef EMULATORS
uint32_t const num_compute_cores = (NUM_CORES - 1);
#else
uint32_t const num_compute_cores = snrt_global_compute_core_num();
Expand Down Expand Up @@ -98,23 +98,23 @@ int main(void) {

snrt_cluster_hw_barrier();

#ifndef SIMULATORS
#ifndef EMULATORS
if (snrt_is_dm_core()) {
ResetTimer();
StartTimer();
}
#endif // SIMULATORS
#endif // EMULATORS

RunNetwork(compute_core_id, num_compute_cores);

uint32_t runtimeCycles = 0;
#ifndef SIMULATORS
#ifndef EMULATORS
if (snrt_is_dm_core()) {
runtimeCycles = getCycles();
DUMP(runtimeCycles);
StopTimer();
}
#endif // SIMULATORS
#endif // EMULATORS

snrt_cluster_hw_barrier();

Expand Down
2 changes: 1 addition & 1 deletion cmake/simulation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set(banshee_stack_size 16777216 CACHE STRING "Stack size of banshee threads")
OPTION(banshee_simulation "Optimize binary for banshee simulation" OFF)
OPTION(gvsoc_simulation "adapt preprocessor macro for gvsoc simulation" OFF)
if(banshee_simulation OR gvsoc_simulation)
add_compile_definitions(SIMULATORS)
add_compile_definitions(EMULATORS)
endif()

#########################
Expand Down

0 comments on commit 847c83e

Please sign in to comment.