Professional Documents
Culture Documents
#include "cxrh_cmn.s"
#include "cxrh_extmat_set.h"
#include "cxrh_extmat_data.s"
#include "cxrh_handler.s"
ope_work_begin:
sram_test_area:
.space (4)
ope_work_end:
ope_init_begin:
.word 0x12345678
ope_init_end:
.extern _main
_main:
init_proc_begin:
init_proc_end:
point_test_start:
sysc_proc_begin:
sysc_proc_end:
port_proc_begin:
port_proc_end:
csc_proc_begin:
csc_proc_end:
intc_proc_begin:
intc_proc_end:
flash_proc_begin:
flash_proc_end:
test_proc_begin:
test_id_set 0x00000001
write_sfr32 A_MSR_ISO_MSRKCPROT,0xa5a5a501
addreg_loopwait 200
--;;;---- trigger force by stimulus
//for ETH0_PHY_INT P14_8 ALT_IN5 v103//
test_id_set 0x00010000
addreg_loopwait 50
test_id_set 0x00010001
addreg_loopwait 50
test_id_set 0x00010010
addreg_loopwait 50
test_id_set 0x00010011
addreg_loopwait 50
test_id_set 0x00010020
addreg_loopwait 50
test_id_set 0x00010021
addreg_loopwait 50
test_id_set 0x00010030
addreg_loopwait 50
test_id_set 0x00010031
addreg_loopwait 50
//release signals.
test_id_set 0x00010099
addreg_loopwait 50
test_id_set 0x10010000
addreg_loopwait 50
test_id_set 0x10010001
addreg_loopwait 50
test_id_set 0x10010002
addreg_loopwait 50
test_id_set 0x10010003
addreg_loopwait 50
test_id_set 0x10010010
addreg_loopwait 50
test_id_set 0x10010011
addreg_loopwait 50
test_id_set 0x10010012
addreg_loopwait 50
test_id_set 0x10010013
addreg_loopwait 50
test_id_set 0x10010020
addreg_loopwait 50
test_id_set 0x10010021
addreg_loopwait 50
test_id_set 0x10010022
addreg_loopwait 50
test_id_set 0x10010023
addreg_loopwait 50
test_id_set 0x10010030
addreg_loopwait 50
test_id_set 0x10010031
addreg_loopwait 50
test_id_set 0x10010032
addreg_loopwait 50
test_id_set 0x10010033
addreg_loopwait 50
//release signals.
test_id_set 0x10010099
addreg_loopwait 50
-----------------------------------------------------
test_id_set 0x99999999
test_proc_end:
pushsp r10-r12
cmp_proc_begin:
cmp_mem32 ope_init_begin,0x12345678,0xffffffff
cmp_proc_end:
point_test_end:
jmp_test_end_seq
inst_end:
_icum_main:
jmp_error_end_seq
Header file
This declares a section named "SAREA_OPE_WORK" with attributes "aw" (allocatable and writable).
"SAREA_OPE_WORK": this operation work section area to write and store variables, buffers, or other data structures that are
allocatable: This means that the section is allocatable, and space will be reserved for it in the memory during the linking proce
writable: This means that the contents of the section can be modified during the program's execution. Data and variables ofte
executable: This means that the contents of the section can be executed as code. Instructions and executable code typically fa
only.
This declares a section named "SAREA_OPE_INIT" with attributes "ax" (allocatable and executable).
"SAREA_OPE_INIT": this operation initialization section area used to store data or variables that are specifically used during t
settings, default values, or parameters will be set at the beginning of the program execution.
This marks the beginning of the operation initialization section.
Initializes a 32-bit word with the value `0x12345678` (a check to ensure that the initialization was successful - which means ini
This marks the end of the operation initialization section.
This declares a section named "SAREA_INST" with attributes "ax" (allocatable and executable).
"SAREA_INST": this instruction section area used as a section of memory where executable code resides. This could include th
program.
This declares an external section named "_main."
This is the entry point for the program. The code following this label initializes various processes, sets configurations, and trigg
These labels mark the beginning of the initialization process.
These labels mark the end of the initialization process.
These labels mark the beginning of point_test process.
These labels mark the beginning of the initialization process.
These labels mark the end of the initialization process.
These labels mark the beginning of the initialization process.
These labels mark the end of the initialization process.
These labels mark the beginning of the initialization process.
These labels mark the end of the initialization process.
These labels mark the beginning of the initialization process.
These labels mark the end of the initialization process.
These labels mark the beginning of the initialization process.
These labels mark the end of the initialization process.
These labels mark the beginning of test_proc process.
Comments explaining the purpose of the following code. (thiết lập hệ thống clock cho CPU)
Redundancy.
Section 2.5.34: PWE — Port Write Enable register (FFFF_FFFF means enable write access to all ports)
This part is used to setting port alternative function for pointed signal by writing value to the Port Control Register.
2.5.25 PCRn_m/JPCR0,1_m — Port Control Register
Use PCR register to setting a port's function.
register_value_calcu
lation.xlsx
after writing, disable access to prevent invalid write into these registers.
after writing, disable access to prevent invalid write into these registers.
test_id_set is used to create the timeline of testbench (specify the points in which the force events are occurred.
wait an amount of time to finish port setting (completely force value to signal - prevent glitch).
test_id_set is used to create the timeline of testbench (specify the points in which the force events are occurred.
wait an amount of time to finish port setting (completely force value to signal - prevent glitch).
This part is iterative to setting port alternative function for others pointed signals.