Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_fragment(self):
- n = len(self.endpoints)
- acked = Signal(BV(n), name="acked")
- sink = self.endpoints["sink"]
- sources = [self.endpoints["source{0}".format(n)]
- for n in range(len(self.endpoints)-1)]
- comb = [sink.ack.eq(optree('&', [source.ack | acked[n] for n, source in enumerate(sources)]))]
- comb += [source.stb.eq(sink.stb) for source in sources]
- sync = [If(sink.stb & sink.ack, acked.eq(0)).Else(
- *[If(source.ack, acked[n].eq(1)) for n, source in
- enumerate(sources)])]
- return Fragment(comb, sync)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement