ATTILA Debug Public

From AttilaWiki

Jump to:navigation, search

Contents

ATTILA Debug Mode

The ATTILA simulator debug mode is enabled by adding the --debug to the command line arguments. In this mode the next parameter represents the first frame to be debugged (previous frames are skipped by the API library). The number of frames or cycles to simulate shouldn't be passed in this mode.

Example:

> bGPU-Uni --debug tracefile.txt.gz 

Debug Mode Commands

help

Displays the list of the commands supported by the simulator debug mode and a brief description of their use.


listboxes

List the names of all the simulation boxes defined in the current simulator model.


listcommands <box name>

Lists the debug commands supported by a given simulation box.

execcommand <box name> <command name>

Executes a debug command on a simulation box.


debugmode [all | <box name>] [on|off]

Enables or disables debug output (code enclosed with GPU_DEBUG() or GPU_DEBUG_BOX()) for the defined simulation box. To enable/disable the debug output for all the simulator boxes use the all name.

run (<cycles>)

Runs the simulator for the defined number of cycles (by default 1 cycle). When multiple clock domains are defined a tick of the main or GPU clock is simulated.


runframe (<frames>)

Runs the simulator for the defined number of frames (by default 1 frame).


runbatch (<batches>)

Runs the simulator for the defined number of batches (by default 1 batch). A batch is defined as all the AGP transactions until the next GPU_DRAW command is received and processed.

= runcom (<commands>)

Runs the simulator for the defined number of AGP commands (by default 1 command).

skipframe (<frames>)

Runs the simulator for the defined number of frames (by default 1 frame) but GPU_DRAW commands are ignored (which basically disables rendering) and all AGP_WRITE transactions are simulated as AGP_PRELOAD transactions (infinite BW).


skipbatch (<frames>)

Runs the simulator for the defined number of batches (by default 1 batch) but the GPU_DRAW commands are ignored (disabling rendering) and all AGP_WRITE transactions are simulated as AGP_PRELOAD transactions (infinite BW). A batch is defined as all the AGP transactions until the next GPU_DRAW command is received and processed.


state [all|<box name>]

Displays the state of the simulator and the specified simulation box state. Use all to list to ask for the state of all the simulator boxes.

savesnapshot

Saves a snapshot of the simulator state to disk. Information saved include:

The command is actually executed after all the previous commands in the GPU driver queue have been processed so the snapshot may be not be saved exactly at the same cycle it was issued. The process spends a few simulation cycles.

loadsnapshot

Loads a snapshot of the simulator state from disk. This commands allows to continue the debugging session for a trace from the same point when it was saved to memory. In the current implementation this command only works with AGP traces and with the old Memory Controller.

memoryUsage

Displays the amount of GPU and system memory already reserved by the GPU driver. The memory is defined in block (1 block should be 4 KB but may be affected by implementation changes).


listMDs

Displays a list of the GPU driver memory descriptors. A memory descriptor defines a block of GPU or system memory allocated by the GPU driver.

infoMD <md id>

Displays information about the defined GPU driver memory descriptor. A memory descriptor defines a block of GPU or system memory allocated by the GPU driver.

dumpAGPBuffer

Displays the content of the pending AGP transaction queue in the GPU driver.


memoryAlloc

Displays information about the memory allocation structures in the GPU driver.


glcontext [deprecated]

Displays information about the current OpenGL context. Only supported for the non-ACD OpenGL library.

dumpStencil [deprecated]

Dumps the content of the stencil buffer using a hack on the non-ACD OpenGL library. Only supported for the non-ACD OpenGL library. May not work.

Debug Mode Box Commands

Command Processor

forceswap

Forces a GPU_SWAP command (dump the color buffer to a file and swap front and back buffer) on the simulator. The command will be executed after the current command is processed. A run, runcom, runbatch, runframe command will be required for the forced command to be executed.


flushzst

Forces a GPU_FLUSHZSTENCIL command (flush z and stencil caches to memory) on the simulator. The command will be executed after the current command is processed. A run, runcom, runbatch, runframe command will be required for the forced command to be executed.


flushcolor

Forces a GPU_FLUSHCOLOR command (flush color caches to memory) on the simulator. The command will be executed after the current command is processed. A run, runcom, runbatch, runframe command will be required for the forced command to be executed.


dumpcolor

Forces a GPU_DUMPCOLOR command (dump render target 0 to an image file) on the simulator. The command will be executed after the current command is processed. A run, runcom, runbatch, runframe command will be required for the forced command to be executed.


dumpdepth

Forces a GPU_DUMPDEPTH command (dump the depth buffer to an image file) on the simulator. The command will be executed after the current command is processed. A run, runcom, runbatch, runframe command will be required for the forced command to be executed.


dumpstencil

Forces a GPU_DUMPSTENCIL command (dump the depth buffer to an image file) on the simulator. The command will be executed after the current command is processed. A run, runcom, runbatch, runframe command will be required for the forced command to be executed.


saveregisters

Saves a snapshot with the current contents of all the GPU registers to a file named registers.snapshot.


_saveregisters

Silent (no output displayed) version of the saveregisters command internally used by the savesnapshot command.


MemoryControllerV2

savememory

Saves the content of the GPU and system memory into two files named mcv2.gpumem.snapshot and mcv2.sysmem.snapshot.


loadmemory

Loads the content of the GPU and system memory from two files named mcv2.gpumem.snapshot and mcv2.sysmem.snapshot.


_savememory

Silent (no output displayed) version of the savememory command internally used by the savesnapshot command.


_loadmemory

Silent (no output displayed) version of the loadmemory command internally used by the loadsnapshot command.


VectorShaderFetch

listvertexprogram

Displays the current vertex shader program disassembled.


listfragmentprogram

Displays the current fragment shader program disassembled.

ATTILA
Toolbox