Skip to content

Commit

Permalink
[spi_dev, test] Add an extra sync step in the tmp test
Browse files Browse the repository at this point in the history
This will be important to run the test on sival.

Signed-off-by: Douglas Reis <[email protected]>
  • Loading branch information
engdoreis committed Jan 15, 2024
1 parent 8ad34f8 commit 13071aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hw/top_earlgrey/dv/env/seq_lib/chip_sw_spi_device_tpm_vseq.sv
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class chip_sw_spi_device_tpm_vseq extends chip_sw_base_vseq;
end
tpm_txn (.wr(1), .addr(addr), .data_q(data_q), .len(data_q.size()), .rdata_q(rdata_q));

`DV_WAIT(cfg.sw_logger_vif.printed_log == "SYNC: Waiting Read",
"Timedout waiting for read config.")

// Read transaction
tpm_txn (.wr(0), .addr(addr), .len(data_q.size()), .rdata_q(rdata_q));
foreach (rdata_q[i]) begin
Expand Down
3 changes: 3 additions & 0 deletions sw/device/tests/sim_dv/spi_device_tpm_tx_rx_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ bool test_main(void) {
// Finished processing the write command
ack_spi_tpm_header_irq(&spi_device);

LOG_INFO("SYNC: Waiting Read");
// Send the written data right back out for reads.

// Wait for read interrupt.
atomic_wait_for_interrupt();
// Send the written data right back out for reads.
Expand Down

0 comments on commit 13071aa

Please sign in to comment.