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

[prim_count] Register err_o to avoid potential CDC issues downstream #24125

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

vogelpi
Copy link
Contributor

@vogelpi vogelpi commented Jul 25, 2024

This is related to #24119.

This is related to lowRISC#24119.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this will slightly change which cycle the signal appears at, but maybe we only expect this to happen when someone injects an error (so we don't really care about the timings). Is that correct?

@rswarbrick
Copy link
Contributor

CHANGE AUTHORIZED: hw/ip/prim/rtl/prim_count.sv

Copy link
Contributor

@msfschaffner msfschaffner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think this will mostly break DV or FPV if anything.
The error condition itself is treated as asynchronous in general.

@msfschaffner
Copy link
Contributor

CHANGE AUTHORIZED: hw/ip/prim/rtl/prim_count.sv

@msfschaffner
Copy link
Contributor

You may want to double check this with the corresponding FPV TB:
https://github.com/lowRISC/opentitan/blob/master/hw/ip/prim/fpv/tb/prim_count_tb.sv

@vogelpi
Copy link
Contributor Author

vogelpi commented Jul 25, 2024

Thanks for the pointers @msfschaffner and @rswarbrick , FPV looks fine:

dev@2f8cf6446c25:~/src$ util/dvsim/dvsim.py hw/top_earlgrey/formal/top_earlgrey_fpv_prim_cfgs.hjson --select-cfg=prim_count_max_reset_fpv                                                 
INFO: [dvsim] [proj_root]: /home/dev/src                                                                                                                                                  
INFO: [OneShotCfg] [scratch_path]: [prim_count_max_reset_fpv] [/home/dev/src/scratch/prim-count-fix/prim_count_max_reset_fpv-formal-fpv-jaspergold]                                       
WARNING: [Deploy] prim_count_max_reset_fpv:default: jaspergold is unsupported for job runtime extraction. Using dvsim-maintained job_runtime instead.                                     
INFO: [FlowCfg] [results]: [prim_count_max_reset_fpv]:                                                                                                                                    
## PRIM_COUNT_MAX_RESET_FPV Formal FPV Results                                                                                                                                            
                                                                                                                                                                                          
### Thursday July 25 2024 14:16:12 UTC
### GitHub Revision: [`3b00ed85f6`](https://github.com/lowrisc/opentitan/tree/3b00ed85f668db9c8cf6f8e62a2ed638cd87cea2)
### Branch: prim-count-fix
### Tool: JASPERGOLD


## Formal FPV Results
|           name           |  errors  |  warnings  |  proven  |  cex  |  undetermined  |  covered  |  unreachable  |  pass_rate  |  cov_rate  |
|:------------------------:|:--------:|:----------:|:--------:|:-----:|:--------------:|:---------:|:-------------:|:-----------:|:----------:|
| prim_count_max_reset_fpv |   0 E    |    0 W     |   14 G   |  0 E  |      0 W       |   13 G    |      0 E      |  100.00 %   |  100.00 %  |

## Coverage Results
### Coverage html file dir: /home/dev/src/scratch/prim-count-fix/prim_count_max_reset_fpv-formal-fpv-jaspergold/default/formal-icarus

|  formal  |  stimuli  |  checker  |
|:--------:|:---------:|:---------:|
| 96.08 %  | 100.00 %  |  94.74 %  |

INFO: [FlowCfg] [scratch_path]: [prim_count_max_reset_fpv] [/home/dev/src/scratch/prim-count-fix/prim_count_max_reset_fpv-formal-fpv-jaspergold]
INFO: [FormalCfg] [result summary]: ## TOP_EARLGREY_PRIM_FPV Formal FPV Results (Summary)

### Thursday July 25 2024 14:16:12 UTC
### GitHub Revision: [`3b00ed85f6`](https://github.com/lowrisc/opentitan/tree/3b00ed85f668db9c8cf6f8e62a2ed638cd87cea2)
### Branch: prim-count-fix

