[prim/packer] Revert the design prior to #634

Problem:

    `prim_packer` sent out partial data (mask_o != '1) in some case
    without `flush_i`.

While testing the `hmac_back_pressure`, the test failed at the assertion
below in `sha2_pad.sv`.

```systemverilog
  // When fifo_partial, fifo shouldn't be empty and hash_process was set
  `ASSERT(ValidPartialConditionAssert,
          fifo_partial && fifo_rvalid |-> hash_process_flag,
          clk_i, !rst_ni)
```

It complains when it receives not full word data from MSG_FIFO wihout
`hash_process` indication from the software. It means, something wrong
happens along the data path from TL-UL interface to sha2_pad logic.

The mask (which creates `fifo_partial`) is generated in `prim_packer`.
While reviewing the logic again, I found that the PR #634 I assumed
`prim_packer` has 64 bit internal registers (InW := 32 and OutW := 32).

But, when I designed it, I made it to have `max(InW, OutW)`, so if the
stored data + incoming data size exceeds `MaxW`, the logic should lower
`ready_o`. It worked well before changing the design.

While adding FPV assertions internally, I've assumed it wrong and
changed the design to store the incoming data if current stored data
size is less than or equal to `OutW`.

Resolution:

    Rolled-back the `prim_packer` to original and increased `pos_next`
    size to accomodate `InW + OutW` value, which is `Width + 1`.

This is related to #19

[prim/packer] Add more assertions for solid FPV
2 files changed
tree: fa54962bd0b2e3cee35e7c6ecf05bfcbbc5b6458
  1. .github/
  2. ci/
  3. doc/
  4. hw/
  5. site/
  6. sw/
  7. test/
  8. util/
  9. .clang-format
  10. .gitignore
  11. .style.yapf
  12. _index.md
  13. azure-pipelines.yml
  14. CONTRIBUTING.md
  15. LICENSE
  16. meson.build
  17. meson_init.sh
  18. meson_options.txt
  19. python-requirements.txt
  20. README.md
  21. toolchain.txt
README.md

OpenTitan

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.

Documentation

The project contains comprehensive documentation of all IPs and tools. You can either access it online or build it locally by following the steps below.

  1. Download and install hugo-extended.

  2. Ensure that you have the required Python modules installed (to be executed in the repository root):

$ sudo apt install python3 python3-pip
$ pip3 install --user -r python-requirements.txt
  1. Execute the build script:
$ ./util/build_docs.py --preview

This compiles the documentation into ./build/docs and starts a local server, which allows you to access the documentation at http://127.0.0.1:1313.

How to contribute

Have a look at CONTRIBUTING for guidelines how to contribute code to this repository.

Licensing

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).