summaryrefslogtreecommitdiff
path: root/sched
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-06 21:47:42 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-01-06 21:47:42 +0100
commitc8a30baeb18756f2cc246de6a575943fcf9b7ed4 (patch)
treeb01ed60279a135536e28c4ea864627505c9b1424 /sched
parent55c894778414d0be0a04929770bc7d4862d416d0 (diff)
downloadSystDigit-Projet-c8a30baeb18756f2cc246de6a575943fcf9b7ed4.tar.gz
SystDigit-Projet-c8a30baeb18756f2cc246de6a575943fcf9b7ed4.zip
Make sw/sb run in one tick less, correct scheduler.
Diffstat (limited to 'sched')
-rw-r--r--sched/scheduler.ml18
1 files changed, 7 insertions, 11 deletions
diff --git a/sched/scheduler.ml b/sched/scheduler.ml
index 611aab4..d7c5596 100644
--- a/sched/scheduler.ml
+++ b/sched/scheduler.ml
@@ -4,11 +4,11 @@ module Smap = Map.Make(String)
exception Combinational_cycle
+let add_arg x l = match x with
+ | Avar(f) -> f::l
+ | Aconst(_) -> l
+
let read_exp eq =
- let add_arg x l = match x with
- | Avar(f) -> f::l
- | Aconst(_) -> l
- in
let aux = function
| Earg(x) -> add_arg x []
| Ereg(i) -> []
@@ -16,7 +16,7 @@ let read_exp eq =
| Ebinop(_, x, y) -> add_arg x (add_arg y [])
| Emux(a, b, c) -> add_arg a (add_arg b (add_arg c []))
| Erom(_, _, a) -> add_arg a []
- | Eram(_, _, a, b, c, d) -> []
+ | Eram(_, _, ra, wa, we, d) -> add_arg ra []
| Econcat(u, v) -> add_arg u (add_arg v [])
| Eslice(_, _, a) -> add_arg a []
| Eselect(_, a) -> add_arg a []
@@ -24,18 +24,14 @@ let read_exp eq =
aux eq
let read_exp_all eq =
- let add_arg x l = match x with
- | Avar(f) -> f::l
- | Aconst(_) -> l
- in
let aux = function
| Earg(x) -> add_arg x []
| Ereg(i) -> [i]
| Enot(x) -> add_arg x []
| Ebinop(_, x, y) -> add_arg x (add_arg y [])
| Emux(a, b, c) -> add_arg a (add_arg b (add_arg c []))
- | Erom(_, _, a) -> add_arg a []
- | Eram(_, _, a, b, c, d) -> add_arg a (add_arg b (add_arg c (add_arg d [])))
+ | Erom(_, _, ra) -> add_arg ra []
+ | Eram(_, _, ra, wa, we, d) -> add_arg ra (add_arg wa (add_arg we (add_arg d [])))
| Econcat(u, v) -> add_arg u (add_arg v [])
| Eslice(_, _, a) -> add_arg a []
| Eselect(_, a) -> add_arg a []