lib.cdc: specify maximum input delay in seconds.
Since we use hertz elsewhere, this provides for easy conversions. Also, cast the delay to string before applying it in xilinx_7series, to avoid stripping the fractional digits. Closes #234.
This commit is contained in:
parent
b43d2d36e8
commit
0858b8bf6c
2 changed files with 4 additions and 4 deletions
4
nmigen/vendor/xilinx_7series.py
vendored
4
nmigen/vendor/xilinx_7series.py
vendored
|
|
@ -392,7 +392,7 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
|
|||
if ff_sync._max_input_delay is None:
|
||||
flops[0].attrs["nmigen.vivado.false_path"] = "TRUE"
|
||||
else:
|
||||
flops[0].attrs["nmigen.vivado.max_delay"] = ff_sync._max_input_delay
|
||||
flops[0].attrs["nmigen.vivado.max_delay"] = str(ff_sync._max_input_delay * 1e9)
|
||||
for i, o in zip((ff_sync.i, *flops), flops):
|
||||
m.d[ff_sync._o_domain] += o.eq(i)
|
||||
m.d.comb += ff_sync.o.eq(flops[-1])
|
||||
|
|
@ -407,7 +407,7 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
|
|||
if reset_sync._max_input_delay is None:
|
||||
flops[0].attrs["nmigen.vivado.false_path"] = "TRUE"
|
||||
else:
|
||||
flops[0].attrs["nmigen.vivado.max_delay"] = reset_sync._max_input_delay
|
||||
flops[0].attrs["nmigen.vivado.max_delay"] = str(reset_sync._max_input_delay * 1e9)
|
||||
for i, o in zip((0, *flops), flops):
|
||||
m.d.reset_sync += o.eq(i)
|
||||
m.d.comb += [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue