LLC2_API
|
API for bus level protocol. More...
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 | |
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.
#define DAC_SAMPLE_SIZE (DAC_COUNT*sizeof(short)) |
Definition at line 281 of file llprotocol.h.
Referenced by llSetDacs(), and td_get_next_dac_data().
#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_2VAO32(), and ACQ196::getAI().
#define LLCV2_AO_HSBS 0x400 |
Definition at line 331 of file llprotocol.h.
Referenced by appEnterLLC_SYNC_2VAO32(), AO32::putAO(), ACQ196::putAO(), AO32::putDO(), ACQ196::putDO(), and ACQ196::toggle_wd().
#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(), 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 222 of file llprotocol.cpp.
References BP_FC_SET_LLCV2_INIT, BP_MB_A4, enterLLCExtClock(), and setMbox().
Referenced by appEnterLLC_SYNC_2VAO32().
int enterLLCExtClock | ( | struct MU * | m, |
int | clkpos, | ||
int | trpos, | ||
unsigned short | divisor, | ||
int | internal_loopback, | ||
u32 | command_mods | ||
) |
Definition at line 199 of file llprotocol.cpp.
References BP_FC_SET_MODE_LLC_EXTCLOCK, BP_FC_SET_MODE_LLC_INTDIV_CLK, BP_SET_A1, and enterLLC().
Referenced by enterLLC_SYNC_ECM().
int enterLLCSoftClock | ( | struct MU * | m, |
int | clkpos, | ||
int | trpos, | ||
int | internal_loopback, | ||
u32 | command_mods | ||
) |
Definition at line 179 of file llprotocol.cpp.
References BP_FC_SET_MODE_LLC_INTSOFT_CLK, BP_FC_SET_MODE_LLC_SOFTCLOCK, BP_SET_A1, and enterLLC().
int leaveLLC | ( | struct MU * | m | ) |
Definition at line 236 of file llprotocol.cpp.
References LLC_CSR_M_ESC, llSetCmd(), and setPathCleanup().
Referenced by quit_handler(), and LL_ControlSystemI::Stop().
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().
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().
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().
void llPollHB | ( | struct DmaBuffer * | buf, |
int | offset, | ||
int | sample_len | ||
) |
Definition at line 155 of file llprotocol.h.
References BP_MB_LLC_CSR, 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, LLC_CSR_SNACK, llPollSack(), PRINTF, and setMbox().
Referenced by leaveLLC(), llCounterRunning(), and llSetAddr().
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.
Definition at line 231 of file llprotocol.h.
References BP_MB_LLC_TADC, and setMbox().
Referenced by LL_ControlSystemI::Arm().
return 32 bit count as function of old32, new12.
Definition at line 283 of file llprotocol.cpp.
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 364 of file llprotocol.cpp.
References LLC_SYNC2V_IN_LAST, LLCV2_POISON, and LLCV2_STATUS_BDR.
Referenced by LL_ControlSystemI::Arm().
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 295 of file llprotocol.cpp.
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 332 of file llprotocol.cpp.
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 245 of file llprotocol.cpp.
References BP_MB_LLC_TADC, getMboxShadow(), llGetTlatch(), and setMboxPollcount().
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 108 of file llcontrol-core.cpp.
Referenced by appEnterLLC_SYNC_2VAO32().