How do I debug a single test?
The simplest way of debugging a single test is to do the following: In the file $PROJECTSIM/px310_ref_design/validation/system/source/test_code/default.c: Add the line: extern avSYS_eTestResponse <peripheral>_Action<number> (avSYS_SystemElement * SysData) ; for instance: extern avSYS_eTestResponse uart_pl011_Action6 (avSYS_SystemElement * SysData) ; in a manner similar to the others there Call the test action by adding: SYS_ActionRun(<peripheral>_InitialTest_Name, &<peripheral>_Action<number>, &avSYS_SystemData[<peripheral instance name>]) ; for instance: SYS_ActionRun(uart_pl011_InitialTest_Name, &uart_pl,011_Action6, &avSYS_SystemData[asicUART_PL011_0]) ; where <peripheral> is the name of the peripheral, e.g. uart_pl011, Action<number> is the name of the test, e.g. Action6, Action14 etc, and <peripheral instance name> refers to the instance of the peripheral in peripherals_list.SIM, e.g. asicUART_PL011_0.
SYS_ActionRun is, in fact, called by the framework function avSYS_AllActionSheetRun to run the individual test. The best place to put this line is just before the line which reads #ifdef avTEST_COMPONENT. That way, the test will be run before all the others that are run by invoking them from avSYS_AllActionSheetRun. Using the Framework function SYS_ActionRun() emsures that the result will be logged and any exceptions captured. Having said that, there's nothing to stop you writing a test in the 'normal' C (or for that matter, in assembler, if you're feeling brave...) way and just calling the function from main (or default.c). Doing this would obviously prevent it from being included in the pass/fail figures, though.
 |