CDL Modules
Files
apb_target_dprintf

Files

file  apb_target_dprintf.cdl
 Simple target for an APB bus to drive the dprintf request.
 

Detailed Description

Modules

module apb_target_dprintf::apb_target_dprintf ( clock  clk,
input bit  reset_n,
input t_apb_request  apb_request,
output t_apb_response  apb_response,
output t_dprintf_req_4  dprintf_req,
input bit  dprintf_ack 
)
Parameters
[in]clkSystem clock
[in]reset_nActive low reset
[in]apb_requestAPB request
[out]apb_responseAPB response
[in]dprintf_ackSimple Dprintf requester with an APB interface.

A dprintf request is an address and, in this case (a t_dprintf_req_4) four 64-bit data words. This is mapped to eight 32-bit data words, with data register 0 mapping to the most significant word of the dprintf_req data 0 (so that data register 0 corresponds to the first text displayed as part of the dprintf).

The module provides an address register, which is the address presented in the dprintf request. Usually for a dprintf to a teletext framebuffer, for example, this is the address of the first character of the output within the framebuffer.

The normal operation is to write a number of data registers, starting with register 0, and then to write to the address register with commit to invoke the dprintf.

Another method could be to have the address and bulk of the data set up, and then a single write to a data with commit to, for example, fill out a 32-bit hex value for display, invoking the dprintf (for example if a dprintf were set up to display 'latest pc %08x', the pc value can be written to the correct data register with commit).

The address register can be read back, in which case it has some status also:

Bits Meaning
31 dprintf_req valid (i.e. has not been completed by dprintf slave)
15;16 zero
16;0 address for dprintf request.

The top bit of this register is set by a commit and cleared when the dprintf slave acknowledges the dprintf request.

For more details on dprintf requests themselves, see the documentation in utils/src/dprintf