summaryrefslogtreecommitdiff
path: root/minijazz/test/tests.mj
blob: a8f8b6362a7f4fa29be6c7dc86f2da2bd301d728 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Fulladder(a,b,c) = (s, r) where
  s = (a xor b) xor c;
  r = (a and b) or ((a xor b) and c);
end where

minus(x) = (y) where
  y = x xor c;
  c = reg (x or y)
end where

cm2(x) = (s, r) where
  s = reg (x xor s);
  r = x and s
end where

clk2() = (o) where
  o = reg(c);
  c = not (reg (o))
end where