Skip to content

Commit

Permalink
phy/xilinx_us(p): Switch to pcie_data_width suffix and avoid Gen4 wor…
Browse files Browse the repository at this point in the history
…karound.
  • Loading branch information
enjoy-digital committed May 6, 2024
1 parent 0e9ba37 commit 662b78a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions litepcie/phy/uspciephy.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ def add_sources(self, platform, phy_path=None, phy_filename=None):

verilog_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "xilinx_us")
platform.add_source(os.path.join(verilog_path, "axis_iff.v"))
platform.add_source(os.path.join(verilog_path, f"s_axis_rq_adapt_x{self.nlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_rc_adapt_x{self.nlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_cq_adapt_x{self.nlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"s_axis_cc_adapt_x{self.nlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"s_axis_rq_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_rc_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_cq_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, f"s_axis_cc_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, "pcie_us_support.v"))

# External Hard IP -----------------------------------------------------------------------------
Expand Down
13 changes: 5 additions & 8 deletions litepcie/phy/usppciephy.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,11 @@ def add_sources(self, platform, phy_path=None, phy_filename=None):

verilog_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "xilinx_usp")
platform.add_source(os.path.join(verilog_path, "axis_iff.v"))

nvlanes = {"gen3": self.nlanes, "gen4": self.nlanes*2}[self.speed]

platform.add_source(os.path.join(verilog_path, f"s_axis_rq_adapt_x{nvlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_rc_adapt_x{nvlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_cq_adapt_x{nvlanes}.v"))
platform.add_source(os.path.join(verilog_path, f"s_axis_cc_adapt_x{nvlanes}.v"))


platform.add_source(os.path.join(verilog_path, f"s_axis_rq_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_rc_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, f"m_axis_cq_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, f"s_axis_cc_adapt_{self.pcie_data_width}b.v"))
platform.add_source(os.path.join(verilog_path, "pcie_usp_support.v"))

# External Hard IP -----------------------------------------------------------------------------
Expand Down

0 comments on commit 662b78a

Please sign in to comment.