API for bus level protocol. More...
#include <setjmp.h>
Go to the source code of this file.
Defines | |
#define | BP_MB_LLC_UPDATEDAC 1 |
#define | LLC_CSR_M_UPDATEDACS 'f' |
#define | DAC_COUNT 16 |
#define | DAC_SAMPLE_SIZE (DAC_COUNT*sizeof(short)) |
#define | DAC_BASE(bigbuf_base, mfa) ((void*)bigbuf_base + (mfa)) |
#define | LLCV2_HB_OFFSET 0x00100000 |
V2 host buffer segmentation - for full V2, 4K is enough. | |
#define | LLCV2_AI_HSBT 0x000 |
#define | LLCV2_AO_HSBS 0x400 |
#define | LLCV2_DO_HSBS 0x800 |
#define | LLCV2_STATUS_HSBT 0xc000 |
#define | LLCV2_OFFSET_AI_HSBT (llcv2_hb_offset+LLCV2_AI_HSBT) |
#define | LLCV2_OFFSET_AO_HSBS (llcv2_hb_offset+LLCV2_AO_HSBS) |
#define | LLCV2_OFFSET_DO_HSBS (llcv2_hb_offset+LLCV2_DO_HSBS) |
#define | LLCV2_OFFSET_STATUS_HSBT (llcv2_hb_offset+LLCV2_STATUS_HSBT) |
Functions | |
int | enterLLCSoftClock (struct MU *m, int clkpos, int trpos, int internal_loopback, u32 command_mods) |
int | enterLLCExtClock (struct MU *m, int clkpos, int trpos, unsigned short divisor, int internal_loopback, u32 command_mods) |
int | enterLLC_SYNC_ECM (struct MU *m, int clkpos, int trpos, unsigned short divisor, int internal_loopback, u32 command_mods, u32 init_buf_baddr) |
Enter LowLatency Mode for EXTERNAL CLOCK capture. | |
int | leaveLLC (struct MU *m) |
static u32 | llPollSack (struct MU *m) |
static u32 | llGetCsr (struct MU *m) |
static u32 | llSetCmd (struct MU *m, u32 cmd) |
static void | llSetAddr (struct MU *m, u32 addr, u32 cmd) |
static u32 | llGetTlatch (struct MU *m) |
static int | llSetTlatch (struct MU *m, u32 value) |
static u32 | llGetTinst (struct MU *m) |
static u32 | llGetTprocess (struct MU *m) |
u32 | llWaitDmaDone (struct MU *m) |
polls until DMA has completed. | |
u32 | llv2WaitDmaDone (struct MU *m, volatile u32 *hstats) |
polls until DMA has completed. | |
u32 | llv2WaitDmaDone_2v (struct MU *m, volatile u32 *hstats, unsigned tlatch) |
polls until DMA has completed. | |
void | llv2InitDmaDone (volatile u32 *hstats) |
polls until DMA has completed. | |
static int | llCounterRunning (struct MU *m, u32 csr) |
prepare (poison) target buf for incoming DMA. | |
static void | llSetDacs (struct MU *mu, void *dacvals, char *bigbuf_base) |
uses i2o buffer Q. | |
void | llPrimePollHB (struct DmaBuffer *buf, int offset, int sample_len) |
void | llPollHB (struct DmaBuffer *buf, int offset, int sample_len) |
u32 | llv2_extend32 (u32 old32, u32 new12) |
return 32 bit count as function of old32, new12. | |
Variables | |
sigjmp_buf | G_env |
unsigned | llcv2_hb_offset |
but for future, simpler host side drivers, we'd like a single 4K buf, no offset. |
API for bus level protocol.
Definition in file llprotocol.h.
#define BP_MB_LLC_UPDATEDAC 1 |
Definition at line 111 of file llprotocol.h.
#define DAC_BASE | ( | bigbuf_base, | ||
mfa | ||||
) | ((void*)bigbuf_base + (mfa)) |
Definition at line 313 of file llprotocol.h.
#define DAC_COUNT 16 |
Definition at line 280 of file llprotocol.h.
Referenced by do_run(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
#define DAC_SAMPLE_SIZE (DAC_COUNT*sizeof(short)) |
Definition at line 281 of file llprotocol.h.
Referenced by do_run(), llSetDacs(), td_allocate_dac_data(), td_get_next_dac_data(), td_load_dac_data_file(), and td_load_dac_data_impulse().
#define LLC_CSR_M_UPDATEDACS 'f' |
Definition at line 112 of file llprotocol.h.
#define LLCV2_AI_HSBT 0x000 |
Definition at line 330 of file llprotocol.h.
Referenced by appEnterLLC_SYNC_2V(), and appEnterLLC_SYNC_2VAO32().
#define LLCV2_AO_HSBS 0x400 |
Definition at line 331 of file llprotocol.h.
Referenced by runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
#define LLCV2_DO_HSBS 0x800 |
Definition at line 332 of file llprotocol.h.
#define LLCV2_HB_OFFSET 0x00100000 |
V2 host buffer segmentation - for full V2, 4K is enough.
Definition at line 322 of file llprotocol.h.
#define LLCV2_OFFSET_AI_HSBT (llcv2_hb_offset+LLCV2_AI_HSBT) |
Definition at line 335 of file llprotocol.h.
#define LLCV2_OFFSET_AO_HSBS (llcv2_hb_offset+LLCV2_AO_HSBS) |
Definition at line 336 of file llprotocol.h.
#define LLCV2_OFFSET_DO_HSBS (llcv2_hb_offset+LLCV2_DO_HSBS) |
Definition at line 337 of file llprotocol.h.
#define LLCV2_OFFSET_STATUS_HSBT (llcv2_hb_offset+LLCV2_STATUS_HSBT) |
Definition at line 338 of file llprotocol.h.
Referenced by card_v2_WaitDmaDone(), runSYNC_ECM(), and v2_updateTstats().
#define LLCV2_STATUS_HSBT 0xc000 |
Definition at line 333 of file llprotocol.h.
int enterLLC_SYNC_ECM | ( | struct MU * | m, | |
int | clkpos, | |||
int | trpos, | |||
unsigned short | divisor, | |||
int | internal_loopback, | |||
u32 | command_mods, | |||
u32 | init_buf_baddr | |||
) |
Enter LowLatency Mode for EXTERNAL CLOCK capture.
Definition at line 221 of file llprotocol.c.
References BP_FC_SET_LLCV2_INIT, BP_MB_A4, enterLLCExtClock(), and setMbox().
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), and appEnterLLC_SYNC_ECM().
int enterLLCExtClock | ( | struct MU * | m, | |
int | clkpos, | |||
int | trpos, | |||
unsigned short | divisor, | |||
int | internal_loopback, | |||
u32 | command_mods | |||
) |
Definition at line 198 of file llprotocol.c.
References BP_SET_A1, and enterLLC().
Referenced by enterLLC_SYNC_ECM(), and runTest().
int enterLLCSoftClock | ( | struct MU * | m, | |
int | clkpos, | |||
int | trpos, | |||
int | internal_loopback, | |||
u32 | command_mods | |||
) |
Definition at line 178 of file llprotocol.c.
References BP_SET_A1, and enterLLC().
Referenced by runTest().
int leaveLLC | ( | struct MU * | m | ) |
Definition at line 235 of file llprotocol.c.
References LLC_CSR_M_ESC, and llSetCmd().
Referenced by quit_handler(), and runTest().
prepare (poison) target buf for incoming DMA.
returns TRUE when counters are running the process has started on GATE.
Definition at line 273 of file llprotocol.h.
References LLC_CSR_M_READCTR, LLC_CSR_S_CTR_RUN, and llSetCmd().
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
Definition at line 171 of file llprotocol.h.
References BP_MB_LLC_CSR, and getMbox().
Referenced by llGetTprocess().
Definition at line 237 of file llprotocol.h.
References BP_MB_LLC_TINST, and getMbox().
Referenced by do_run(), and mbox_updateTstats().
Definition at line 225 of file llprotocol.h.
References BP_MB_LLC_TADC, and getMbox().
Referenced by llWaitDmaDone().
Definition at line 243 of file llprotocol.h.
References LLC_GET_TCYCLE, and llGetCsr().
Referenced by mbox_updateTstats().
void llPollHB | ( | struct DmaBuffer * | buf, | |
int | offset, | |||
int | sample_len | |||
) |
Definition at line 159 of file llprotocol.h.
References BP_MB_LLC_CSR, G_env, LLC_CSR_SACK, LLC_CSR_SNACK, and pollMboxBits().
Referenced by llSetCmd().
void llPrimePollHB | ( | struct DmaBuffer * | buf, | |
int | offset, | |||
int | sample_len | |||
) |
Definition at line 215 of file llprotocol.h.
References BP_MB_LLC_DATA_ADDR, LLC_CSR_M_SETADDR, llSetCmd(), and setMbox().
Referenced by updateTargetAddr().
Definition at line 204 of file llprotocol.h.
References BP_MB_LLC_CSR, LLC_CSR_SACK, llPollSack(), PRINTF, and setMbox().
Referenced by do_run(), leaveLLC(), llCounterRunning(), llSetAddr(), mbox_updateTstats(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
static void llSetDacs | ( | struct MU * | mu, | |
void * | dacvals, | |||
char * | bigbuf_base | |||
) | [inline, static] |
uses i2o buffer Q.
target is notified about the post, and uses the MFA to setup a DMA direct from host memory to DACs.
For MINIMUM latency
Definition at line 285 of file llprotocol.h.
References DAC_SAMPLE_SIZE, mu_putOutbound(), mu_reserveOutbound(), and PRINTF.
Referenced by do_run().
Definition at line 231 of file llprotocol.h.
References BP_MB_LLC_TADC, and setMbox().
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
return 32 bit count as function of old32, new12.
Definition at line 281 of file llprotocol.c.
References ACQ196_TCR_MASK, and SERVICE_ROLLOVER.
Referenced by llv2WaitDmaDone(), llv2WaitDmaDone_2v(), sync_2v_updateTstats(), and v2_updateTstats().
void llv2InitDmaDone | ( | volatile u32 * | hstats | ) |
polls until DMA has completed.
Returns tlatch guaranteed DMA done when tlatch updated V2 method does NOT poll PCI
Definition at line 363 of file llprotocol.c.
Referenced by runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
polls until DMA has completed.
Returns tlatch guaranteed DMA done when tlatch updated
Returns tlatch guaranteed DMA done when tlatch updated V2 method does NOT poll PCI
Definition at line 293 of file llprotocol.c.
References BP_MB_LLC_TADC, LLCV2_POISON, LLCV2_STATUS_BDR, LLCV2_STATUS_TLATCH, llv2_extend32(), mask, and setMboxPollcount().
Referenced by card_v2_WaitDmaDone().
polls until DMA has completed.
Returns tlatch guaranteed DMA done when tlatch updated V2 method does NOT poll PCI
Definition at line 331 of file llprotocol.c.
References LLC_SYNC2V_IN_LAST, LLCV2_POISON, LLCV2_STATUS_TLATCH, llv2_extend32(), mask, and setMboxPollcount().
Referenced by card_sync_2v_WaitDmaDone().
polls until DMA has completed.
Returns tlatch guaranteed DMA done when tlatch updated
Definition at line 243 of file llprotocol.c.
References BP_MB_LLC_TADC, getMboxShadow(), llGetTlatch(), and setMboxPollcount().
Referenced by card_v1_WaitDmaDone().
sigjmp_buf G_env |
Definition at line 129 of file llprotocol.c.
Referenced by llPollSack(), and runTest().
unsigned llcv2_hb_offset |
but for future, simpler host side drivers, we'd like a single 4K buf, no offset.
=> use a variable and set as appropriate
Definition at line 1113 of file llcontrol.c.
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), and appEnterLLC_SYNC_ECM().