chipsalliance / caliptra-rtl

HW Design Collateral for Caliptra RoT IP
Apache License 2.0
67 stars 36 forks source link

KAT failed when simulation #549

Closed morris-c-mao closed 2 months ago

morris-c-mao commented 3 months ago

Simulation Env:

Sympton (identical on RTL v1.0 or commit 41b77ba) :

Description

We are doing RTL/ROM simulation to make sure integration is good and encounter simulation results as above. Besides simulation, we also build Xilinx FPGA. FPGA works with KAT. We think it might not be ROM issue because RV's AHB accesses are as expected. For example, with ROM v1.0.2, RV reads sha256 results from controller and ROM. This is as expected. However the comparing result is NG. Are there something we missed?

BTW, is a new release, like v1.1, coming soon?

bharatpillilli commented 2 months ago

1.1 is tagged a week or so ago. May be ROM+RTL combo you are using?

morris-c-mao commented 2 months ago

We tried v1.1. The symptoms are the same no matter combining with ROM v1.0.1 or v1.0.2.

morris-c-mao commented 2 months ago

Update:

The Fatal Error is because data output from DCCM is not latched by following Flip-Flop correctly. If we change DCCM from real SRAM model fo Flip-Flop type, KAT simulation is passed. Or adding unit delay on SRAM output also helps.

Nitsirks commented 2 months ago

Thanks for the update Morris. The integration spec details the SRAM implementation here, for future reference: https://github.com/chipsalliance/caliptra-rtl/blob/main/docs/CaliptraIntegrationSpecification.md#sram-timing-behavior

morris-c-mao commented 2 months ago

Thanks Nitsirks. The SRAM timing matches document, model or Flip-Flop type. We guess the issue is because of simulation enviornment, maybe our setting or simulator, Cadence Xcelium, itself. We will try Synopsys VCS when we have chance.