Advertisement
Guest User

Untitled

a guest
Mar 10th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement