commit | 7e131447da6d5f3044666a17974e15df44f0328b | [log] [tgz] |
---|---|---|
author | Rupert Swarbrick <rswarbrick@lowrisc.org> | Tue Jan 05 13:48:37 2021 +0000 |
committer | Rupert Swarbrick <rswarbrick@gmail.com> | Thu Jan 07 16:00:46 2021 +0000 |
tree | 86fef2a16be078c919f2e56d7a71ae22a4ac6869 | |
parent | c277e3a87b350e0177f523f866aa56e2a8969784 [diff] |
[otbn] Fix ordering problems in RIG model update logic Before this patch, Model.update_for_insn updated the model "generically", based on the instruction's operands and their types and then it called any specific update function. The problem is that we don't explicitly keep "before" and "after" versions of registers (as done by the commit() methods in the ISS), so the specific updater function could get a stale version of an input argument. This doesn't matter for most operands (because, at worst, writing an indeterminate value to the operand just forgets its value), but does matter for x1, where something like addi x2, x1, 123 ended up using the element immediately below the top of the stack when calculating the new value for x2. To fix things, we make the specialized update_for_FOO instructions call the generic update logic explicitly. That way, we can do any required reads first and apply any required changes afterwards. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.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 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).