Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hmac] V2(S) Signoff #22471

Closed
andreaskurth opened this issue Apr 8, 2024 · 9 comments · Fixed by #23939
Closed

[hmac] V2(S) Signoff #22471

andreaskurth opened this issue Apr 8, 2024 · 9 comments · Fixed by #23939
Assignees
Labels
Component:DV DV issue: testbench, test case, etc. IP:hmac Type:Signoff

Comments

@andreaskurth
Copy link
Contributor

No description provided.

@andreaskurth andreaskurth added Component:DV DV issue: testbench, test case, etc. IP:hmac labels Apr 8, 2024
@andreaskurth andreaskurth added this to the Earlgrey-PROD.M4 milestone Apr 8, 2024
@martin-velay
Copy link
Contributor

martin-velay commented Jun 6, 2024

Commits since HMAC D2(S) Signoff (#20996)


git rev-parse HEAD

ea5bce9

git log d7483116b80bf56ce2b8e665c679872de3f3794d..HEAD --oneline hw/ip/hmac

  • 99ce062 [hmac, dv] Fix ValidHmacEnConditionAssert
    -> RTL fix for assertion
  • 01a2089 [hmac,rtl/dv] DV synchronization and error handling fixes
    -> RTL fix
  • f489ff7 [hmac,rtl] HMAC FSM RTL fixes to handle SAR
    -> RTL fix
  • 7d8ace2 [dv] Remove default value for wait_to_issue_reset argument
  • 6c51bc0 [hmac,dv] DV fixes for block-level tests
  • ee5f4a1 [sram_ctrl] Add readback feature
    -> Not linked
  • f9f6fe5 [hmac,csrs/rtl] Add key_swap field and expose hmac idle status
    -> will be test later [hmac,dv] Verify HMAC idle status #23380
  • aace3c0 [hmac,rtl/dv] RTL and DV fixes for digest loading and error handling
    -> RTL fix and tested
  • 76b1c74 [hmac,dv] DV synchronization fixes for do_read_check
  • c1fa322 [hmac,rtl] Minor HMAC fixes for secret key wiping
    -> key wipping is tested, but maybe still need to add DV assertions with uvm_hdl_read to verify if all the sensitive registers have been wipped.
  • 5a74a15 [hmac/rtl] Fix idle_o when told to stop
    -> RTL fix
  • e71da1c [hmac/rtl] Wait for digest of complete block when stopping
    -> RTL fix
  • dbe6169 [prim_sha2_pad,rtl] Go to idle (without padding) when told to stop
    -> RTL fix
  • e01609e [hmac,doc] Documentation fixes
  • 128d609 [hmac,dv] Scoreboard checks for different digest sizes
  • e120a95 [hmac/prim_2,rtl] Do not clear redundant digest values
    -> RTL change: spec and DV have been aligned
  • ed04dc9 [hmac, doc] Update HMAC context saving guide
  • f189ae8 [hmac, doc] Update programmers guide for streaming
  • 5bc6e0a [hmac, rtl] Fix indexing bug/typo
    -> RTL fix
  • ab878b5 [hmac/dv] Cleanups and coverage fixes/improvements
  • e2eff20 [hmac,dv] Extend DV to test invalid configurations
  • c859a39 [hmac/prim_sha2,rtl] Implement SW error for invalid HMAC config
    -> DV and doc have been updated accordingly
  • 4bc1570 [prim_sha2,rtl/dv] Fix secret value wiping
    -> Closing [hmac/rtl] Overwrite internal values with WIPE_SECRET instead of XOR'ing with it #22555
  • 0d0ce1a [hmac/dv] Cleanups without functional impact
  • dc848b3 [sram_ctrl,prim,rtl] Fix tlul_we -> ready timing path.
    -> Not linked
  • 8295903 [bazel,autogen_hjson] Split C and rust header generation
    -> Not linked
  • 30d7e78 (tag: Earlgrey-PROD-M2-RC5, tag: Earlgrey-PROD-M2) Add the project name to the copyright header
    -> Not linked
  • d01864e Fix or waive Python lint errors and warnings
    -> Not linked
  • f4c2bb9 Remove trailing whitespaces
    -> Not linked
  • 5b9f3a9 [hmac] Sign off at V1
  • d562315 [hmac/dv] Add testplan items for recently added features
  • 7fa9df0 [hmac] Sign off at D2S
  • 90aba7a [hmac,doc] Documentation updates
  • 5084b38 [hmac] Coding style and minor fixes

Issues closed since HMAC D2(S) Signoff (#20996)


Issues closed since HMAC D2(S) Signoff

Currently open issues


Coverage report from TODO


TODO add screenshot here
I ran a regression with Xcelium which seems to don't give a nice HTML page. This regression is based on the branch sar_dv with some local change as #23538 and #23529 were not merged yet.
Here is the temporary status:

### Test Results                                                                                                                                                                                                                   
|  Stage  |                   Name                    | Tests                           |  Max Job Runtime  |  Simulated Time  |  Passing  |  Total  |  Pass Rate  |                                                               
|:-------:|:-----------------------------------------:|:--------------------------------|:-----------------:|:----------------:|:---------:|:-------:|:-----------:|                                                               
|   V1    |                   smoke                   | hmac_smoke                      |      1.750m       |     1.809ms      |    50     |   50    |  100.00 %   |                                                               
|   V1    |               csr_hw_reset                | hmac_csr_hw_reset               |      1.533m       |     65.634us     |     5     |    5    |  100.00 %   |                                                               
|   V1    |                  csr_rw                   | hmac_csr_rw                     |      1.617m       |     34.456us     |    20     |   20    |  100.00 %   |                                                               
|   V1    |               csr_bit_bash                | hmac_csr_bit_bash               |      1.817m       |     1.274ms      |     5     |    5    |  100.00 %   |                                                               
|   V1    |               csr_aliasing                | hmac_csr_aliasing               |      1.700m       |    584.677us     |     5     |    5    |  100.00 %   |                                                               
|   V1    |        csr_mem_rw_with_rand_reset         | hmac_csr_mem_rw_with_rand_reset |      21.783m      |     98.312ms     |    20     |   20    |  100.00 %   |                                                               
|   V1    | regwen_csr_and_corresponding_lockable_csr | hmac_csr_rw                     |      1.617m       |     34.456us     |    20     |   20    |  100.00 %   |                                                               
|         |                                           | hmac_csr_aliasing               |      1.700m       |    584.677us     |     5     |    5    |  100.00 %   |                                                               
|   V1    |                                           | **TOTAL**                       |                   |                  |    105    |   105   |  100.00 %   |                                                               
|   V2    |                 long_msg                  | hmac_long_msg                   |      3.467m       |     8.642ms      |    50     |   50    |  100.00 %   |                                                               
|   V2    |               back_pressure               | hmac_back_pressure              |      2.250m       |    743.318us     |    50     |   50    |  100.00 %   |                                                               
|   V2    |               test_vectors                | hmac_test_sha_vectors           |      12.483m      |     31.675ms     |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_test_hmac_vectors          |      1.467m       |    160.202us     |    50     |   50    |  100.00 %   |                                                               
|   V2    |                 burst_wr                  | hmac_burst_wr                   |      2.533m       |     1.378ms      |    50     |   50    |  100.00 %   |                                                               
|   V2    |              datapath_stress              | hmac_datapath_stress            |      5.967m       |     2.429ms      |    50     |   50    |  100.00 %   |                                                               
|   V2    |                   error                   | hmac_error                      |      6.900m       |     45.729ms     |    50     |   50    |  100.00 %   |                                                               
|   V2    |                wipe_secret                | hmac_wipe_secret                |      2.967m       |     53.650ms     |    50     |   50    |  100.00 %   |                                                               
|   V2    |             save_and_restore              | hmac_smoke                      |      1.750m       |     1.809ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_long_msg                   |      3.467m       |     8.642ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_back_pressure              |      2.250m       |    743.318us     |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_datapath_stress            |      5.967m       |     2.429ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_burst_wr                   |      2.533m       |     1.378ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_stress_all                 |      58.933m      |    495.304ms     |    50     |   50    |  100.00 %   |                                                               
|   V2    |    wide_digest_configurable_key_length    | hmac_smoke                      |      1.750m       |     1.809ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_long_msg                   |      3.467m       |     8.642ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_back_pressure              |      2.250m       |    743.318us     |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_datapath_stress            |      5.967m       |     2.429ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_burst_wr                   |      2.533m       |     1.378ms      |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_error                      |      6.900m       |     45.729ms     |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_wipe_secret                |      2.967m       |     53.650ms     |    50     |   50    |  100.00 %   |                                                               
|         |                                           | hmac_stress_all                 |      58.933m      |    495.304ms     |    50     |   50    |  100.00 %   |                                                               
|   V2    |                stress_all                 | hmac_stress_all                 |      58.933m      |    495.304ms     |    50     |   50    |  100.00 %   |                                                               
|   V2    |                alert_test                 | hmac_alert_test                 |      1.467m       |     20.575us     |    50     |   50    |  100.00 %   |                                                               
|   V2    |                 intr_test                 | hmac_intr_test                  |      1.550m       |     25.901us     |    50     |   50    |  100.00 %   |                                                               
|   V2    |           tl_d_oob_addr_access            | hmac_tl_errors                  |      1.583m       |    206.467us     |    20     |   20    |  100.00 %   |                                                               
|   V2    |            tl_d_illegal_access            | hmac_tl_errors                  |      1.583m       |    206.467us     |    20     |   20    |  100.00 %   |                                                               
|   V2    |          tl_d_outstanding_access          | hmac_csr_hw_reset               |      1.533m       |     65.634us     |     5     |    5    |  100.00 %   |                                                               
|         |                                           | hmac_csr_rw                     |      1.617m       |     34.456us     |    20     |   20    |  100.00 %   |                                                               
|         |                                           | hmac_csr_aliasing               |      1.700m       |    584.677us     |     5     |    5    |  100.00 %   |                                                               
|         |                                           | hmac_same_csr_outstanding       |      1.633m       |    554.558us     |    20     |   20    |  100.00 %   |                                                               
|   V2    |            tl_d_partial_access            | hmac_csr_hw_reset               |      1.533m       |     65.634us     |     5     |    5    |  100.00 %   |                                                               
|         |                                           | hmac_csr_rw                     |      1.617m       |     34.456us     |    20     |   20    |  100.00 %   |                                                               
|         |                                           | hmac_csr_aliasing               |      1.700m       |    584.677us     |     5     |    5    |  100.00 %   |                                                               
|         |                                           | hmac_same_csr_outstanding       |      1.633m       |    554.558us     |    20     |   20    |  100.00 %   |                                                               
|   V2    |                                           | **TOTAL**                       |                   |                  |    590    |   590   |  100.00 %   |                                                               
|   V2S   |                tl_intg_err                | hmac_sec_cm                     |      1.500m       |    287.689us     |     5     |    5    |  100.00 %   |                                                               
|         |                                           | hmac_tl_intg_err                |      1.733m       |    124.403us     |    20     |   20    |  100.00 %   |                                                               
|   V2S   |           sec_cm_bus_integrity            | hmac_tl_intg_err                |      1.733m       |    124.403us     |    20     |   20    |  100.00 %   |                                                               
|   V2S   |                                           | **TOTAL**                       |                   |                  |    25     |   25    |  100.00 %   |                                                               
|   V3    | write_config_and_secret_key_during_msg_wr | hmac_smoke                      |      1.750m       |     1.809ms      |    50     |   50    |  100.00 %   |                                                               
|   V3    |        stress_all_with_rand_reset         | hmac_stress_all_with_rand_reset |      1.109h       |    123.761ms     |    11     |   200   |   5.50 %    |                                                               
|   V3    |                                           | **TOTAL**                       |                   |                  |    11     |   200   |   5.50 %    |                                                               
|         |                                           | **TOTAL**                       |                   |                  |    731    |   920   |   79.46 %   |                                                               

## Coverage Results                                                                                                                                                                                                                

### [Coverage Dashboard](/home/dev/src/scratch/sar_dv/hmac-sim-xcelium/cov_report/index.html)                                                                                                                                      

|  Score  |  Block  |  Branch  |  Statement  |  Expression  |  Toggle  |   Fsm   |  Assertion  |  CoverGroup  |                                                                                                                    
|:-------:|:-------:|:--------:|:-----------:|:------------:|:--------:|:-------:|:-----------:|:------------:|                                                                                                                    
| 96.40 % | 96.50 % | 91.75 %  |   97.47 %   |   95.27 %    | 96.53 %  | 94.74 % |   98.48 %   |   98.62 %    |        

Summary


RTL has been mainly impacted by some important changes:

Remaining efforts:

@martin-velay
Copy link
Contributor

martin-velay commented Jun 6, 2024

New issue raised since above snapshot:

@moidx
Copy link
Contributor

moidx commented Jun 11, 2024

Discussed moving as P1 to M5 due to RTL risk analysis performed during last issue triage.

@vogelpi
Copy link
Contributor

vogelpi commented Jul 1, 2024

Alright, AFAIK all outstanding PRs have been merged and issues addresses. @martin-velay is currently investigating an issue with FSM coverage but after that we should be able to close V2S.

@martin-velay
Copy link
Contributor

Here are the latest updates: #23683

Coverage results in this comment: #23683 (comment). This includes the UNR exclusions from this PR #23916 which is not merged yet.

The FSM cov is still a bit lower than 90%, and here is the reason: #23683 (comment)

@vogelpi
Copy link
Contributor

vogelpi commented Jul 5, 2024

Thanks @martin-velay , I've feed back on the FSM coverage issue. I believe this should be coverable but it may need very precise timing.

I've merged the updated UNR file.

@andreaskurth
Copy link
Contributor Author

andreaskurth commented Jul 5, 2024

Thanks for the V2S review, @martin-velay, and all your work on this, also to @gdessouky!

I reviewed the following commits, which change the RTL of HMAC and/or the SHA2 prims it instantiates:

Those RTL changes LGTM.

Test pass rates are excellent overall (today 100% including V3 tests!), though the fifo_empty_status_interrupt testpoint currently has no tests assigned with it. Since PR #23749, the scoreboard includes checks for this feature, so we just need to list the appropriate tests.

Coverage numbers are very good (94 to 100%) except FSM, which is known and for which an exclusion is being added.

None of the open issues prevents us from signing HMAC off at V2S in my view.

In conclusion, once the exclusions for FSM coverage are in (#23948) and the fifo_empty_status_interrupt testpoint has tests assigned with it (#23945), I agree with signing HMAC off at V2S (#23939).

@gdessouky
Copy link
Contributor

Exclusions for the FSM coverage per our discussion here #23683 have been added in #23948.

@gdessouky
Copy link
Contributor

FSM coverage is now at 97% with the additional FSM exclusions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. IP:hmac Type:Signoff
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants