[otbn] Fix instructions that both read and write x1 The code was writing to the wrong address (one too high). This patch fixes things by defining stack_wr_idx to be the address to which we should write. It's normally equal to stack_wr_ptr_q (one above the top of the stack), but gets decremented by one if we're popping too. The patch also renames stack_rd_ptr to stack_rd_idx so that things of length StackDepthW are called "idx" and things of length StackDepthW+1 are called "ptr": hopefully this will make things a bit easier to understand. 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).