23 #define MINUS_POINT 60
25 #define BYTE_TO_WORD 4
27 #define BUFFER_WORDS (MINUS_POINT / BYTE_TO_WORD)
29 #define MIN_SIZE_HEAP 32
35 bool to_print =
false;
55 static inline void terminate(uint result_code) __attribute__((noreturn));
58 vcpu_t *sark_virtual_processor_info = (vcpu_t *) SV_VCPU;
59 uint core = spin1_get_core_id();
60 sark_virtual_processor_info[core].user1 = result_code;
71 if ((
int) ptr >= DTCM_BASE && (
int) ptr <= DTCM_TOP) {
73 log_info(
"freeing 0x%08x from DTCM", ptr);
75 sark_xfree(sark.heap, ptr, ALLOC_LOCK);
78 log_info(
"freeing 0x%08x from SDRAM", ptr);
80 sark_xfree(sv->sdram_heap, ptr, ALLOC_LOCK);
87 void *p = sark_xalloc(sv->sdram_heap, bytes, 0, ALLOC_LOCK);
90 log_error(
"Failed to malloc %u bytes.\n", bytes);
93 log_info(
"Allocated %u bytes from SDRAM at 0x%08x", bytes, p);
104 p = sark_alloc(bytes, 1);
109 }
else if (to_print) {
110 log_info(
"Allocated %u bytes from DTCM at 0x%08x", bytes, p);
Data type definitions for SpiNNaker Neuron-modelling.
SpiNNaker debug header file.
void log_error(const char *message,...)
This function logs errors. Errors usually indicate a serious fault in the program,...
void log_info(const char *message,...)
This function logs informational messages. This is the lowest level of message normally printed.