Fixed most of the cache issues, mat_add left
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
COMP = /opt/riscv-new/drops/bin/riscv32-unknown-elf-gcc
|
||||
COMP = /opt/riscv-new/drops/bin/riscv32-unknown-elf-g++
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostdlib
|
||||
|
||||
DMP = /opt/riscv-new/drops/bin/riscv32-unknown-elf-objdump
|
||||
|
||||
@@ -52,7 +52,7 @@ int main()
|
||||
// Main is called with all threads active of warp 0
|
||||
vx_tmc(1);
|
||||
|
||||
vx_print_str("Let's start...\n");
|
||||
vx_print_str("Let's start... (This might take a while)\n");
|
||||
unsigned what[36];
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
@@ -98,31 +98,31 @@ int main()
|
||||
|
||||
}
|
||||
|
||||
vx_print_str("vx_spawnWarps mat_add_kernel\n");
|
||||
// vx_print_str("vx_spawnWarps mat_add_kernel\n");
|
||||
|
||||
mat_add_args_t arguments;
|
||||
arguments.x = x;
|
||||
arguments.y = y;
|
||||
arguments.z = z;
|
||||
arguments.numColums = 4;
|
||||
arguments.numRows = 4;
|
||||
// mat_add_args_t arguments;
|
||||
// arguments.x = x;
|
||||
// arguments.y = y;
|
||||
// arguments.z = z;
|
||||
// arguments.numColums = 4;
|
||||
// arguments.numRows = 4;
|
||||
|
||||
|
||||
int numWarps = 4;
|
||||
int numThreads = 4;
|
||||
// int numWarps = 4;
|
||||
// int numThreads = 4;
|
||||
|
||||
vx_spawnWarps(numWarps, numThreads, mat_add_kernel, &arguments);
|
||||
// vx_spawnWarps(numWarps, numThreads, mat_add_kernel, &arguments);
|
||||
|
||||
for (int i = 0; i < arguments.numRows; i++)
|
||||
{
|
||||
for (int j = 0; j < arguments.numColums; j++)
|
||||
{
|
||||
unsigned index = (i * arguments.numColums) + j;
|
||||
vx_print_hex(z[index]);
|
||||
vx_print_str(" ");
|
||||
}
|
||||
vx_print_str("\n");
|
||||
}
|
||||
// for (int i = 0; i < arguments.numRows; i++)
|
||||
// {
|
||||
// for (int j = 0; j < arguments.numColums; j++)
|
||||
// {
|
||||
// unsigned index = (i * arguments.numColums) + j;
|
||||
// vx_print_hex(z[index]);
|
||||
// vx_print_str(" ");
|
||||
// }
|
||||
// vx_print_str("\n");
|
||||
// }
|
||||
|
||||
return 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -17,27 +17,34 @@
|
||||
.global _start
|
||||
.type _start, @function
|
||||
_start:
|
||||
# Initialize SP
|
||||
# la sp, __stack_top
|
||||
# li a0, 4
|
||||
# .word 0x0005006b # tmc 4
|
||||
# csrr a2, 0x20 # get tid
|
||||
# slli a2, a2, 2
|
||||
# la a3, 0x80000000
|
||||
# add a3, a3, a2
|
||||
# lw a4, 0(a3)
|
||||
la a1, vx_set_sp
|
||||
li a0, 4
|
||||
.word 0x00b5106b # wspawn a0(numWarps), a1(PC SPAWN)
|
||||
jal vx_set_sp
|
||||
##########################################
|
||||
# li a0, 1
|
||||
# .word 0x0005006b # tmc 1
|
||||
# Initialize global pointerp
|
||||
# call __cxx_global_var_init
|
||||
# Clear the bss segment
|
||||
# la a0, _edata
|
||||
# la a2, _end
|
||||
# sub a2, a2, a0
|
||||
# li a1, 0
|
||||
# call memset
|
||||
# la a0, __libc_fini_array # Register global termination functions
|
||||
# call atexit # to be called upon exit
|
||||
# call __libc_init_array # Run global initialization functions
|
||||
# li a0, 4
|
||||
# .word 0x0005006b # tmc 4
|
||||
# # Initialize global pointerp
|
||||
# call __cxx_global_var_init
|
||||
# # Clear the bss segment
|
||||
# la a0, _edata
|
||||
# la a2, _end
|
||||
# sub a2, a2, a0
|
||||
# li a1, 0
|
||||
# call memset
|
||||
# la a0, __libc_fini_array # Register global termination functions
|
||||
# call atexit # to be called upon exit
|
||||
# call __libc_init_array # Run global initialization functions
|
||||
li a0, 4
|
||||
.word 0x0005006b # tmc 4
|
||||
##############################################
|
||||
call main
|
||||
tail exit
|
||||
.size _start, .-_start
|
||||
|
||||
Reference in New Issue
Block a user