Skip to content

Commit

Permalink
Blinking LED
Browse files Browse the repository at this point in the history
  • Loading branch information
schoeberl committed Jul 18, 2024
1 parent d1d6394 commit fb4cf04
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ swsim:
sbt -Dprogram=$(APP) "testOnly leros.sim.LerosSimTest"

hw:
sbt "runMain leros.Leros asm/test/$(APP).s"
sbt "runMain leros.Leros asm/$(APP).s"

test-alu:
sbt "test:runMain leros.AluTester"
Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* wondering on timing and layout in Quartus
- [ ] Get rid of code duplication in Decode
- [ ] Do memory mapped IO
- [ ] Be able to simulate source in asm
- [x] Setup FPGA (Nexys A7)
- [x] Use chipdesign1 for synthesis, OpenOCD for configuration
- [ ] get a blinking LED running
Expand Down
19 changes: 19 additions & 0 deletions asm/blink.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Blinking LEDs

// We need 2.500.000 iterations for a 100 ms tick
//

loadi 0
store r2
loop:
loadi 255
loadhi 255
loadh2i 38
l1:
subi 1
brnz l1 // one loop iteration is 4 cc
load r2
stind 0
addi 1
store r2
br loop
79 changes: 0 additions & 79 deletions asm/test/blink.s

This file was deleted.

0 comments on commit fb4cf04

Please sign in to comment.