24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UM-410 16 - C Debug<br />

Debugging functions during elaboration<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

Initialization mode allows you to examine <strong>and</strong> debug functions that are called during<br />

elaboration (i.e., while your design is in the process of loading). When you select this mode,<br />

<strong>ModelSim</strong> sets special breakpoints for foreign architectures <strong>and</strong> PLI/VPI modules that<br />

allow you to set breakpoints in the initialization functions. When the design finishes<br />

loading, the special breakpoints are automatically deleted, <strong>and</strong> any breakpoints that you set<br />

are disabled (unless you specify Keep user init bps in the C debug setup dialog).<br />

To run C Debug in initialization mode, follow these steps:<br />

1 Start C Debug by selecting Tools > C Debug > Start C Debug before loading your<br />

design.<br />

2 Select Tools > C Debug > Init mode.<br />

3 Load your design.<br />

As the design loads, <strong>ModelSim</strong> prints to the Transcript the names <strong>and</strong>/or hex addresses of<br />

called functions. For example the Transcript below shows a function pointer to a foreign<br />

architecture:<br />

To set a breakpoint on that function, you would type:<br />

bp -c *0x4001b571<br />

or<br />

bp -c <strong>and</strong>_gate_init

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!