demis10
Newbie level 6

phase detector direction
--Try my project by free, but memory for donate!!!
SUBDESIGN detector1
(
clk, a,b : INPUT; --
dir,clock : OUTPUT;
)
VARIABLE
a_t , b_t, clock1 : dff ;
BEGIN
clock1.clk = clk;
clock1.d = (a_t $ a) # (b_t $ b);
a_t.clk = clk;
b_t.clk = clk;
a_t.d = a;
b_t.d = b;
TABLE
a_t.q, b_t.q, a, b => dir;
0, 0, 1, 0 => 1; -- clock right
0, 0, 0, 1 => 0;
1, 0, 1, 1 => 1;--
1, 0, 0, 0 => 0;--
1, 1, 0, 1 => 1; --
1, 1, 1, 0 => 0; --
0, 1, 0, 0 => 1;
0, 1, 1, 1 => 0;
END TABLE;
clock = clock1.q;
END;
--Try my project by free, but memory for donate!!!
SUBDESIGN detector1
(
clk, a,b : INPUT; --
dir,clock : OUTPUT;
)
VARIABLE
a_t , b_t, clock1 : dff ;
BEGIN
clock1.clk = clk;
clock1.d = (a_t $ a) # (b_t $ b);
a_t.clk = clk;
b_t.clk = clk;
a_t.d = a;
b_t.d = b;
TABLE
a_t.q, b_t.q, a, b => dir;
0, 0, 1, 0 => 1; -- clock right
0, 0, 0, 1 => 0;
1, 0, 1, 1 => 1;--
1, 0, 0, 0 => 0;--
1, 1, 0, 1 => 1; --
1, 1, 1, 0 => 0; --
0, 1, 0, 0 => 1;
0, 1, 1, 1 => 0;
END TABLE;
clock = clock1.q;
END;