Advertisement
Guest User

Untitled

a guest
Sep 21st, 2022
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1.         cdc = AsyncFIFO([("data", 256)], 32, buffered=True)
  2.         cdc = ClockDomainsRenamer({"write": "radio", "read": "sys"})(cdc)
  3.         self.submodules += cdc
  4.  
  5.         #self.comb += cdc.sink.connect(conv.source)
  6.  
  7.         # Large sync FIFO for buffering (should end up using URAM)
  8.         fifo = SyncFIFO([("data", 256)], 2048, buffered=True)
  9.         self.submodules += fifo
  10.  
  11.         self.comb += fifo.sink.connect(cdc.source)
  12.         x = Signal(256)
  13.  
  14.         self.sync.radio += [
  15.             x.eq(x+1),
  16.         ]
  17.  
  18.         self.comb += [
  19.             cdc.sink.valid.eq(x[0]),
  20.             cdc.sink.data.eq(x),
  21.         ]
  22.  
  23.         self.source = fifo.source
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement