Hello. I got confused during understanding VTA runtime. There is instructions found into VTA documentation :
There are an “unused” fields into both lower and upper words. But there is no “unused” paddings into vta/include/vta/hw_spec.h: typedef struct { /*! \brief The instruction opcode / uint64_t opcode : VTA_OPCODE_BIT_WIDTH; /! \brief Unused in this instruction / uint64_t pop_prev_dep : 1; /! \brief Pop dependence token from GEMM stage / uint64_t pop_next_dep : 1; /! \brief Unused in this instruction / uint64_t push_prev_dep : 1; /! \brief Push dependence token to GEMM stage / uint64_t push_next_dep : 1; /! \brief Source/destination SRAM for store/load instruction / uint64_t memory_type : VTA_MEMOP_ID_BIT_WIDTH; /! \brief SRAM base address (pointer to memory elem type) / uint64_t sram_base : VTA_MEMOP_SRAM_ADDR_BIT_WIDTH; /! \brief DRAM base address (pointer to memory elem type) / uint64_t dram_base : VTA_MEMOP_DRAM_ADDR_BIT_WIDTH; /! \brief 2D access pattern: y-size / uint64_t y_size : VTA_MEMOP_SIZE_BIT_WIDTH; /! \brief 2D access pattern: cx-size (in terms of memory elements) / uint64_t x_size : VTA_MEMOP_SIZE_BIT_WIDTH; /! \brief 2D access pattern: x-stride (in terms of memory elements) / uint64_t x_stride : VTA_MEMOP_STRIDE_BIT_WIDTH; /! \brief 2D access pattern: start padding along y dimension / uint64_t y_pad_0 : VTA_MEMOP_PAD_BIT_WIDTH; /! \brief 2D access pattern: end padding along y dimension / uint64_t y_pad_1 : VTA_MEMOP_PAD_BIT_WIDTH; /! \brief 2D access pattern: start padding along x dimension / uint64_t x_pad_0 : VTA_MEMOP_PAD_BIT_WIDTH; /! \brief 2D access pattern: end padding along x dimension */ uint64_t x_pad_1 : VTA_MEMOP_PAD_BIT_WIDTH; } VTAMemInsn;
As a result, it seems, that instructions generated don’t have proper bits set. Length if VTAMemInsn is 121 bits instead of 128. However, matrix multiplication example works on simulator. Could you, please, clarify this moment?