| |||
Home > Components > Debug section |
The debug section is used to control generation of the debug interface for the component.
By default all components publish CADI interfaces in the CADI factory to enable connecting CADI-compliant debuggers. The CADI interfaces of these components collect the CADI information from their sub-components to enable access to the registers and memory to the hidden components.
The debug section enables control of the published CADI interfaces and the selection subcomponents that the CADI information is imported from.
Example 2.33 shows an example of including a debug section:
Example 2.33. Using a debug section
component MyComponent { composition { a:comp_A; b:comp_B; c:comp_C;} debug { composition.publish; // publish all components CADI ... a.unpublish; // ... but do NOT publish CADI of ‘a’ composition.unimport; // do NOT import any CADI info ... b.import; // ... but import CADI info of ‘b’ } }
The keywords have the following meaning:
The CADI of the subcomponent is published in the CADI factory and a CADI compliant debugger can connect to the component.
The CADI of the subcomponent is not published in the CADI factory and it is not possible for a CADI compliant debugger to connect to the component.
The CADI information of the subcomponent is imported into the CADI interface of the component containing the debug section.
The CADI information of the subcomponent is not imported into the CADI interface of the component containing the debug section.
All sub components of the component are effected by the statement.
The following rules apply:
unpublish
and unimport
also
affects all subcomponents of the components. In Example 2.34, the CADI of aa
and dd
are
not published because the unpublish
command issued
to aa
causes the CADI of dd
is
not published even though aa
publishes dd
in
its debug section.
The top-level component cannot be unpublished
or unimported
.
Example 2.34. Using unpublish and publish
component MyComponent { composition { aa:comp_A; bb:comp_B; cc:comp_C;} debug { composition.publish; // publish all components CADI ... aa.unpublish; // ... but do NOT publish CADI of ‘aa’ } } component Comp_A { composition { dd:comp_D} debug { dd.publish; // publish CADI of component dd } }