added set bd channel without setting r
This commit is contained in:
parent
5aab3d2d3b
commit
feb28f27bf
@ -236,3 +236,26 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define set-bd-data-valid
|
||||
(lambda (ch width val)
|
||||
(letrec ((ch-name (string-append ch ".d"))
|
||||
(helper
|
||||
(lambda (i v)
|
||||
(cond
|
||||
((=? i width) #t)
|
||||
(#t (let ((tmp (string-append ch (string-append ".d[" (string-append (number->string i) "]")))))
|
||||
(begin
|
||||
(set tmp (% v 2))
|
||||
(helper (+ 1 i) (truncate (/ v 2)))
|
||||
)
|
||||
))
|
||||
)
|
||||
)
|
||||
))
|
||||
(begin
|
||||
(helper 0 val)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user