diff --git a/raven_spn/raven_spn b/raven_spn/raven_spn index 33efa25..cb16d40 100755 Binary files a/raven_spn/raven_spn and b/raven_spn/raven_spn differ diff --git a/raven_spn/src/raven_spn.cpp b/raven_spn/src/raven_spn.cpp index a9891a7..e23b5ab 100644 --- a/raven_spn/src/raven_spn.cpp +++ b/raven_spn/src/raven_spn.cpp @@ -14,8 +14,10 @@ void run_xspn1(int in_addr, int out_addr, int num_samples, int in_beats, int out spn_1::output_addr_reg() = out_addr; spn_1::num_of_in_beats_reg() = in_beats; // Number of AXI4 burst beats needed to load all input data spn_1::num_of_out_beats_reg() = out_beats; // Number of AXI4 burst beats needed to store all result data - spn_1::start_reg() = 1; + asm volatile ("csrrc x0, mie, %0; nop; nop" : : "r"(MIP_MEIP)); // Disable interrupts printf("Starting first XSPN instance\n"); + asm volatile ("csrrs x0, mie, %0; nop" : : "r"(MIP_MEIP)); // Enable interrupts + spn_1::start_reg() = 1; } void run_xspn2(int in_addr, int out_addr, int num_samples, int in_beats, int out_beats) { @@ -25,7 +27,9 @@ void run_xspn2(int in_addr, int out_addr, int num_samples, int in_beats, int out spn_2::output_addr_reg() = out_addr; spn_2::num_of_in_beats_reg() = in_beats; // Number of AXI4 burst beats needed to load all input data spn_2::num_of_out_beats_reg() = out_beats; // Number of AXI4 burst beats needed to store all result data + asm volatile ("csrrc x0, mie, %0; nop; nop" : : "r"(MIP_MEIP)); // Disable interrupts printf("Starting second XSPN instance\n"); + asm volatile ("csrrs x0, mie, %0; nop" : : "r"(MIP_MEIP)); // Enable interrupts spn_2::start_reg() = 1; }