View difference between Paste ID: Z3fXZEA2 and 2irkxEsZ
SHOW: | | - or go back to the newest paste.
1
lrclk = Signal()
2
bclk = Signal()
3
data = Signal()
4
5
def counter():
6
    for i in range(1000):
7
        yield Token("source", {"value": i})
8
9
source = SimActor(counter(), ("source", Source, [("value", 16)]))
10
conv = DownConverter(16, 1)
11
i2s = I2S(1, lrclk, bclk, data)
12
13
g = DataFlowGraph()
14
g.add_connection(source, conv)
15
g.add_connection(conv, i2s)
16
comp = CompositeActor(g)
17
sim = Simulator(comp.get_fragment(), TopLevel("my.vcd"))
18
sim.run(500)