Samsung S5PC110 Manual page 1456

Risc microprocessor
Table of Contents

Advertisement

S5PC110_UM
6 5BMULTI FORMAT CODEC
6.4 SHARED MEMORY INTERFACE
As per the growth of the diverse requirements for the codec features and additional enhancements of the MFC
firmware, MFC provides the shared memory interface to exchange information with the host. Host is able to get
returned parameters or set parameter values through the shared memory. Since the parameters are exchanged
through the external memory, there is no limitation of the number of fields. Readers may consider it as a register
group but the physical memory is allocated in the external memory.
This section describes the shared memory interface, such as shared memory allocation and the shared memory
structure consisting of multiple fields.
6.4.1 HOST INTERFACE
Host has to allocate the shared memory and informs MFC of the buffer pointer through the HOST_WR_ADR
register. It is recommended to allocate the shared memory before the sequence header parsing through
SEQ_START. Since the number of fields in the shared memory is fixed in 0, host is required to allocate a buffer in
the external memory to accommodate them.
Once the shared memory has been allocated, host and MFC are able to exchange information through the shared
memory. Host can read and write each field in the shared memory at the byte offset defined in 0.
Following is a pseudo code to initialize the shared memory.
// shared mem allocation. Should be done before SEQ_START
shared_mem_ptr = (int *) malloc(SHARED_MEM_SIZE);
host_write_word(HOST_WR_ADR, shared_mem_ptr);
Following is a pseudo code to read and write the frame tags.
// write frame_tag
host_write_word(shared_mem_ptr+ADR_SET_FRAE_TAG, frame_tag);
// read frame_tag
get_frame_tag = host_read_word(shared_mem_ptr+ADR_GET_FRAME_TAG_TOP);
6-64

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents