1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
use *;
use *;
// itfc_declare!(
// struct Top{
// #[name("in")]
// in_: input Type::Int(4),
// out: output Type::Int(4),
// }
// method input (in_);
// method output ()->(out);
// );
// #[module]
// fn make_top() -> Top {
// let io = io! {};
// let fifo = instance!(stl::fifo1_d(Type::Int(4)));
// let deqed = instance!(stl::Wire::new(Type::Int(1)));
// let output = method!(
// () -> (io.out) {
// deqed.write(literal(1, Type::Int(1)));
// fifo.deq()
// }
// );
// let deqed_default = rule! {
// () { deqed.write(literal(0, Type::Int(1))); }
// };
// let input = method!(
// !fifo.full() | deqed.read();
// (io.in_) {
// fifo.enq(io.in_);
// }
// );
// schedule!(output, deqed_default, input);
// }