Data Structures | Defines | Typedefs | Enumerations | Functions
trace_contract.h File Reference

This has defintions and implementations for the contract between producers and consumers. More...

#include <string.h>
#include <ti/instrumentation/traceframework/contract_osal.h>

Data Structures

struct  tf_contractConfig
 Contract Create Configuration Structure. More...
struct  tf_StartCfg_t
 trace framework start configuration structure (to support multi-instance and legacy features) More...
struct  tf_contractGetInfo_t
 get trace framework contract information interface structure More...

Defines

#define TF_CONTRACT_CACHE_LINEZ   128
 contract cache line size
#define TF_CONTRACT_SIZE_BYTES   (TF_CONTRACT_CACHE_LINEZ * 12)
 contract memory size requirements contract has 12 cache lines
#define TF_CONTRACT_BUFS_ALIGN   128
 Alignment for the tf_contract memory.
#define TF_PRODUCER_LOGBUF_ALGIN   128
 Ring Buffer Alignment.
#define TF_MAX_RING_BUFS_SUPPORT   1024
 Maximum number of Ring buffers supported in the ring.
#define TF_MAX_CONSUMERS_PERCONTRACT   4
 maximum consumers allowed per contract
#define TF_CONTRACT_OOB_SIZE_BYTES   TF_CONTRACT_CACHE_LINEZ
 number of bytes allocated for the Out of Band information Out of band information is really for the application to keep some information in the traceframework contract and retrive it from either producer/consumers as it is. Traceframework does not alter any information stored in
#define TF_CONTRACT_NAME_SIZE_BYTES   TF_CONTRACT_CACHE_LINEZ
 number of bytes allocated for the name of the contract (applicable only for contract version 1) since contract version 2 does not handle name within traceframework
TraceFramework Control Bit Map Definitions

Bitmap definition of the ctrlBitMap in tf_StartCfg_t.

#define tf_CONTRACT_BLK_ADDR_TYPE   0x0001

Typedefs

typedef void * tf_contract_HANDLE
 Contract handle.
typedef struct tf_contractConfig tf_contractConfig_t
 Contract Create Configuration Structure.

Enumerations

enum  tf_contractState_e { TF_CONTRACT_AVAILABLE = 0x55555555, TF_CONTRACT_NOT_AVAILABLE = 0x0 }
 Contract State added here When contracts are newly created, they are marked Available and as and when the contracts are used between producers and consumer instances, they would be marked as not available. More...
enum  tf_contractVersion_e { TF_CONTRACT_VERSION_2 = 0x66666666, TF_CONTRACT_VERSION_1 = 0x0, TF_CONTRACT_VERSION_UNKNOWN = 0xf05d }
 Contract Versions added here Contract Version number signifies the set of APIs to be used There are few APIs marked in the traceframework functions, which are deprecated for contract version 1. More...
enum  tf_contractType_e { TF_CONTRACT_DSP_ARM = 0, TF_CONTRACT_STREAM_FREEZE_PRODUCER = TF_CONTRACT_DSP_ARM, TF_CONTRACT_ARM_ARM = 1 }
 Contract Types added here Trace framework can support multiple contract types such as 1. Contracts having streaming producer always ( can have 4 consumers maximum) 2. Contracts having stream/freeze producer (supports only one consumer per contract) More...
enum  tf_ringBufAddrType_e { TF_CONTRACT_RING_BUF_PHYSICAL_ADDR = 0, TF_CONTRACT_RING_BUF_NOT_PHYSICAL_ADDR = 1 }
 Trace Framework Ring Buffer Address type. More...
enum  tf_contractBufAddrType_e { TF_CONTRACT_BUF_PHYSICAL_ADDR = 0, TF_CONTRACT_BUF_NOT_PHYSICAL_ADDR = 1 }
 Trace Framework Contract Buffer Address type. More...

Functions

void tf_contractInit (void *tf_contract_base, uint32_t num)
tf_contract_HANDLE tf_contractCreate (tf_contractConfig_t tf_contractConfig, char *name)
tf_contract_HANDLE tf_newContract (tf_contractConfig_t tf_contractConfig)
tf_contract_HANDLE tf_contractFind (void *tf_contract_start_addr, uint32_t num_contracts, char *name)
uint32_t tf_getOverRunCount (tf_contract_HANDLE contract_handle)
uint32_t tf_isLogInfoNextBuf (tf_contract_HANDLE contract_handle)
void tf_contractGetInfo (tf_contract_HANDLE handle, tf_contractGetInfo_t *info)
void tf_systemCfg (tf_StartCfg_t *startCfg)

Detailed Description

This has defintions and implementations for the contract between producers and consumers.

============================================================================
(C) Copyright 2012, Texas Instruments, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Copyright 2014, Texas Instruments Incorporated