From 958a3554cc6f281f91c2faa3b5e04cf30b2ac4eb Mon Sep 17 00:00:00 2001 From: Aki Van Ness Date: Mon, 18 Nov 2024 16:56:48 -0800 Subject: [PATCH] squishy: gateware: peripheral: Stubbed out the SPI PSRAM Controller --- squishy/gateware/peripherals/psram.py | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 squishy/gateware/peripherals/psram.py diff --git a/squishy/gateware/peripherals/psram.py b/squishy/gateware/peripherals/psram.py new file mode 100644 index 00000000..57f22ad9 --- /dev/null +++ b/squishy/gateware/peripherals/psram.py @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: BSD-3-Clause + +''' + +''' + +from enum import IntEnum, auto, unique + +from ..platform import SquishyPlatformType +from torii import Elaboratable, Module, Signal +from torii.lib.fifo import AsyncFIFO + + +@unique +class SPIPSRAMCmd(IntEnum): + ''' SPI PSRAM Command Opcodes ''' + READ = 0x03 + WRITE = 0x02 + FAST_READ = 0x0B + RESET_ENABLE = 0x66 + RESET = 0x99 + READ_ID = 0x9F + SET_BURST_LEN = 0xC0 + +class SPIPSRAM(Elaboratable): + ''' + + This module primarily implements the SPI interface for the ISSI ``IS66WVS2M8ALL/BLL``/``IS67WVS2M8ALL/BLL`` + SPI PSRAM. The datasheet can be found `here `_. + + + + ''' + + def __init__(self) -> None: + pass + + def elaborate(self, platform: SquishyPlatformType | None) -> Module: + m = Module() + + + + return m