Tex CSRs write support added

This commit is contained in:
Krishna Yalamarthy
2021-03-13 22:01:25 -05:00
parent f3f62e9e7b
commit a953fe4e1e
14 changed files with 166 additions and 7 deletions

View File

@@ -3,6 +3,8 @@
#define KERNEL_ARG_DEV_MEM_ADDR 0x7ffff000
// #include <vortex.h>
struct kernel_arg_t {
uint32_t num_tasks;
uint32_t task_size;

Binary file not shown.

View File

@@ -141,6 +141,7 @@ int main(int argc, char *argv[]) {
kernel_arg.num_tasks = num_tasks;
kernel_arg.task_size = count;
kernel_arg.device_ptr = device;
std::cout << "dev_src0=" << std::hex << kernel_arg.src0_ptr << std::endl;
std::cout << "dev_src1=" << std::hex << kernel_arg.src1_ptr << std::endl;

View File

@@ -14,7 +14,9 @@ void kernel_body(int task_id, void* arg) {
unsigned u = 1;
unsigned v = 1;
unsigned t = 1;
// vx_csr_set(_arg->device_ptr, 0, 0xfd0, 0xffd);
uint32_t offset = task_id * count;
for (uint32_t i = 0; i < count; ++i) {