lowRISC / lowRISC/opentitan

[spi_host] ACCESSINVAL error set, tl-ul bus error not signalled.

Open
#24,178 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:RTL IP:spi_host Type:FutureRelease
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

When writing to the TX FIFO only 1/2/4 bytes masks are allowed, any other combination means the write will be discarded but no error is signalled back at the TL-UL interface. The valid strobes are defined [here](https://github.com/lowRISC/opentitan/blob/fdfa12db04f7dd13f9a5bbe6190c79435a6ce1d6/hw/ip/spi_host/rtl/spi_host.sv#L362-L378)

You can see an example below, where the mask is 0x7, which causes an ACCESSINVAL error, but the TL-UL bus doesn't raise the `d_error` signal:
![Screenshot from 2024-07-31 11-37-58](https://github.com/user-attachments/assets/622e88b9-c57a-4432-bff6-17b233d948bf)

Is this the intended behaviour?

cc: @a-will / @vogelpi / @andreaskurth / @hcallahan-lowrisc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with hw/ip/spi_host/rtl/spi_host.sv, especially the valid strobe definitions at lines 362-378, and trace how an invalid TX FIFO write reaches the TL-UL response. Confirm whether ACCESSINVAL should assert d_error; completion requires an agreed behavior and coverage for the 0x7 mask case.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.