Skip to content

Support test termination on write-into-tohost with bit 0 set

Created by: zchamski

This PR is the core-c-verif counterpart of the matching CVA6 PR https://github.com/openhwgroup/cva6/pull/1075. It implements the test termination based on RISC-V HTIF (host-target interface) convention:

  • write an odd value (bit 0 set) into variable tohost; NOTE: this variable must be part of the test program.
  • bits above bit 0 represent the return code of the test program.

Differences wrt. the original HTIF protocol:

  • size of the checked value:
    • HTIF protocol: tohost is always 64 bits wide.
    • CVA6: only the lower XLEN bits of tohost are checked in 32b configurations (instead of the full 48 bits of 'payload').
  • detail of the checks:
    • HTIF protocol: an "end-of-test value" should have bit 0 set, bits 63:48 cleared, and bits 47:1 are the test result.
    • CVA6: no checks are done on bits 63:48, test result in 32b configurations is limited to the lower part stored in bits 31:1.

Merge request reports

Loading