| commit | 71f19edb3fd7331291abd6c2bbe5c51557faba39 | [log] [tgz] |
|---|---|---|
| author | Eli Kim <eli@opentitan.org> | Tue Oct 04 15:12:08 2022 -0700 |
| committer | Eli Kim <github@elikim.dev> | Tue Oct 04 17:32:46 2022 -0700 |
| tree | a58962dec8d4d79351a36a980b37c203f717e974 | |
| parent | 101063ebdfd099f8eefaf2c80ae0cfbf5a5cb8f9 [diff] |
fix(spid): Latch FIFOADDR at correct time _Related Issue: https://github.com/lowRISC/opentitan/issues/15266_ This PR fixes a bug for unaligned access in TPM read commands. fifoaddr is latched with the counter being `'h1F`. The counter, however, runs on SPI_CLK, while the latching logic is running on inverted SPI_CLK domain. As a result, the latching logic captures the fifo address at a cycle earlier with prematured address. So it always assume address[1] as address[0]. This commit fixes the issue by: 1. Convert `sck_fifoaddr_latch` into iSCK domain. 2. To not shift the address one bit more, use `sck_cmdaddr_wdata_q` rather than `sck_cmdaddr_wdata_d`. Signed-off-by: Eli Kim <eli@opentitan.org>

OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING and our documentation on project organization and processes for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).