summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/power.sail18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/test/power.sail b/src/test/power.sail
index ba7d76c7..07b74c60 100644
--- a/src/test/power.sail
+++ b/src/test/power.sail
@@ -120,10 +120,24 @@ end ast
register ast instr (* monitor decoded instructions *)
-function rec unit main () = {
+(* fetch-decode-execute loop *)
+function rec unit fde_loop () = {
NIA := CIA + 4;
instr := decode(MEM(CIA, 4));
execute(instr);
CIA := NIA;
- main ()
+ fde_loop ()
+}
+
+function unit init() = {
+ (* CIA is initialiazed externally, as well as MEM *)
+
+ GPR1 := 0;
+
+
+}
+
+function unit main () = {
+ init();
+ fde_loop();
}