Skip to content

Commit 1dc1d2d

Browse files
wanda-phiwhitequark
authored andcommitted
vendor.lattice_ice40: use SB_DFF instead of $dff.
1 parent eebb6ec commit 1dc1d2d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

amaranth/vendor/_lattice_ice40.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,11 @@ def should_skip_port_component(self, port, attrs, component):
426426
def _get_io_buffer(self, m, pin, port, attrs, *, i_invert=False, o_invert=False,
427427
invert_lut=False):
428428
def get_dff(clk, d, q):
429-
m.submodules += Instance("$dff",
430-
p_CLK_POLARITY=1,
431-
p_WIDTH=len(d),
432-
i_CLK=clk,
433-
i_D=d,
434-
o_Q=q)
429+
for bit in range(len(d)):
430+
m.submodules += Instance("SB_DFF",
431+
i_C=clk,
432+
i_D=d[bit],
433+
o_Q=q[bit])
435434

436435
def get_ineg(y, invert):
437436
if invert_lut:

0 commit comments

Comments
 (0)