Merge branch 'dev' of ssh://git.web.rug.nl:222/bics/actlib_dataflow_neuro into dev
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
= "GND" "GND"
|
||||
= "Vdd" "Vdd"
|
||||
= "Reset" "Reset"
|
||||
~"t.ctree_test.C2Els[0].c1"&~"t.ctree_test.C2Els[0].c2"->"t.ctree_test.C2Els[0]._y"+
|
||||
"t.ctree_test.C2Els[0].c1"&"t.ctree_test.C2Els[0].c2"->"t.ctree_test.C2Els[0]._y"-
|
||||
"t.ctree_test.C2Els[0]._y"->"t.ctree_test.C2Els[0].y"-
|
||||
|
@ -17,6 +17,7 @@ set t.in[12] 1
|
||||
set t.in[13] 1
|
||||
set t.in[14] 1
|
||||
|
||||
|
||||
system "echo '1'"
|
||||
|
||||
cycle
|
||||
|
@ -145,3 +145,94 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define assert-data-bit
|
||||
(lambda (x i v)
|
||||
(let ((tmp (string-append x (string-append ".d[" (string-append (number->string i) "]")))))
|
||||
(assert tmp v)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define assert-data-int
|
||||
(lambda (x width value)
|
||||
(letrec ((assert-one-data-bit
|
||||
(lambda (v i)
|
||||
(cond
|
||||
((=? i width) #t)
|
||||
(#t (begin
|
||||
(assert-data-bit x i (% v 2))
|
||||
(assert-one-data-bit (truncate (/ v 2)) (+ i 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
(assert-one-data-bit value 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define assert-bd-channel-valid
|
||||
(lambda (ch width value)
|
||||
(begin
|
||||
(assert-data-int ch width value)
|
||||
(assert (string-append ch ".r") 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define assert-bd-channel-neutral
|
||||
(lambda (ch width)
|
||||
(assert (string-append ch ".r") 0)
|
||||
)
|
||||
)
|
||||
|
||||
(define set-bd-channel-neutral
|
||||
(lambda (ch width)
|
||||
(letrec ((ch-name (string-append ch ".d"))
|
||||
(helper
|
||||
(lambda (i)
|
||||
(cond
|
||||
((=? i width) #t)
|
||||
(#t (let ((tmp (string-append ch (string-append ".d[" (string-append (number->string i) "]" )))))
|
||||
(begin
|
||||
(set tmp 0)
|
||||
(helper (+ 1 i))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
(begin
|
||||
(helper 0)
|
||||
(set (string-append ch ".r") 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define set-bd-channel-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)
|
||||
(set (string-append ch ".r") 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user