File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ module tb;
2626 wire peri_clk;
2727 wire peri_rst_n;
2828
29+ logic [3 : 0 ] spi_host_sd;
30+ logic [3 : 0 ] spi_host_sd_en;
31+
2932 // ------ Interfaces ------
3033 clk_rst_if sys_clk_if (.clk (clk), .rst_n (rst_n));
3134 clk_rst_if peri_clk_if (.clk (peri_clk), .rst_n (peri_rst_n));
@@ -64,6 +67,20 @@ module tb;
6467 .spi_device_sd_en_o ( ),
6568 .spi_device_sd_i (4'hF ),
6669 .spi_device_tpm_csb_i (1'b0 ),
70+ // SPI host.
71+ .spi_host_sck_o ( ),
72+ .spi_host_sck_en_o ( ),
73+ .spi_host_csb_o ( ),
74+ .spi_host_csb_en_o ( ),
75+ .spi_host_sd_o (spi_host_sd ),
76+ .spi_host_sd_en_o (spi_host_sd_en ),
77+ // Mapping output 0 to input 1 because legacy SPI does not allow
78+ // bi-directional wires.
79+ // This only works in standard mode where sd_o[0]=COPI and
80+ // sd_i[1]=CIPO.
81+ .spi_host_sd_i ({ 2'b0 ,
82+ spi_host_sd_en[0 ] ? spi_host_sd[0 ] : 1'b0 ,
83+ 1'b0 } ),
6784 // DRAM.
6885 .dram_req_o (dram_req ),
6986 .dram_resp_i (dram_resp )
Original file line number Diff line number Diff line change 116116 sw_images: ["spi_device_smoketest_cheri_bare:5"]
117117 run_opts: ["+ChipMemSRAM_image_file={run_dir}/spi_device_smoketest_cheri_bare.vmem"]
118118 }
119+ {
120+ name: spi_host_smoke
121+ uvm_test_seq: top_chip_dv_base_vseq
122+ sw_images: ["spi_host_smoketest_vanilla_bare:5"]
123+ run_opts: ["+ChipMemSRAM_image_file={run_dir}/spi_host_smoketest_vanilla_bare.vmem"]
124+ }
125+ {
126+ name: spi_host_smoke_cheri
127+ uvm_test_seq: top_chip_dv_base_vseq
128+ sw_images: ["spi_host_smoketest_cheri_bare:5"]
129+ run_opts: ["+ChipMemSRAM_image_file={run_dir}/spi_host_smoketest_cheri_bare.vmem"]
130+ }
119131 {
120132 name: i2c_host_tx_rx
121133 uvm_test_seq: top_chip_dv_i2c_host_tx_rx_vseq
195207 "test_framework_exception_test_cheri",
196208 "spi_device_smoke",
197209 "spi_device_smoke_cheri",
210+ "spi_host_smoke",
211+ "spi_host_smoke_cheri",
198212 "gpio_smoke",
199213 "mailbox_smoke",
200214 "mailbox_smoke_cheri",
You can’t perform that action at this time.
0 commit comments