tested and seems to be working

This commit is contained in:
Yehowshua Immanuel 2025-03-23 18:45:32 -04:00
parent 35fc49382d
commit 76e542ff36
3 changed files with 37 additions and 12 deletions

View file

@ -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