Skip to content

Purdue-SoCET/amp-gemm-compilation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@author Sooraj Chetput V., Fan Jing Hoon

riscv64-unknown-elf-gcc \
  -march=rv32i -mabi=ilp32 \
  -Wl,-EL -Wl,-m,elf32lriscv \
  -nostartfiles -nostdlib \
  -O2 \
  -o main.elf main.c amp_def.h matrix_alloc.h matrix_init.h

is what you use to compile the elf file.

Give's the dissassembly.

riscv64-unknown-elf-objdump -D main.elf > temp.txt 

Convert ELF to raw binary

riscv64-unknown-elf-objcopy -O binary main.elf main.bin

might be useful for simulations.

riscv64-unknown-elf-objcopy -O ihex main.elf main.hex

main.c # Top-level test program amp_def.h # Inline assembly + encoding macros matrix_alloc.h # Memory allocation utilities matrix_init.h # Matrix data initialization

The matrix_init.h, matrix_alloc.h, and matrix_body.inc are generated by running array_rand_init.py for one, and register_allocate.py for the other 2.

Also, keep in mind that the starting PC of this is not 0 -- set that correctly.

About

Generates a gemm kernel, need to verify that the GEMM itself is guaranteed to be correct.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •