commit | 7af9f1a0bc7ea2754bf41e0ef309223c837ec0df | [log] [tgz] |
---|---|---|
author | Rupert Swarbrick <rswarbrick@lowrisc.org> | Fri Mar 04 12:05:48 2022 +0000 |
committer | Rupert Swarbrick <rswarbrick@gmail.com> | Sat Mar 05 18:36:23 2022 +0000 |
tree | fe67d7900702cedd1269da001c2364337ebda8d9 | |
parent | 620a9d1b32a73d9c35f859e04eddc99d36cc04f9 [diff] |
[keymgr,dv] Fix some enum casting problems The cast that we add in keymgr_scoreboard.sv to current_op_status is to silence warnings from Xcelium where you have to be explicit about converting from an integral type to an enum. Here, we know that the conversion is safe because we've just checked that the value equals OpDoneSuccess or OpDoneFail. The other two changes also fix Xcelium warnings, but possibly change the meaning of the code (for the better!). For example, in keymgr_base_vseq, we are reading a 3-bit register. We were then forcing it to be of type keymgr_ops_e, but that enum doesn't actually have an item for the bit pattern 3'b111. Fortunately, we only ever use the result to compare it with enum values so we can just store the integral value instead, avoiding the cast. The only need for the "cast_operation" variable is now to generate a debug message. The same argument applies to current_design_state (which is used as an output parameter to csr_rd). 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 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).