forked from M-Labs/artiq
1
0
Fork 0

sawg: don't use Mux for signed signals

migen#75
This commit is contained in:
Robert Jördens 2018-06-06 15:50:53 +00:00
parent 28f31323a3
commit b4c2b148d1
1 changed files with 6 additions and 2 deletions

View File

@ -203,8 +203,12 @@ class Channel(Module, SatAddMixin):
o_y = Signal.like(y) o_y = Signal.like(y)
self.comb += [ self.comb += [
o_offset.eq(u.o.a0[-len(o):]), o_offset.eq(u.o.a0[-len(o):]),
o_x.eq(Mux(cfg.iq_en[0], x, 0)), If(cfg.iq_en[0],
o_y.eq(Mux(cfg.iq_en[1], y, 0)), o_x.eq(x)
),
If(cfg.iq_en[1],
o_y.eq(y)
),
] ]
self.sync += [ self.sync += [
o.eq(self.sat_add((o_offset, o_x, o_y), o.eq(self.sat_add((o_offset, o_x, o_y),