From ec9a0f72c6b7d74c9a7e2d4eaef44e26037eaca2 Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Mon, 28 Dec 2020 11:09:30 +0100 Subject: also add a wasm version of example1 for comparison --- examples/example1_blink_led/Makefile | 3 -- examples/example1_blink_led/instructions.s.tcl | 57 -------------------------- 2 files changed, 60 deletions(-) delete mode 100644 examples/example1_blink_led/Makefile delete mode 100644 examples/example1_blink_led/instructions.s.tcl (limited to 'examples/example1_blink_led') diff --git a/examples/example1_blink_led/Makefile b/examples/example1_blink_led/Makefile deleted file mode 100644 index 9755f33..0000000 --- a/examples/example1_blink_led/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SIMFLAGS += -DFINISH_ON_LED1=1 -DFINISH_ON_LED2=0 - -include ../../Makefile.example diff --git a/examples/example1_blink_led/instructions.s.tcl b/examples/example1_blink_led/instructions.s.tcl deleted file mode 100644 index 13c51e2..0000000 --- a/examples/example1_blink_led/instructions.s.tcl +++ /dev/null @@ -1,57 +0,0 @@ -## adapted from soc_measure_time test - -## we're going to write numbers from 0 to 639 at addresses h100000 to h1009FC -## and then write non-zero value at h100A00 - -# this will translate to 2 16-bit instructions -set_sp h100000 - -## load current value of timer, in a loop -## this is address 4 we later jump to -# this will translate to 2 16-bit instructions -loadwzx h1C0008 - -## loop until timer exceeds 500 -# this will translate to 2 16-bit instructions -const 500 -# this will translate to 1 16-bit instruction -lt -# this will translate to 1 16-bit instruction -cond_jump 4 - -## now, light led2 -# this will translate to 1 16-bit instruction -const 1 -# this will translate to 2 16-bit instructions -storew h1C0006 - -## second loop, analogous to the first one -## this is address 22 we later jump to -# this will translate to 2 16-bit instructions -loadwzx h1C0008 - -## loop until timer exceeds 1000 -# this will translate to 2 16-bit instructions -const 1000 -# this will translate to 1 16-bit instruction -lt -# this will translate to 1 16-bit instruction -cond_jump 22 - -## now, switch led2 off -# this will translate to 1 16-bit instruction -const 0 -# this will translate to 2 16-bit instructions -storew h1C0006 - -## third loop, analogous to the first two -## this is address 40 we later jump to -loadwzx h1C0008 - -## loop until timer exceeds 1500 -const 1500 -lt -cond_jump 40 - -## finish operation (will also put led1 on) -halt -- cgit v1.2.3