25 lines
777 B
Scheme

;; -*- scheme -*-
;;; Testbenches
(utest/map-comb
(count direction)
(utest/tb
((format "c~a_d~a" count direction)
"More complex testbench for Simple Counter"
(format "COUNT=~a\tDIRECTION=~a" count direction))
;; Instead of a description, you can display the message in log
;; (utest/log 'info "COUNT = ~a" count)
;; testbench body
(utest/run-simulation-iverilog
(utest/find-files ".*\\.sv$")
"simple_counter_tb"
#:parameters `((COUNT ,count)
(ITERATIONS ,(* count 3))
(DIRECTION ,direction))))
(append '(10 100 1000 16 64 256)
(let ((state (seed->random-state 0)))
(map (lambda (x) (+ 2 (random 200 state))) (iota 100))))
'(1 -1 0))