diff Examples/etc/rsffdelay @ 0:cfb7c6b24319

Initial revision
author kono
date Thu, 30 Aug 2007 14:57:44 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Examples/etc/rsffdelay	Thu Aug 30 14:57:44 2007 +0900
@@ -0,0 +1,31 @@
+
+
+rs(R,S,NQ,Q) :-
+    (nand(S,Q,NQ,2) && true),
+    (nand(R,NQ,Q,3) && true).
+
+nand(A,B,Out,Delay) :-
+    A = 1,B = 1,
+    length(Delay),
+    Out <- 0 .
+nand(A,B,Out,Delay) :-
+    A = 1,B = 0,
+    length(Delay), 
+    Out <- 1 .
+nand(A,B,Out,Delay) :-
+    A = 0,B = 1,
+    length(Delay), 
+    Out <- 1 .
+nand(A,B,Out,Delay) :-
+    A = 0,B = 0,
+    length(Delay), 
+    Out <- 1 .
+
+test :- data(R,S),
+    #rs(R,S,NQ,Q),
+    #write((NQ,Q)).
+
+data(R,S) :- length(4),
+    read((R,S)),
+    stable(R),stable(S)
+ && @data(R,S).