[entropy_src] add smoketest back to CI
- for now do not disable boot bypass as it causes boot health checks to get stuck
Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/top_earlgrey/dv/chip_sim_cfg.hjson b/hw/top_earlgrey/dv/chip_sim_cfg.hjson
index cfe7a5c..1cf77c6 100644
--- a/hw/top_earlgrey/dv/chip_sim_cfg.hjson
+++ b/hw/top_earlgrey/dv/chip_sim_cfg.hjson
@@ -187,6 +187,12 @@
en_run_modes: ["sw_test_mode"]
}
{
+ name: chip_dif_entropy_smoketest
+ uvm_test_seq: chip_sw_base_vseq
+ sw_images: ["sw/device/tests/dif_entropy_smoketest:1"]
+ en_run_modes: ["sw_test_mode"]
+ }
+ {
name: chip_dif_gpio_smoketest
uvm_test_seq: chip_sw_gpio_smoke_vseq
sw_images: ["sw/device/tests/dif_gpio_smoketest:1"]
diff --git a/sw/device/lib/dif/dif_entropy.c b/sw/device/lib/dif/dif_entropy.c
index 22a2621..5425f4a 100644
--- a/sw/device/lib/dif/dif_entropy.c
+++ b/sw/device/lib/dif/dif_entropy.c
@@ -18,6 +18,9 @@
static void set_config_register(const dif_entropy_t *entropy,
const dif_entropy_config_t *config) {
// TODO: Make this configurable at the API level.
+ // TODO: Currently bypass disable cannot be set, as it causes the hw fsm to
+ // get stuck
+ // uint32_t reg = 0;
uint32_t reg =
bitfield_bit32_write(0, ENTROPY_SRC_CONF_BOOT_BYPASS_DISABLE_BIT, 1);
diff --git a/sw/device/tests/dif/dif_entropy_smoketest.c b/sw/device/tests/dif/dif_entropy_smoketest.c
index e78d18b..dbdf288 100644
--- a/sw/device/tests/dif/dif_entropy_smoketest.c
+++ b/sw/device/tests/dif/dif_entropy_smoketest.c
@@ -15,12 +15,9 @@
const size_t kEntropyDataNumWords = 12;
-// TODO: These values are specific to verilator right now and will not work
-// for DV or FPGA, see #5941
const uint32_t kExpectedEntropyData[] = {
- 0x0a3f4df0, 0x4e36fad2, 0xb5f3e0b9, 0x918f5ec0, 0x54ddd680, 0x62f04975,
- 0x700cf2f2, 0x61044bfe, 0x723d6c89, 0xe2d70e19, 0x5f02a234, 0xbf586fcc,
-
+ 0x65585497, 0xac95d5b1, 0xb2741ebf, 0x055cb180, 0x114d19be, 0x9f27b7f7,
+ 0x9fbe250d, 0x5ae130f0, 0xf9a679a2, 0x1a4af3e5, 0xa436f52f, 0x613e0635,
};
bool test_main() {
@@ -58,8 +55,8 @@
// wait for entropy to become available
while (dif_entropy_read(&entropy, &entropy_data[i]) != kDifEntropyOk)
;
- // LOG_INFO("received %x, expectecd %x", entropy_data[i],
- // kExpectedEntropyData[i]);
+ LOG_INFO("received %x, expectecd %x", entropy_data[i],
+ kExpectedEntropyData[i]);
CHECK(entropy_data[i] == kExpectedEntropyData[i]);
}
diff --git a/test/systemtest/config.py b/test/systemtest/config.py
index 9ec2008..8c53555 100644
--- a/test/systemtest/config.py
+++ b/test/systemtest/config.py
@@ -69,14 +69,9 @@
{
"name": "dif_csrng_smoketest",
},
- # TODO: The entropy smoketest is too unstable without #5941.
- # Any change in the processor sequence causes the timing of the disable / enable to change
- # and thus might produce different results. This test will be completely removed for
- # now until the feature is ready.
- # {
- # "name": "dif_entropy_smoketest",
- # "targets": ["sim_verilator"],
- # },
+ {
+ "name": "dif_entropy_smoketest",
+ },
{
"name": "flash_ctrl_test",
},