|           name           |  pass_rate  |  formal_cov  |  stimuli_cov  |  checker_cov  |
|:------------------------:|:-----------:|:------------:|:-------------:|:-------------:|
| prim_count_max_reset_fpv |  100.00 %   |   96.08 %    |   100.00 %    |    94.74 %    |

          [   legend    ]: [Q: queued, D: dispatched, P: passed, F: failed, K: killed, T: total]                                                                                          
00:00:18  [    build    ]: [Q: 0, D: 0, P: 1, F: 0, K: 0, T: 1] 100%                         

and

dev@2f8cf6446c25:~/src$ util/dvsim/dvsim.py hw/top_earlgrey/formal/top_earlgrey_fpv_prim_cfgs.hjson --select-cfg=prim_count_zero_reset_fpv
INFO: [dvsim] [proj_root]: /home/dev/src
INFO: [OneShotCfg] [scratch_path]: [prim_count_zero_reset_fpv] [/home/dev/src/scratch/prim-count-fix/prim_count_zero_reset_fpv-formal-fpv-jaspergold]
WARNING: [Deploy] prim_count_zero_reset_fpv:default: jaspergold is unsupported for job runtime extraction. Using dvsim-maintained job_runtime instead.
INFO: [FlowCfg] [results]: [prim_count_zero_reset_fpv]:
## PRIM_COUNT_ZERO_RESET_FPV Formal FPV Results

### Thursday July 25 2024 14:17:38 UTC
### GitHub Revision: [`3b00ed85f6`](https://github.com/lowrisc/opentitan/tree/3b00ed85f668db9c8cf6f8e62a2ed638cd87cea2)
### Branch: prim-count-fix
### Tool: JASPERGOLD


## Formal FPV Results
|           name            |  errors  |  warnings  |  proven  |  cex  |  undetermined  |  covered  |  unreachable  |  pass_rate  |  cov_rate  |
|:-------------------------:|:--------:|:----------:|:--------:|:-----:|:--------------:|:---------:|:-------------:|:-----------:|:----------:|
| prim_count_zero_reset_fpv |   0 E    |    0 W     |   14 G   |  0 E  |      0 W       |   13 G    |      0 E      |  100.00 %   |  100.00 %  |

## Coverage Results
### Coverage html file dir: /home/dev/src/scratch/prim-count-fix/prim_count_zero_reset_fpv-formal-fpv-jaspergold/default/formal-icarus

|  formal  |  stimuli  |  checker  |
|:--------:|:---------:|:---------:|
| 96.08 %  | 100.00 %  |  94.74 %  |

INFO: [FlowCfg] [scratch_path]: [prim_count_zero_reset_fpv] [/home/dev/src/scratch/prim-count-fix/prim_count_zero_reset_fpv-formal-fpv-jaspergold]
INFO: [FormalCfg] [result summary]: ## TOP_EARLGREY_PRIM_FPV Formal FPV Results (Summary)

### Thursday July 25 2024 14:17:38 UTC
### GitHub Revision: [`3b00ed85f6`](https://github.com/lowrisc/opentitan/tree/3b00ed85f668db9c8cf6f8e62a2ed638cd87cea2)
### Branch: prim-count-fix

|           name            |  pass_rate  |  formal_cov  |  stimuli_cov  |  checker_cov  |
|:-------------------------:|:-----------:|:------------:|:-------------:|:-------------:|
| prim_count_zero_reset_fpv |  100.00 %   |   96.08 %    |   100.00 %    |    94.74 %    |

          [   legend    ]: [Q: queued, D: dispatched, P: passed, F: failed, K: killed, T: total]                                                                                          
00:00:16  [    build    ]: [Q: 0, D: 0, P: 1, F: 0, K: 0, T: 1] 100%

@vogelpi
Copy link
Contributor Author

vogelpi commented Jul 25, 2024

