tested and seems to be working
This commit is contained in:
parent
35fc49382d
commit
76e542ff36
3 changed files with 37 additions and 12 deletions
13
bs/Util.bs
13
bs/Util.bs
|
@ -1,7 +1,14 @@
|
|||
package Util((|>), simulate_for) where
|
||||
package Util(
|
||||
(|>),
|
||||
BasicResult(..),
|
||||
simulate_for) where
|
||||
|
||||
infixr 0 |>
|
||||
|
||||
data BasicResult = Success
|
||||
| Failure
|
||||
deriving (Bits, Eq, FShow)
|
||||
|
||||
(|>) :: (a -> b) -> a -> b
|
||||
f |> x = f x;
|
||||
|
||||
|
@ -11,7 +18,7 @@ simulate_for curr_cycle end_cycle =
|
|||
"count_cycle_rule": when True ==> action
|
||||
curr_cycle := curr_cycle + 1
|
||||
if curr_cycle == end_cycle
|
||||
then
|
||||
then
|
||||
$finish
|
||||
else
|
||||
$display "cycle = " curr_cycle
|
||||
$display "cycle = " curr_cycle
|
||||
|
|
Reference in a new issue