Skip to content

Commit

Permalink
bench/serwb: Cleanup/Uniformize targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Nov 17, 2023
1 parent f63e506 commit 0a1efa8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
8 changes: 4 additions & 4 deletions bench/serwb/efinix_titanium_ti60_f225_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

class _CRG(LiteXModule):
def __init__(self, platform, sys_clk_freq):
self.rst = Signal()
self.cd_sys = ClockDomain()
self.cd_sys4x = ClockDomain()

Expand All @@ -64,9 +63,10 @@ def __init__(self, platform, sys_clk_freq):
clk25 = platform.request("clk25")
rst_n = platform.request("user_btn", 0)


# PLL
self.pll = pll = TITANIUMPLL(platform)
self.comb += pll.reset.eq(~rst_n | self.rst)
self.comb += pll.reset.eq(~rst_n)
pll.register_clkin(clk25, 25e6)
# You can use CLKOUT0 only for clocks with a maximum frequency of 4x
# (integer) of the reference clock. If all your system clocks do not fall within
Expand All @@ -75,7 +75,7 @@ def __init__(self, platform, sys_clk_freq):
pll.create_clkout(self.cd_sys, sys_clk_freq, with_reset=True, name="sys")
pll.create_clkout(self.cd_sys4x, 4*sys_clk_freq, with_reset=True, phase=90, name="sys4x")

# BaseSoC ------------------------------------------------------------------------------------------
# SerWBTestSoC ------------------------------------------------------------------------------------

class SerWBTestSoC(SoCMini):
mem_map = {
Expand All @@ -89,7 +89,7 @@ def __init__(self, platform, with_analyzer=True):
# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SoCCore ----------------------------------------------------------------------------------
# SoCMini ----------------------------------------------------------------------------------
SoCMini.__init__(self, platform, sys_clk_freq,
csr_data_with = 32,
ident = "LiteICLink SerWB bench on Efinix Titanium Ti60 F225 Dev Kit",
Expand Down
4 changes: 2 additions & 2 deletions bench/serwb/efinix_trion_t120_bga576_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, platform, sys_clk_freq):
pll.create_clkout(self.cd_sys, sys_clk_freq, with_reset=True, name="sys")
pll.create_clkout(self.cd_sys4x, 4*sys_clk_freq, phase=90, with_reset=True, name="sys4x")

# BaseSoC ------------------------------------------------------------------------------------------
# SerWBTestSoC ------------------------------------------------------------------------------------

class SerWBTestSoC(SoCMini):
mem_map = {
Expand All @@ -89,7 +89,7 @@ def __init__(self, platform, with_analyzer=True):
# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SoCCore ----------------------------------------------------------------------------------
# SoCMini ----------------------------------------------------------------------------------
SoCMini.__init__(self, platform, sys_clk_freq,
csr_data_with = 32,
ident = "LiteICLink SerWB bench on Efinix Trion T120 BGA576 Dev Kit",
Expand Down
6 changes: 3 additions & 3 deletions bench/serwb/icebreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class SerWBTestSoC(SoCMini):
def __init__(self, platform, loopback=False, with_analyzer=False):
sys_clk_freq = int(24e6)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SoCMini ----------------------------------------------------------------------------------
SoCMini.__init__(self, platform, sys_clk_freq,
csr_data_width = 32,
Expand All @@ -64,9 +67,6 @@ def __init__(self, platform, loopback=False, with_analyzer=False):
with_uart = True,
uart_name = "uartbone")

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SerWB ------------------------------------------------------------------------------------
# SerWB simple test with a SerWB Master added as a Slave peripheral to the SoC and connected
# to a SerWB Slave with a SRAM attached. Access to this SRAM is then tested from the main
Expand Down
7 changes: 3 additions & 4 deletions bench/serwb/nexys_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class SerWBTestSoC(SoCMini):
def __init__(self, platform, low_speed=True, with_analyzer=True):
sys_clk_freq = int(125e6)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SoCMini ----------------------------------------------------------------------------------
SoCMini.__init__(self, platform, sys_clk_freq,
csr_data_width = 32,
Expand All @@ -91,10 +94,6 @@ def __init__(self, platform, low_speed=True, with_analyzer=True):
with_uart = True,
uart_name = "uartbone")

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)


# SerWB ------------------------------------------------------------------------------------
# SerWB simple test with a SerWB Master added as a Slave peripheral to the SoC and connected
# to a SerWB Slave with a SRAM attached. Access to this SRAM is then tested from the main
Expand Down
6 changes: 3 additions & 3 deletions bench/serwb/trellisboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class SerWBTestSoC(SoCMini):
def __init__(self, platform, loopback=False, with_analyzer=False):
sys_clk_freq = int(50e6)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SoCMini ----------------------------------------------------------------------------------
SoCMini.__init__(self, platform, sys_clk_freq,
csr_data_width = 32,
Expand All @@ -65,9 +68,6 @@ def __init__(self, platform, loopback=False, with_analyzer=False):
with_uart = True,
uart_name = "uartbone")

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SerWB ------------------------------------------------------------------------------------
# SerWB simple test with a SerWB Master added as a Slave peripheral to the SoC and connected
# to a SerWB Slave with a SRAM attached. Access to this SRAM is then tested from the main
Expand Down
6 changes: 3 additions & 3 deletions bench/serwb/ulx3s.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class SerWBTestSoC(SoCMini):
def __init__(self, platform, loopback=False, with_analyzer=False):
sys_clk_freq = int(50e6)

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SoCMini ----------------------------------------------------------------------------------
SoCMini.__init__(self, platform, sys_clk_freq,
csr_data_width = 32,
Expand All @@ -64,9 +67,6 @@ def __init__(self, platform, loopback=False, with_analyzer=False):
with_uart = True,
uart_name = "uartbone")

# CRG --------------------------------------------------------------------------------------
self.crg = _CRG(platform, sys_clk_freq)

# SerWB ------------------------------------------------------------------------------------
# SerWB simple test with a SerWB Master added as a Slave peripheral to the SoC and connected
# to a SerWB Slave with a SRAM attached. Access to this SRAM is then tested from the main
Expand Down

0 comments on commit 0a1efa8

Please sign in to comment.