D
demis10
Guest
- Mēģiniet manu projektu, brīvi, bet atmiņas par ziedot!
SUBDESIGN detector1
(
CLK, a, b: IEVADE; --
dir, pulksteni: izlaide;
)
MAINĪGAS
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;
TABULA
a_t.q, b_t.q, a, b => dir;
0, 0, 1, 0 => 1; - pulksteni tiesības
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 tabulā;
pulkstenis = clock1.q;
END;
SUBDESIGN detector1
(
CLK, a, b: IEVADE; --
dir, pulksteni: izlaide;
)
MAINĪGAS
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;
TABULA
a_t.q, b_t.q, a, b => dir;
0, 0, 1, 0 => 1; - pulksteni tiesības
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 tabulā;
pulkstenis = clock1.q;
END;