This looks good from a CI perspective, too. There are some FPGA test failures but the failing tests are known to be flaky or currently broken USB tests:

//sw/device/silicon_creator/rom/e2e/reset_reason:reset_reason_check_disabled_no_fault_fpga_cw310_rom_with_fake_keys FLAKY, failed in 1 out of 2 in 12.8s
  Stats over 2 runs: max = 12.8s, min = 1.6s, avg = 7.2s, dev = 5.6s
//sw/device/silicon_creator/rom/e2e/reset_reason:reset_reason_check_disabled_with_fault_fpga_cw310_rom_with_fake_keys FLAKY, failed in 1 out of 2 in 12.5s
  Stats over 2 runs: max = 12.5s, min = 1.6s, avg = 7.1s, dev = 5.4s
//sw/device/silicon_creator/rom/e2e/rom_ext_upgrade_interrupt:rom_ext_upgrade_interrupt_rma_fpga_cw310_rom_with_fake_keys FLAKY, failed in 1 out of 2 in 13.4s
  Stats over 2 runs: max = 13.4s, min = 0.8s, avg = 7.1s, dev = 6.3s
//sw/device/tests:usbdev_mixed_test_fpga_cw310_rom_with_fake_keys       TIMEOUT in 2 out of 2 in 60.0s
  Stats over 2 runs: max = 60.0s, min = 60.0s, avg = 60.0s, dev = 0.0s
//sw/device/tests:usbdev_stream_test_fpga_cw310_rom_with_fake_keys      TIMEOUT in 2 out of 2 in 60.0s
  Stats over 2 runs: max = 60.0s, min = 60.0s, avg = 60.0s, dev = 0.0s

@vogelpi vogelpi merged commit a39b4c7 into lowRISC:master Jul 25, 2024
31 of 33 checks passed
@vogelpi vogelpi added ECO Accepted as an ECO and removed ECO_C A potential candidate for an ECO labels Jul 25, 2024
vogelpi added a commit to vogelpi/opentitan that referenced this pull request Aug 6, 2024
With lowRISC#24125, we added a register to the error output
of all prim_count instances. This adds an additional delay until errors
become actually visible via CSRs (e.g. main_sm_state, err_code). This
commit adds a corresponding wait statement to take this into
account.

This resolves lowRISC#24226.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
vogelpi added a commit that referenced this pull request Aug 8, 2024
With #24125, we added a register to the error output
of all prim_count instances. This adds an additional delay until errors
become actually visible via CSRs (e.g. main_sm_state, err_code). This
commit adds a corresponding wait statement to take this into
account.

This resolves #24226.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
andreaskurth pushed a commit to andreaskurth/opentitan that referenced this pull request Aug 10, 2024
With lowRISC#24125, we added a register to the error output
of all prim_count instances. This adds an additional delay until errors
become actually visible via CSRs (e.g. main_sm_state, err_code). This
commit adds a corresponding wait statement to take this into
account.

This resolves lowRISC#24226.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
andreaskurth pushed a commit to andreaskurth/opentitan that referenced this pull request Aug 12, 2024
With lowRISC#24125, we added a register to the error output
of all prim_count instances. This adds an additional delay until errors
become actually visible via CSRs (e.g. main_sm_state, err_code). This
commit adds a corresponding wait statement to take this into
account.

This resolves lowRISC#24226.

This is a cherry pick of commit a43f5a3
to branch earlgrey_1.0.0.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
andreaskurth pushed a commit that referenced this pull request Aug 12, 2024
With #24125, we added a register to the error output
of all prim_count instances. This adds an additional delay until errors
become actually visible via CSRs (e.g. main_sm_state, err_code). This
commit adds a corresponding wait statement to take this into
account.

This resolves #24226.

This is a cherry pick of commit a43f5a3
to branch earlgrey_1.0.0.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
@vogelpi vogelpi deleted the prim-count-fix branch September 17, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ECO Accepted as an ECO
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants