Open badeaa3 opened 4 months ago
Goal 1
Copying over from #12
OP_CODE list (GitHub)
typedef enum logic [3:0] { // operation_code enumerated type
OP_CODE_NOOP = 4'h0,
OP_CODE_W_RST_FW = 4'h1,
OP_CODE_W_CFG_STATIC_0 = 4'h2,
OP_CODE_R_CFG_STATIC_0 = 4'h3,
OP_CODE_W_CFG_STATIC_1 = 4'h4,
OP_CODE_R_CFG_STATIC_1 = 4'h5,
OP_CODE_W_CFG_ARRAY_0 = 4'h6,
OP_CODE_R_CFG_ARRAY_0 = 4'h7,
OP_CODE_W_CFG_ARRAY_1 = 4'h8,
OP_CODE_R_CFG_ARRAY_1 = 4'h9,
OP_CODE_R_DATA_ARRAY_0 = 4'hA,
OP_CODE_R_DATA_ARRAY_1 = 4'hB,
OP_CODE_W_STATUS_FW_CLEAR= 4'hC,
OP_CODE_W_EXECUTE = 4'hD
} op_code;
ROUTINE_test_loopback_CFG_STATIC
ROUTINE_test_loopback_CFG_STATIC
OPTest for OP_CODE_NOOP
Executing test routine for OP_CODE_NOOP
*******************************************
Starting register value sw_write32_0 = 754974719
Write to sw_write32_0: True. Wrote 553648127 and register reads 553648127. hex_list = ["4'h2", "4'h0", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Pass
*******************************************
Test for OP_CODE_W_RST_FW
sw_read_32_0
expect a 0sw_read32_1
I see https://github.com/Fermilab-Microelectronics/cms_pix_28_test_firmware/blob/main/src/fw_ip2.sv#L179Executing test routine for OP_CODE_W_RST_FW
*******************************************
Starting register value sw_write32_0 = 553648127
Write to sw_write32_0: True. Wrote 570425343 and register reads 570425343. hex_list = ["4'h2", "4'h1", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Expected value and actual read from sw_read32_0: 0 and 0 -> Pass
Expected value and actual read from sw_read32_1: 1 and 1 -> Pass
Pass
*******************************************
Tests for:
Executing test routine for OP_CODE_W_CFG_STATIC_0, OP_CODE_R_CFG_STATIC_0, OP_CODE_W_CFG_STATIC_1, and OP_CODE_R_CFG_STATIC_1
*****************************************************************************************************************************
Starting register value sw_write32_0 = 570425343
Write to sw_write32_0: True. Wrote 570425343 and register reads 570425343. hex_list = ["4'h2", "4'h1", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Write to sw_write32_0: True. Wrote 754974719 and register reads 754974719. hex_list = ["4'h2", "4'hC", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
-------------------------------------------------------------------------------
Executing test routine for OP_CODE_W_CFG_STATIC_0 and OP_CODE_R_CFG_STATIC_0
Starting register value sw_write32_0 = 754974719
Write to sw_write32_0: True. Wrote 570425610 and register reads 570425610. hex_list = ["4'h2", "4'h2", "11'h0", "1'h0", "1'h0", "5'h4", "6'ha"]
Write to sw_write32_0: True. Wrote 587202826 and register reads 587202826. hex_list = ["4'h2", "4'h3", "11'h0", "1'h0", "1'h0", "5'h4", "6'ha"]
Expected value and actual read from sw_read32_0: 266 and 266 -> Pass
Expected value and actual read from sw_read32_1: 6 and 6 -> Pass
Sending OP_CODE_W_STATUS_FW_CLEAR to clean up.
Starting register value sw_write32_0 = 587202826
Write to sw_write32_0: True. Wrote 754974719 and register reads 754974719. hex_list = ["4'h2", "4'hC", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Expected value and actual read from sw_read32_0: 0 and 0 -> Pass
Expected value and actual read from sw_read32_1: 0 and 0 -> Pass
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Executing test routine for OP_CODE_W_CFG_STATIC_1 and OP_CODE_R_CFG_STATIC_1
Starting register value sw_write32_0 = 754974719
Write to sw_write32_0: True. Wrote 603980042 and register reads 603980042. hex_list = ["4'h2", "4'h4", "11'h0", "1'h0", "1'h0", "5'h4", "6'ha"]
Write to sw_write32_0: True. Wrote 620757258 and register reads 620757258. hex_list = ["4'h2", "4'h5", "11'h0", "1'h0", "1'h0", "5'h4", "6'ha"]
Expected value and actual read from sw_read32_0: 266 and 266 -> Pass
Expected value and actual read from sw_read32_1: 24 and 24 -> Pass
Sending OP_CODE_W_STATUS_FW_CLEAR to clean up.
Starting register value sw_write32_0 = 620757258
Write to sw_write32_0: True. Wrote 754974719 and register reads 754974719. hex_list = ["4'h2", "4'hC", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Expected value and actual read from sw_read32_0: 0 and 0 -> Pass
Expected value and actual read from sw_read32_1: 0 and 0 -> Pass
-------------------------------------------------------------------------------
Pass
*****************************************************************************************************************************
Tests for:
Executing test routine for OP_CODE_W_CFG_ARRAY_0, OP_CODE_R_CFG_ARRAY_0, OP_CODE_W_CFG_ARRAY_1, and OP_CODE_R_CFG_ARRAY_1
*****************************************************************************************************************************
Starting register value sw_write32_0 = 754974719
Write to sw_write32_0: True. Wrote 570425343 and register reads 570425343. hex_list = ["4'h2", "4'h1", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Write to sw_write32_0: True. Wrote 754974719 and register reads 754974719. hex_list = ["4'h2", "4'hC", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
-------------------------------------------------------------------------------
Executing test routine for OP_CODE_W_CFG_ARRAY_0 and OP_CODE_R_CFG_ARRAY_0
Starting register value sw_write32_0 = 754974719
Write to sw_write32_0: True. Wrote 637534209 and register reads 637534209. hex_list = ["4'h2", "4'h6", "8'h0", "16'h1"]
Write to sw_write32_0: True. Wrote 654311425 and register reads 654311425. hex_list = ["4'h2", "4'h7", "8'h0", "16'h1"]
Expected value and actual read from sw_read32_0: 1 and 1 -> Pass
Expected value and actual read from sw_read32_1: 96 and 96 -> Pass
Sending OP_CODE_W_STATUS_FW_CLEAR to clean up.
Starting register value sw_write32_0 = 654311425
Write to sw_write32_0: True. Wrote 754974719 and register reads 754974719. hex_list = ["4'h2", "4'hC", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Expected value and actual read from sw_read32_0: 0 and 0 -> Pass
Expected value and actual read from sw_read32_1: 0 and 0 -> Pass
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Executing test routine for OP_CODE_W_CFG_ARRAY_1 and OP_CODE_R_CFG_ARRAY_1
Starting register value sw_write32_0 = 754974719
Write to sw_write32_0: True. Wrote 671088641 and register reads 671088641. hex_list = ["4'h2", "4'h8", "8'h0", "16'h1"]
Write to sw_write32_0: True. Wrote 687865857 and register reads 687865857. hex_list = ["4'h2", "4'h9", "8'h0", "16'h1"]
Expected value and actual read from sw_read32_0: 1 and 1 -> Pass
Expected value and actual read from sw_read32_1: 384 and 384 -> Pass
Sending OP_CODE_W_STATUS_FW_CLEAR to clean up.
Starting register value sw_write32_0 = 687865857
Write to sw_write32_0: True. Wrote 754974719 and register reads 754974719. hex_list = ["4'h2", "4'hC", "11'h7ff", "1'h1", "1'h1", "5'h1f", "6'h3f"]
Expected value and actual read from sw_read32_0: 0 and 0 -> Pass
Expected value and actual read from sw_read32_1: 0 and 0 -> Pass
-------------------------------------------------------------------------------
Pass
*****************************************************************************************************************************
Tests for OP_CODE_R_DATA_ARRAY_0 and OP_CODE_R_DATA_ARRAY_1
Test for OP_CODE_W_STATUS_FW_CLEAR
sw_write32_0
and sw_read32_0
return to 0 after this op code is sent. If this op code fails, then other test cases would not pass.Test for OP_CODE_W_EXECUTE
List of questions for Cristian:
sw_read32_0
?Current set of instructions to reproduce results.
Existing infrastructure at UC:
Goals: