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

[spi_device] D2 Signoff #20974

Closed
msfschaffner opened this issue Jan 25, 2024 · 3 comments · Fixed by #21798
Closed

[spi_device] D2 Signoff #20974

msfschaffner opened this issue Jan 25, 2024 · 3 comments · Fixed by #21798

Comments

@msfschaffner
Copy link
Contributor

Description

Ensure D2 signoff criteria are fulfilled after focus area changes have landed.

@a-will
Copy link
Contributor

a-will commented Feb 27, 2024

Changes since ES tape-out

NEW_FEATURES

A 2-stage pipeline was added as an optional path for flash reads with dummy cycles, so as to effect higher clock rates for compatible commands (especially Quad Output Read).

In addition, generic mode and support for SPI timings other than mode 0 were dropped (these are related features).

The rest of the changes do not precisely amount to new features. Instead, they are sometimes significant refinements of the implementation to fix bugs.

BLOCK_DIAGRAM

Updated in #21656

DOC_INTERFACE

No changes since tape-out, so all still documented.

DOC_INTEGRATION_GUIDE

Added clocking requirements in the documentation here:

SPI Device requires the core clock to have a frequency that is at least 1/4 the SPI clock frequency.

MISSING_FUNC

The missing compatibility with the TPM spec is documented in these two places:

The TPM over SPI submodule processes the low level data only, and it is not compliant with the SPI TPM command timing specifications.

Note that firmware is in the loop to process write commands to these registers.
Consequently, the TPM over SPI submodule cannot meet timing requirements for updated data to be available within one wait state.
Once firmware writes the CSRs, the submodule can return the data as specified, however.

FEATURE_FROZEN

TBD after review meeting, but expected to be.

FEATURE_COMPLETE

  • SPI_DEVICE.MODE.FLASH_EMULATION
  • SPI_DEVICE.MODE.PASSTHROUGH
  • SPI_DEVICE.MODE.TPM
  • SPI_DEVICE.HW.LANES
  • SPI_DEVICE.HW.SERDES_ORDERING
  • SPI_DEVICE.HW.CSB_STATUS
  • SPI_DEVICE.MODE.FLASH_EMULATION.COMMANDS
  • SPI_DEVICE.HW.FLASH_EMULATION_BLOCKS
  • SPI_DEVICE.MODE.FLASH_EMULATION.READ_COMMAND_PROCESSOR
  • SPI_DEVICE.MODE.FLASH_EMULATION.DUMMY_CYCLE
  • SPI_DEVICE.MODE.FLASH_EMULATION.WRITE_ENABLE_DISABLE
  • SPI_DEVICE.HW.LAST_READ_ADDR
  • SPI_DEVICE.HW.CMDINFOS
  • SPI_DEVICE.HW.COMMAND_UPLOAD
  • SPI_DEVICE.HW.3B4B_ADDRESSING
  • SPI_DEVICE.MODE.PASSTHROUGH.CMD_FILTER
  • SPI_DEVICE.MODE.PASSTHROUGH.ADDRESS_MANIPULATION
  • SPI_DEVICE.MODE.PASSTHROUGH.STATUS_MANIPULATION
  • SPI_DEVICE.MODE.PASSTHROUGH.OUTPUT_ENABLE_CONTROL
  • SPI_DEVICE.MODE.PASSTHROUGH.INTERCEPT_EN
  • SPI_DEVICE.MODE.PASSTHROUGH.MAILBOX
  • SPI_DEVICE.MODE.TPM.RETURN-BY-HW_REGS
  • SPI_DEVICE.MODE.TPM.AUTO_WAIT
  • SPI_DEVICE.MODE.TPM.READ_FIFO_MODE
  • SPI_DEVICE.MODE.TPM.CAPABILITY

PORT_FROZEN

Only interrupt ports changed:

-  // INTR: Generic mode
-  output logic intr_generic_rx_full_o,              // RX FIFO Full
-  output logic intr_generic_rx_watermark_o,         // RX FIFO above level
-  output logic intr_generic_tx_watermark_o,         // TX FIFO below level
-  output logic intr_generic_rx_error_o,             // RX Frame error
-  output logic intr_generic_rx_overflow_o,          // RX Async FIFO Overflow
-  output logic intr_generic_tx_underflow_o,         // TX Async FIFO Underflow
+  output logic intr_tpm_rdfifo_cmd_end_o,
+  output logic intr_tpm_rdfifo_drop_o,

ARCHITECTURE_FROZEN

RAMs

  • Support for 1r1w RAMs has been added, but it is not used in earlgrey.
    • Access controls are the same for 2p RAMs, though.
    • Egress section is write-only for SW.
    • Ingress section is read-only for SW.
  • The 64B TPM Write FIFO and TPM Read FIFO have been moved to the bigger SRAMs.
    • No longer separate.

CSRs

CONTROL:
- CONTROL.ABORT
+ CONTROL.FLASH_STATUS_FIFO_CLR
+ CONTROL.FLASH_READ_BUFFER_CLR
- CONTROL.MODE:fwmode
+ CONTROL.MODE:disabled
- CONTROL.RST_TXFIFO
- CONTROL.RST_RXFIFO
- CONTROL.SRAM_CLK_EN

CFG:
- CFG.CPOL
- CFG.CPHA
- CFG.TIMER_V
- CFG.ADDR_4B_EN

+ ADDR_MODE:
+ ADDR_MODE.ADDR_4B_EN
+ ADDR_MODE.PENDING

- FIFO_LEVEL
- ASYNC_FIFO_LEVEL

STATUS:
- STATUS.rxf_full
- STATUS.rxf_empty
- STATUS.txf_full
- STATUS.txf_empty
- STATUS.abort_done

- RXF_PTR
- TXF_PTR
- RXF_ADDR
- TXF_ADDR

- FLASH_STATUS.status (bits = 23:1, rw)
+ FLASH_STATUS.wel (bits = 1, rw1c)
+ FLASH_STATUS.status (bits = 23:2, rw)

+ UPLOAD_CMDFIFO.busy
+ UPLOAD_CMDFIFO.wel
+ UPLOAD_CMDFIFO.addr4b_mode

+ CMD_INFO*.read_pipeline_mode

- TPM_STATUS.wrfifo_depth
+ TPM_STATUS.wrfifo_pending
+ TPM_STATUS.rdfifo_aborted

- TPM_WRITE_FIFO

REVIEW_TODO

STYLE_X

There are no uses of X in spi_device.

CDC_SYNCMACRO

The synchronization macros are used in most places. However, there is some SPI-specific behavioral logic in some cases where a prim_flop_2sync is used to synchronize a control signal that marks some data as being stable / ready to sample, with the data changing domains in behavioral logic. This is a "fire-and-forget" analogue to prim_sync_reqack_data.

LINT_PASS

Passes lint.

image

CDC_SETUP

No CDC flow available.

RDC_SETUP

No RDC flow available.

AREA_CHECK

FPGA-based area difference from ES:

Type ES Now
LUTs 3509 3594
Flops 3173 3047

The dual-port RAM size is the same.

TIMING_CHECK

Timing continues to pass on the FPGA, with no apparent significant impact to the overall budgets (though there is a lot of slack in both cases). Some of the worst paths are gone now, which is due to the clock network simplification and removal of generic mode.

SEC_CM_DOCUMENTED

N/A. There are no security countermeasures for this block.

@msfschaffner
Copy link
Contributor Author

msfschaffner commented Mar 1, 2024

Thanks for putting this together @a-will!
This has been reviewed together with @hcallahan-lowrisc @vogelpi @antmarzam @msfschaffner and @rswarbrick today.

Open action items for closing out D2S:

  • Remove irrelevant ICEBOX TODOs and close associated issue as not planned
  • Update outdated checklist
    • Remove outdated D1 FUNC_IMPLEMENTED comment on checklist
    • Update waived and N/A items on D2 (DOC_INTEGRATION_GUIDE, MISSING_FUNC)

@a-will
Copy link
Contributor

a-will commented Mar 4, 2024

The action items were covered by #21795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants