-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPI Engine: improve test_sleep_delay #110
Conversation
Check for sleep delay being affected by SPI word size (should not be affected) Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
Signed-off-by: Laez Barbosa <laez.barbosa@analog.com>
@@ -281,7 +296,7 @@ task sleep_delay_test( | |||
// Write commands | |||
axi_write (`SPI_ENGINE_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_CMD_FIFO), `INST_CFG); | |||
axi_write (`SPI_ENGINE_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_CMD_FIFO), `INST_PRESCALE); | |||
axi_write (`SPI_ENGINE_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_CMD_FIFO), `INST_DLENGTH); | |||
axi_write (`SPI_ENGINE_SPI_REGMAP_BA + GetAddrs(AXI_SPI_ENGINE_CMD_FIFO), ((`INST_DLENGTH) & 32'hFFFF_FF00) | 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The situation of this line:
Masking INST_DLENGHT
set on common/sv/spi_engine_instr_pkg.sv because it has a default value: DATA_DLENGTH
.
DATA_DLENGTH
is set on the cfg filespi_engine/cfgs/cfg_inv_cs.tcl
e.g, spi_engine/cfgs/cfg_inv_cs.tcl
Wouldn't it be better to be a macro call, e.g. `INST_DLENGTH(`DATA_DLENGTH)
, `INST_DLENGTH(16)
Only spi_engine currently uses spi_engine_instr_pkg.sv
Same for any instruction that take a value, CLOCK_DIVIDER
->INST_PRESCALE
etc
@@ -50,7 +50,7 @@ import test_harness_env_pkg::*; | |||
//--------------------------------------------------------------------------- | |||
// SPI Engine configuration parameters | |||
//--------------------------------------------------------------------------- | |||
localparam PCORE_VERSION = 32'h0001_0200; | |||
localparam PCORE_VERSION = 32'h0001_0201; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not take this value from common/sv/adi_regmap_spi_engine_pkg.sv
and avoid having to update test on version bump ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe my comments can be resolved in a future pr
Check for sleep delay being affected by SPI word size (should not be affected). Complements analogdevicesinc/hdl#1361