Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateware.wishbone.spiflash: add SPIFlashPeripheral #32

Merged
merged 6 commits into from
Jun 27, 2024

Conversation

mndza
Copy link
Contributor

@mndza mndza commented Jun 14, 2024

Replaces WishboneSPIFlashReader, providing the same functionality with additional features and improvements.

  • Optional port for commanding the Flash device directly, enable it with with_master=True. A crossbar with a round-robin scheduling scheme is instanced to share the same SPIPHYController.

  • Clocks can differ between the SPIPHYController and the SPIFlashPeripheral instances. A CDC module is created automatically in those cases.

Usage:

spi_phy    = SPIPHYController(pads, domain="sync", divisor=1)
spi_master = SPIFlashPeripheral(spi_phy, mmap_size=0x400000, mmap_name="spiflash", domain="usb")

# spi_master.bus is the memory-mapped bus.
# spi_master.master is the raw command interface.

Replaces `WishboneSPIFlashReader`, providing the same functionality with
additional features and improvements.

- Optional port for commanding the Flash device directly, enable it
  with `with_master=True`. A crossbar with a round-robin scheduling
  scheme is instanced to share the same `SPIPHYController`.

- Clocks can differ between the `SPIPHYController` and the
  `SPIFlashPeripheral` instances. A CDC module is created
  automatically in those cases.
@mndza mndza marked this pull request as ready for review June 27, 2024 06:55
Copy link
Member

@antoinevg antoinevg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@antoinevg antoinevg merged commit 4dd3548 into greatscottgadgets:main Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants