forked from M-Labs/artiq
1
0
Fork 0

suservo: fix cnv_b diff

This commit is contained in:
Robert Jördens 2018-04-23 15:15:38 +00:00
parent c8fd63754a
commit d5eea962ec
1 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,8 @@ class ADC(Module, DiffMixin):
self.sync += pads.sck_en.eq(sck_en) # ODDR delay
self.specials += io.DDROutput(0, sck_en,
self._diff(pads, "sck", output=True))
cnv_b = Signal()
self.comb += self._diff(pads, "cnv_b", output=True).eq(cnv_b)
self.submodules.fsm = fsm = FSM("IDLE")
fsm.act("IDLE",
self.done.eq(1),
@ -86,7 +88,7 @@ class ADC(Module, DiffMixin):
)
fsm.act("CNVH",
count_load.eq(p.t_conv - 2), # account for sck ODDR delay
pads.cnv_b.eq(1),
cnv_b.eq(1),
If(count_done,
NextState("CONV")
)