Skip to content

Commit

Permalink
[FIFO] remove exceptions/warnings about first FIFO, no longer valid
Browse files Browse the repository at this point in the history
  • Loading branch information
maltanar authored and johnnoel committed Jan 18, 2024
1 parent 2365592 commit 9c38aca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
8 changes: 0 additions & 8 deletions src/finn/transformation/fpgadataflow/create_stitched_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,6 @@ def apply(self, model):
behavior. It is strongly recommended to insert FIFOs prior to
calling CreateStitchedIP."""
)
if model.graph.node[0].op_type == "StreamingFIFO":
firstfifo = getCustomOp(model.graph.node[0])
if firstfifo.get_nodeattr("impl_style") == "vivado":
warnings.warn(
"""First FIFO has impl_style=vivado, which may cause
simulation glitches (e.g. dropping the first input sample
after reset)."""
)
for node in model.graph.node:
# ensure that all nodes are fpgadataflow, and that IPs are generated
assert is_fpgadataflow_node(node), "All nodes must be FINN fpgadataflow nodes."
Expand Down
7 changes: 1 addition & 6 deletions src/finn/transformation/fpgadataflow/set_fifo_depths.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,8 @@ def apply(self, model):
node_inst = getCustomOp(node)
node_inst.set_nodeattr("depth", depth)
node_inst.set_nodeattr("depth_monitor", 0)
# exception for top-level IO FIFOs which cause a bug in simulation
# (top-level IOs should not have impl_style=vivado)
toplevel_in = node.input[0] in [x.name for x in model.graph.input]
toplevel_out = node.output[0] in [x.name for x in model.graph.output]
toplevel_style_exception = toplevel_in or toplevel_out
# Set FIFO implementation/ram styles
if (depth > self.max_qsrl_depth) and (not toplevel_style_exception):
if (depth > self.max_qsrl_depth):
node_inst.set_nodeattr("impl_style", "vivado")
node_inst.set_nodeattr("ram_style", self.vivado_ram_style)
else:
Expand Down

0 comments on commit 9c38aca

Please sign in to comment.