aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_step.sail
diff options
context:
space:
mode:
authorRobert Norton <rmn30@cam.ac.uk>2019-08-05 16:07:45 +0100
committerRobert Norton <rmn30@cam.ac.uk>2019-08-05 16:07:45 +0100
commite6cd25ff7e36e5134d1de2cdf8bb68dce97a567b (patch)
tree69fdd5f9c92d2b1fd02a5a8034af436ebc104e88 /model/riscv_step.sail
parentc87bb2ccbabb4a3a7003af3913f4525ebdcc6156 (diff)
downloadsail-riscv-e6cd25ff7e36e5134d1de2cdf8bb68dce97a567b.zip
sail-riscv-e6cd25ff7e36e5134d1de2cdf8bb68dce97a567b.tar.gz
sail-riscv-e6cd25ff7e36e5134d1de2cdf8bb68dce97a567b.tar.bz2
Add some effects to execute function declarationand remove val specs for calling functions to allow effects to be inferred.
Diffstat (limited to 'model/riscv_step.sail')
-rw-r--r--model/riscv_step.sail6
1 files changed, 2 insertions, 4 deletions
diff --git a/model/riscv_step.sail b/model/riscv_step.sail
index 2d3adf6..4e81fe9 100644
--- a/model/riscv_step.sail
+++ b/model/riscv_step.sail
@@ -1,8 +1,7 @@
/* The emulator fetch-execute-interrupt dispatch loop. */
/* returns whether to increment the step count in the trace */
-val step : int -> bool effect {barr, eamem, escape, exmem, rmem, rreg, wmv, wmvt, wreg}
-function step(step_no) = {
+function step(step_no : int) -> bool = {
/* for step extensions */
ext_pre_step_hook();
@@ -72,8 +71,7 @@ function step(step_no) = {
stepped
}
-val loop : unit -> unit effect {barr, eamem, escape, exmem, rmem, rreg, wmv, wmvt, wreg}
-function loop () = {
+function loop () : unit -> unit = {
let insns_per_tick = plat_insns_per_tick();
i : int = 0;
step_no : int = 0;