OpenCores
URL https://opencores.org/ocsvn/zpu/zpu/trunk

Subversion Repositories zpu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 79 to Rev 80
    Reverse comparison

Rev 79 → Rev 80

/trunk/zpu/docs/images/spi_read_timing.png Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/zpu/docs/images/spi_read_timing.png Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/zpu/docs/images/spi_timing_overview.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/zpu/docs/images/spi_timing_overview.png =================================================================== --- trunk/zpu/docs/images/spi_timing_overview.png (nonexistent) +++ trunk/zpu/docs/images/spi_timing_overview.png (revision 80)
trunk/zpu/docs/images/spi_timing_overview.png Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/zpu/docs/images/spi_readfast_timing.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/zpu/docs/images/spi_readfast_timing.png =================================================================== --- trunk/zpu/docs/images/spi_readfast_timing.png (nonexistent) +++ trunk/zpu/docs/images/spi_readfast_timing.png (revision 80)
trunk/zpu/docs/images/spi_readfast_timing.png Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: trunk/zpu/docs/zpu_arch.html =================================================================== --- trunk/zpu/docs/zpu_arch.html (revision 79) +++ trunk/zpu/docs/zpu_arch.html (revision 80) @@ -28,6 +28,7 @@
  • Zealot: Implementing in FPGAs
  • Optimizing for code size
  • Installing eCos build tools +
  • SPI flash controller
  • Next generation ZPU @@ -1618,6 +1619,83 @@ zpu-elf-size hello.elf
    + + + +

    SPI flash controller (read-only)

    +This is a simple read-only SPI flash controller, with the following characteristics: + +
    +
  • Fast-READ only implementation. +
  • 32-bit only access +
  • Fast sequential read access - Uses low-clock approach
  • +
    + +

    Version

    +The current version is 1.2. This is also the first public version available. + +

    Timing overview

    + +

    Simple timing overview, with one nonsequential access to address 0x0, followed by a sequential access to address 0x4. +This simulation was done with Xilinx tools, after post-routing, and using a ZPU to access the SPI

    +
    + + +

    Image 1: Timing overview

    +
    + +On Image 2, you can see the clock almost perfectly centered on data, when we write to the SPI flash. + +
    + +

    Image 2: Issuing commands to the SPI

    +
    + +As you can see from Image 3, I assume the worst-case read delay from SPI (which is 15ns, as you can see from the marker). + +
    + +

    Image 3: Reading from the SPI

    +
    + +

    Usage

    + +Simple description of SPI controller interface: + + + + + + + + + + + + + + + + + + +
    SymbolDirectionBit widthPurpose
    adrInput24Address where to read from SPI
    dat_oOutput32Data read from SPI
    clkInput1Input clock. Used for both interface and SPI
    ceInput1Chip Enable
    rstInput1Asynchronous reset
    ackOutput1Data valid ACK
    SPI_CLKOutput1SPI output clock
    SPI_MOSIOutput1SPI output data from controller to chip
    SPI_MISOInput1SPI input data from chip to controller
    SPI_SELNOutput1SPI nSEL (deselect, active low) signal
    + + + +

    License

    +The Verilog implementation is released under BSD license. See the file itself for more licensing details. + +

    Dowload

    +Download the Verilog code here: spi_controller.v + +

    Troubleshooting

    +The current implementation is timed and optimized for myself. Your parameters might not be the same +as those I defaulted, so read the code carefully. If you have any issue let me know. + + + +

    Zealot: Implementing in FPGAs

  • © copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.