-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
526a3d0
commit fdca75a
Showing
13 changed files
with
70 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# This file is part of LitePCIe. | ||
# | ||
# Copyright (c) 2015-2018 Florent Kermarrec <[email protected]> | ||
# Copyright (c) 2015-2023 Florent Kermarrec <[email protected]> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
from migen import * | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# | ||
# This file is part of LitePCIe. | ||
# | ||
# Copyright (c) 2015-2022 Florent Kermarrec <[email protected]> | ||
# Copyright (c) 2015-2023 Florent Kermarrec <[email protected]> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
from migen import * | ||
|
||
from litex.gen import * | ||
|
||
from litepcie.common import * | ||
|
||
# LitePCIe Internal Ports -------------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
# | ||
# This file is part of LitePCIe. | ||
# | ||
# Copyright (c) 2015-2022 Florent Kermarrec <[email protected]> | ||
# Copyright (c) 2015-2023 Florent Kermarrec <[email protected]> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
from migen import * | ||
|
||
from litepcie.common import * | ||
from litepcie.core.common import * | ||
from litex.gen import * | ||
|
||
from litepcie.common import * | ||
from litepcie.core.common import * | ||
from litepcie.tlp.controller import LitePCIeTLPController | ||
|
||
# LitePCIe Crossbar -------------------------------------------------------------------------------- | ||
|
||
class LitePCIeCrossbar(Module): | ||
class LitePCIeCrossbar(LiteXModule): | ||
def __init__(self, data_width, address_width, max_pending_requests, cmp_bufs_buffered=True): | ||
self.data_width = data_width | ||
self.address_width = address_width | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
# | ||
# This file is part of LitePCIe. | ||
# | ||
# Copyright (c) 2015-2022 Florent Kermarrec <[email protected]> | ||
# Copyright (c) 2015-2023 Florent Kermarrec <[email protected]> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
from migen import * | ||
|
||
from litex.soc.interconnect.csr import * | ||
from litex.gen import * | ||
|
||
from litex.soc.interconnect.csr import * | ||
from litex.soc.interconnect.csr_bus import SRAM | ||
|
||
from litepcie.common import * | ||
|
||
# LitePCIeMSI -------------------------------------------------------------------------------------- | ||
|
||
class LitePCIeMSI(Module, AutoCSR): | ||
class LitePCIeMSI(LiteXModule): | ||
def __init__(self, width=32): | ||
self.irqs = Signal(width) | ||
self.source = stream.Endpoint(msi_layout()) | ||
|
@@ -49,7 +51,7 @@ def __init__(self, width=32): | |
|
||
# LitePCIeMSIMultiVector --------------------------------------------------------------------------- | ||
|
||
class LitePCIeMSIMultiVector(Module, AutoCSR): | ||
class LitePCIeMSIMultiVector(LiteXModule): | ||
def __init__(self, width=32): | ||
self.irqs = Signal(width) | ||
self.source = stream.Endpoint(msi_layout()) | ||
|
@@ -81,7 +83,7 @@ def __init__(self, width=32): | |
|
||
# LitePCIeMSIX ------------------------------------------------------------------------------------- | ||
|
||
class LitePCIeMSIX(Module, AutoCSR): | ||
class LitePCIeMSIX(LiteXModule): | ||
def __init__(self, endpoint, width=32): | ||
assert width <= 64 | ||
self.irqs = Signal(width) | ||
|
@@ -126,7 +128,7 @@ def __init__(self, endpoint, width=32): | |
self.table_port = table_port = self.table.get_port(has_re=True) | ||
self.specials += table_port | ||
|
||
self.submodules.fsm = fsm = FSM(reset_state="IDLE") | ||
self.fsm = fsm = FSM(reset_state="IDLE") | ||
fsm.act("IDLE", | ||
table_port.adr.eq(msix_num), | ||
table_port.re.eq(1), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# | ||
# This file is part of LitePCIe. | ||
# | ||
# Copyright (c) 2015-2020 Florent Kermarrec <[email protected]> | ||
# Copyright (c) 2015-2023 Florent Kermarrec <[email protected]> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
from migen import * | ||
|
||
from litex.gen import * | ||
|
||
from litex.soc.interconnect import wishbone | ||
|
||
from litepcie.common import * | ||
|
@@ -27,7 +29,7 @@ def map_wishbone_dat(address, data, wishbone_dat, qword_aligned=False): | |
|
||
# LitePCIeWishboneMaster --------------------------------------------------------------------------- | ||
|
||
class LitePCIeWishboneMaster(Module): | ||
class LitePCIeWishboneMaster(LiteXModule): | ||
def __init__(self, endpoint, | ||
address_decoder = lambda a: 1, | ||
base_address = 0x00000000, | ||
|
@@ -36,9 +38,11 @@ def __init__(self, endpoint, | |
|
||
# # # | ||
|
||
# Get Slave port from Crossbar. | ||
port = endpoint.crossbar.get_slave_port(address_decoder) | ||
|
||
self.submodules.fsm = fsm = FSM(reset_state="IDLE") | ||
# Wishbone Master FSM. | ||
self.fsm = fsm = FSM(reset_state="IDLE") | ||
fsm.act("IDLE", | ||
If(port.sink.valid & port.sink.first, | ||
If(port.sink.we, | ||
|
@@ -110,9 +114,11 @@ def __init__(self, endpoint, qword_aligned=False): | |
|
||
# # # | ||
|
||
# Get Master port from Crossbar. | ||
port = endpoint.crossbar.get_master_port() | ||
|
||
self.submodules.fsm = fsm = FSM(reset_state="IDLE") | ||
# Wishbone Slave FSM. | ||
self.fsm = fsm = FSM(reset_state="IDLE") | ||
fsm.act("IDLE", | ||
If(self.wishbone.stb & self.wishbone.cyc, | ||
If(self.wishbone.we, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# | ||
# This file is part of LitePCIe. | ||
# | ||
# Copyright (c) 2015-2021 Florent Kermarrec <[email protected]> | ||
# Copyright (c) 2015-2023 Florent Kermarrec <[email protected]> | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
from migen import * | ||
|
||
from litex.gen import * | ||
|
||
from litepcie.common import * | ||
from litepcie.common import * | ||
from litepcie.core.common import * | ||
from litepcie.tlp.common import * | ||
from litepcie.tlp.common import * | ||
|
||
# LitePCIe TLP Controller -------------------------------------------------------------------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters