Skip to content

Commit a9b7bd8

Browse files
committed
Use simulate_lazy function and separate testbench generation
Signed-off-by: Oguz Meteer <info@guztech.nl>
1 parent eda162c commit a9b7bd8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

part_2/Example7.hs

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ topEntity instr = mealy stack5 (repeat 0 :: SMem, 0 :: SP) instr
4040
instrs_vec = (Push 3 :> Push 5 :> PopPush 6 :> Pop :> Pop :> Nil)
4141
instrs = toList instrs_vec
4242

43-
-- Synchronous logic simulation and testbench generation
43+
-- Synchronous logic simulation
44+
test_sync = sampleN 5 $ simulate_lazy topEntity instrs
45+
46+
-- Synchronous logic testbench generation
4447

4548
--testInput :: Signal SInstr
4649
testInput = stimuliGenerator instrs_vec
4750

4851
--expectedOutput :: Signal Value -> Signal Bool
4952
expectedOutput = outputVerifier (0 :> 0 :> 5 :> 6 :> 3 :> Nil)
5053

51-
test_sync = sampleN 5 $ expectedOutput $ topEntity testInput
54+
test_sync_tb = sampleN 5 $ expectedOutput $ topEntity testInput
5255

5356
-- Combinatorial logic simulation
5457

0 commit comments

Comments
 (0)