Skip to content

Commit f4fd17f

Browse files
authored
SPI Engine: update test for SDO idle state control (#115)
Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
1 parent 1a8e5a3 commit f4fd17f

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

common/sv/adi_regmap_spi_engine_pkg.sv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// ***************************************************************************
3434
// ***************************************************************************
3535
/* Auto generated Register Map */
36-
/* Tue Jun 25 17:14:36 2024 */
36+
/* Wed Jul 24 09:28:37 2024 */
3737

3838
package adi_regmap_spi_engine_pkg;
3939
import adi_regmap_pkg::*;
@@ -43,8 +43,8 @@ package adi_regmap_spi_engine_pkg;
4343

4444
const reg_t AXI_SPI_ENGINE_VERSION = '{ 'h0000, "VERSION" , '{
4545
"VERSION_MAJOR": '{ 31, 16, RO, 'h00000001 },
46-
"VERSION_MINOR": '{ 15, 8, RO, 'h00000002 },
47-
"VERSION_PATCH": '{ 7, 0, RO, 'h00000001 }}};
46+
"VERSION_MINOR": '{ 15, 8, RO, 'h00000003 },
47+
"VERSION_PATCH": '{ 7, 0, RO, 'h00000000 }}};
4848
`define SET_AXI_SPI_ENGINE_VERSION_VERSION_MAJOR(x) SetField(AXI_SPI_ENGINE_VERSION,"VERSION_MAJOR",x)
4949
`define GET_AXI_SPI_ENGINE_VERSION_VERSION_MAJOR(x) GetField(AXI_SPI_ENGINE_VERSION,"VERSION_MAJOR",x)
5050
`define DEFAULT_AXI_SPI_ENGINE_VERSION_VERSION_MAJOR GetResetValue(AXI_SPI_ENGINE_VERSION,"VERSION_MAJOR")

common/sv/spi_engine_instr_pkg.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package spi_engine_instr_pkg;
1212
`define INST_WRD (32'h0000_0300 | (`NUM_OF_WORDS-1))
1313

1414
// Configuration register instructions
15-
`define INST_CFG (32'h0000_2100 | (`THREE_WIRE << 2) | (`CPOL << 1) | `CPHA)
15+
`define INST_CFG (32'h0000_2100 | (`SDO_IDLE_STATE << 3) | (`THREE_WIRE << 2) | (`CPOL << 1) | `CPHA)
1616
`define INST_PRESCALE (32'h0000_2000 | `CLOCK_DIVIDER)
1717
`define INST_DLENGTH (32'h0000_2200 | `DATA_DLENGTH)
1818

spi_engine/cfgs/cfg1.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set ad_project_params(DATA_DLENGTH) 18
2020
set ad_project_params(THREE_WIRE) 0
2121
set ad_project_params(CPOL) 0
2222
set ad_project_params(CPHA) 1
23+
set ad_project_params(SDO_IDLE_STATE) 0
2324
set ad_project_params(SLAVE_TIN) 0
2425
set ad_project_params(SLAVE_TOUT) 0
2526
set ad_project_params(MASTER_TIN) 0

spi_engine/cfgs/cfg_inv_cs.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set ad_project_params(DATA_DLENGTH) 18
2020
set ad_project_params(THREE_WIRE) 0
2121
set ad_project_params(CPOL) 0
2222
set ad_project_params(CPHA) 1
23+
set ad_project_params(SDO_IDLE_STATE) 0
2324
set ad_project_params(SLAVE_TIN) 0
2425
set ad_project_params(SLAVE_TOUT) 0
2526
set ad_project_params(MASTER_TIN) 0

spi_engine/tests/test_program.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import adi_spi_vip_pkg::*;
5252
//---------------------------------------------------------------------------
5353
// SPI Engine configuration parameters
5454
//---------------------------------------------------------------------------
55-
localparam PCORE_VERSION = 32'h0001_0201;
55+
localparam PCORE_VERSION = 32'h0001_0300;
5656

5757
program test_program (
5858
inout spi_engine_irq,
@@ -339,7 +339,7 @@ task fifo_spi_test();
339339
#100ns
340340
// Generate a FIFO transaction, write SDO first
341341
repeat (`NUM_OF_WORDS) begin
342-
axi_write (`SPI_ENGINE_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_SDO_FIFO), (16'hDEAD << (`DATA_WIDTH - `DATA_DLENGTH)));
342+
axi_write (`SPI_ENGINE_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_SDO_FIFO), (16'hDEAC ));
343343
end
344344

345345
// Enqueue transfer to DUT

spi_engine/tests/test_sleep_delay.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import adi_spi_vip_pkg::*;
5050
//---------------------------------------------------------------------------
5151
// SPI Engine configuration parameters
5252
//---------------------------------------------------------------------------
53-
localparam PCORE_VERSION = 32'h0001_0201;
53+
localparam PCORE_VERSION = 32'h0001_0300;
5454

5555
program test_sleep_delay (
5656
inout spi_engine_irq,

0 commit comments

Comments
 (0)