Skip to content

Commit

Permalink
lm32: add simple pipe test program
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Walle <michael@walle.cc>
  • Loading branch information
mwalle authored and Sebastien Bourdeauducq committed Nov 14, 2012
1 parent f7e767e commit edf14a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cores/lm32/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ trace_%: %.vh tb_lm32
hello_world.elf: crt.S hello_world.c
lm32-elf-gcc -Tlinker.ld -fno-builtin -o $@ $^

pipe1.elf: pipe1.S
lm32-elf-gcc -Tlinker.ld -fno-builtin -o $@ $^

%.vh: %.elf
lm32-elf-objcopy -O verilog $< $@

Expand Down
15 changes: 15 additions & 0 deletions cores/lm32/test/pipe1.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.globl _start

.text
_start:
xor r0, r0, r0

mvi r1, 10
addi r2, r1, 1
addi r3, r2, 1
muli r4, r1, 10
add r5, r4, r4

mvhi r1, 0xdead
ori r2, r0, 0xbeef
sw (r1+0), r2

0 comments on commit edf14a2

Please sign in to comment.