diff --git a/sw/snRuntime/src/alloc_v2.h b/sw/snRuntime/src/alloc_v2.h index db6a2916bf..2ca18b802d 100644 --- a/sw/snRuntime/src/alloc_v2.h +++ b/sw/snRuntime/src/alloc_v2.h @@ -5,7 +5,7 @@ /** * @file * @brief Defines functions to dynamically allocate the cluster's L1 memory. - * + * * This file provides functions to dynamically allocate the cluster's L1 * memory. It includes functions for allocating memory for cluster-local * variables, compute core-local variables, and for manipulating pointers to @@ -16,21 +16,21 @@ extern __thread snrt_allocator_t l1_allocator_v2; /** * @brief Get a pointer to the L1 allocator. - * + * * @return Pointer to the L1 allocator. */ inline snrt_allocator_t *snrt_l1_allocator_v2() { return &l1_allocator_v2; } /** * @brief Get the next pointer of the L1 allocator. - * + * * @return The next pointer of the L1 allocator. */ inline void *snrt_l1_next_v2() { return (void *)snrt_l1_allocator_v2()->next; } /** * @brief Override the L1 allocator next pointer. - * + * * @param next The new value for the next pointer. */ inline void snrt_l1_update_next_v2(void *next) { @@ -48,11 +48,11 @@ inline void snrt_l1_alloc_check_bounds() { /** * @brief Allocate space for a variable in the cluster's L1 memory. - * + * * This function dynamically allocates space for a variable of size `size` in * the cluster's L1 memory. * The allocation is aligned to the specified `alignment`. - * + * * @param size The size of the variable to allocate. * @param alignment The alignment of the allocation. * @return Pointer to the allocated variable. @@ -68,12 +68,12 @@ inline void *snrt_l1_alloc_cluster_local(size_t size, const size_t alignment) { /** * @brief Allocate space for N variables in the cluster's L1 memory. - * + * * This function dynamically allocates space for N variables of size `size` in * the cluster's L1 memory, where N is the number of compute cores in the * cluster. The variables are allocated in a contiguous block of memory. * The whole block is aligned to the specified `alignment`. - * + * * @param size The size of each variable to allocate. * @param alignment The alignment of the allocation. * @return Pointer to the allocated variable for each compute core. @@ -91,12 +91,12 @@ inline void *snrt_l1_alloc_compute_core_local(size_t size, /** * @brief Get a pointer to the same variable allocated by another core. - * + * * This function takes a pointer to a variable allocated using * `snrt_l1_alloc_compute_core_local` and returns a pointer to the same * variable allocated by another core, as specified by `core_idx`. * The `size` argument should be the same used during allocation. - * + * * @param ptr Pointer to the variable allocated by the current core. * @param core_idx Index of the core that allocated the variable. * @param size The size of the variable. @@ -110,11 +110,11 @@ inline void *snrt_compute_core_local_ptr(void *ptr, uint32_t core_idx, /** * @brief Get a pointer to the same offset in another cluster's L1 memory. - * + * * This function takes a pointer to a variable in the calling (source) * cluster's L1 memory and returns a pointer to the same offset in the target * (destination) cluster's L1 memory. - * + * * @param ptr Pointer to the variable in the source cluster's L1 memory. * @param src_cluster_idx Index of the source cluster. * @param dst_cluster_idx Index of the destination cluster. @@ -128,10 +128,10 @@ inline void *snrt_remote_l1_ptr(void *ptr, uint32_t src_cluster_idx, /** * @brief Initialize the L1 allocator. - * + * * This function initializes the L1 allocator by calculating the end address * of the heap and setting the base, end, and next pointers of the allocator. - * + * * @note This function should be called before using any of the allocation * functions. */ diff --git a/sw/snRuntime/src/dma.h b/sw/snRuntime/src/dma.h index e8147be7d0..3638053465 100644 --- a/sw/snRuntime/src/dma.h +++ b/sw/snRuntime/src/dma.h @@ -24,7 +24,6 @@ ((funct7 << 25) | (rs2 << 20) | (rs1 << 15) | (funct3 << 12) | (rd << 7) | \ (opcode)) - /// A DMA transfer identifier. typedef uint32_t snrt_dma_txid_t; diff --git a/sw/snRuntime/src/ssr.h b/sw/snRuntime/src/ssr.h index f932fd2ab5..7c06924c24 100644 --- a/sw/snRuntime/src/ssr.h +++ b/sw/snRuntime/src/ssr.h @@ -35,9 +35,9 @@ inline void snrt_fpu_fence() { * @brief The different SSRs. */ enum snrt_ssr_dm { - SNRT_SSR_DM0 = 0, /**< SSR data mover 0 */ - SNRT_SSR_DM1 = 1, /**< SSR data mover 1 */ - SNRT_SSR_DM2 = 2, /**< SSR data mover 2 */ + SNRT_SSR_DM0 = 0, /**< SSR data mover 0 */ + SNRT_SSR_DM1 = 1, /**< SSR data mover 1 */ + SNRT_SSR_DM2 = 2, /**< SSR data mover 2 */ SNRT_SSR_DM_ALL = 31 /**< Write to all SSRs */ }; @@ -48,19 +48,19 @@ enum snrt_ssr_dim { SNRT_SSR_1D = 0, /**< 1D stream */ SNRT_SSR_2D = 1, /**< 2D stream */ SNRT_SSR_3D = 2, /**< 3D stream */ - SNRT_SSR_4D = 3 /**< 4D stream */ + SNRT_SSR_4D = 3 /**< 4D stream */ }; /** * @brief The SSR configuration registers. */ enum { - REG_STATUS = 0, /**< SSR status register */ - REG_REPEAT = 1, /**< SSR repeat register */ - REG_BOUNDS = 2, /**< SSR bounds register */ + REG_STATUS = 0, /**< SSR status register */ + REG_REPEAT = 1, /**< SSR repeat register */ + REG_BOUNDS = 2, /**< SSR bounds register */ REG_STRIDES = 6, /**< SSR strides register */ - REG_RPTR = 24, /**< SSR read pointer register */ - REG_WPTR = 28 /**< SSR write pointer register */ + REG_RPTR = 24, /**< SSR read pointer register */ + REG_WPTR = 28 /**< SSR write pointer register */ }; /** @@ -92,7 +92,6 @@ inline void snrt_ssr_disable() { * @return The value of the register. */ inline uint32_t read_ssr_cfg(uint32_t reg, uint32_t dm) { - uint32_t value; asm volatile("scfgri %[value], %[dm] | %[reg]<<5\n" : [ value ] "=r"(value) diff --git a/sw/snRuntime/src/team.h b/sw/snRuntime/src/team.h index ebdaf34d55..560fff7cdf 100644 --- a/sw/snRuntime/src/team.h +++ b/sw/snRuntime/src/team.h @@ -4,11 +4,13 @@ /** * @file - * @brief This file contains functions and macros related to Snitch team management. + * @brief This file contains functions and macros related to Snitch team + * management. * - * The functions in this file provide information about the Snitch hardware configuration, - * such as the number of clusters, cores per cluster, and the current core's index within - * the system. These functions can be used for team management and core-specific operations. + * The functions in this file provide information about the Snitch hardware + * configuration, such as the number of clusters, cores per cluster, and the + * current core's index within the system. These functions can be used for team + * management and core-specific operations. */ #pragma once