llcontrol-core shared definitions. More...
Go to the source code of this file.
Defines | |
#define | HOST_TIMING 1 |
#define | IGNORE_COUNTER_STOP 0 |
#define | POLLALERT(ipoll, message) if ( (++ipoll&0xfffff) == 0 ) fprintf( stderr, message ) |
#define | INIT_TIMER get_elapsed_microseconds(1) |
#define | MARK_TIME(t, ident) |
#define | FOREACHCARD_MARK_TIME(t, ident) FOREACHCARD{ MARK_TIME(t, ident); } |
#define | TIMER_CHECK_OVERFLOW if (get_elapsed_microseconds(0) > 99000) INIT_TIMER |
Functions | |
void | appEnterLLC_SYNC_ECM (int icard, struct MU *mu, struct TestDescription *td) |
set up LLCV2_INIT buffer and enter mode. | |
int | runSYNC_ECM (struct TestDescription *td, int soft_clock) |
runs the test SYNC_ECM mode. | |
void | appEnterLLC_SYNC_2V (int icard, struct MU *mu, struct TestDescription *td) |
set up LLCV2_INIT buffer and enter mode. | |
int | runSYNC_2V (struct TestDescription *td, int soft_clock) |
runs the test SYNC_2V mode. | |
void | appEnterLLC_SYNC_2VAO32 (int icard, struct MU *mu, struct TestDescription *td) |
set up LLCV2_INIT buffer and enter mode. | |
void | appEnterLLC_SYNC_2VRFM (void) |
set up LLCV2_INIT buffer and enter mode. | |
int | runSYNC_2VAO32 (struct TestDescription *td, int soft_clock) |
runs the test SYNC_2V mode. | |
int | runSYNC_2VRFM (struct TestDescription *td, int soft_clock) |
runs the test SYNC_2V mode. | |
int | runSCM216 (struct TestDescription *td) |
u32 | commandModifiers (struct TestDescription *td) |
static void | updateTargetAddr (u32 cmd, struct Card *card, unsigned offset) |
static void * | td_get_next_dac_data (struct TestDescription *td) |
void | doApplicationWork (struct TestDescription *td, u32 offset) |
void | initV2Stats (struct TestDescription *td) |
void | v2_updateTstats (u32 cmd, struct Card *card, struct TimingStats *tstats) |
updates timing stats from embedded host buffer data | |
u32 | card_v2_WaitDmaDone (struct Card *card) |
updates timing stats from embedded host buffer data | |
Variables | |
void(* | updateTstats )(u32 cmd, struct Card *card, struct TimingStats *tstats) |
virtual function to retrieve timing stats. | |
u32(* | waitDmaDone )(struct Card *c) |
virtual function to block until DMA done. | |
int | user_abort |
llcontrol-core shared definitions.
Definition in file llcontrol-core.h.
#define FOREACHCARD_MARK_TIME | ( | t, | ||
ident | ||||
) | FOREACHCARD{ MARK_TIME(t, ident); } |
Definition at line 59 of file llcontrol-core.h.
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
#define HOST_TIMING 1 |
Definition at line 38 of file llcontrol-core.h.
#define IGNORE_COUNTER_STOP 0 |
Definition at line 39 of file llcontrol-core.h.
#define INIT_TIMER get_elapsed_microseconds(1) |
Definition at line 55 of file llcontrol-core.h.
#define MARK_TIME | ( | t, | ||
ident | ||||
) |
do { \ tstats[icard].test_points[t] = get_elapsed_microseconds(0);\ } while(0)
Definition at line 56 of file llcontrol-core.h.
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_2VRFM(), and runSYNC_ECM().
#define POLLALERT | ( | ipoll, | ||
message | ||||
) | if ( (++ipoll&0xfffff) == 0 ) fprintf( stderr, message ) |
Definition at line 41 of file llcontrol-core.h.
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
#define TIMER_CHECK_OVERFLOW if (get_elapsed_microseconds(0) > 99000) INIT_TIMER |
Definition at line 60 of file llcontrol-core.h.
void appEnterLLC_SYNC_2V | ( | int | icard, | |
struct MU * | mu, | |||
struct TestDescription * | td | |||
) |
set up LLCV2_INIT buffer and enter mode.
Buffer set up as 4K block at offset 0
set up for single 4K buffer
uses V2 synchronization
Definition at line 90 of file llcontrol-sync2v-core.c.
References TestDescription::arg, TestDescription::cards, TestDescription::channels, TestDescription::clkpos, commandModifiers(), TestDescription::ARG::divisor, EACHBUF, enterLLC_SYNC_ECM(), getBusAddr(), getVaddr(), TestDescription::internal_loopback, LLCV2_AI_HSBT, llcv2_hb_offset, PRINTF, short, Card::sync_2v_offset_status_hsbt, Card::tlatch, TestDescription::trpos, updateTstats, and waitDmaDone.
Referenced by runTest().
void appEnterLLC_SYNC_2VAO32 | ( | int | icard, | |
struct MU * | mu, | |||
struct TestDescription * | td | |||
) |
set up LLCV2_INIT buffer and enter mode.
Buffer set up as 4K block at offset 0
set up for single 4K buffer
uses V2 synchronization
Definition at line 168 of file llcontrol-sync2VAO32-core.c.
References TestDescription::ao32_count, TestDescription::ao32_ids, TestDescription::arg, BP_FC_SET_LLCV2_INIT, TestDescription::cards, TestDescription::channels, TestDescription::clkpos, TestDescription::ARG::divisor, EACHBUF, enterLLC_SYNC_ECM(), getBusAddr(), getSlavePa(), getVaddr(), TestDescription::internal_loopback, LLCV2_AI_HSBT, llcv2_hb_offset, LLCV2_INIT_AO32PA0, MASTER, PRINTF, short, Card::sync_2v_offset_status_hsbt, Card::tlatch, TestDescription::trpos, updateTstats, and waitDmaDone.
Referenced by runTest().
void appEnterLLC_SYNC_2VRFM | ( | void | ) |
set up LLCV2_INIT buffer and enter mode.
Buffer set up as 4K block at offset 0
Definition at line 90 of file llcontrol-sync2VRFM-core.c.
Referenced by runTest().
void appEnterLLC_SYNC_ECM | ( | int | icard, | |
struct MU * | mu, | |||
struct TestDescription * | td | |||
) |
set up LLCV2_INIT buffer and enter mode.
Buffer set up as 4K block at offset 0
set up for single 4K buffer
uses V2 synchronization
Definition at line 56 of file llcontrol-syncECM-core.c.
References TestDescription::arg, TestDescription::clkpos, commandModifiers(), TestDescription::ARG::divisor, EACHBUF, enterLLC_SYNC_ECM(), getBusAddr(), getVaddr(), TestDescription::internal_loopback, llcv2_hb_offset, TestDescription::trpos, updateTstats, and waitDmaDone.
Referenced by runTest().
updates timing stats from embedded host buffer data
Definition at line 297 of file llcontrol-core.c.
References Card::buf, getVaddr(), LLCV2_OFFSET_STATUS_HSBT, llv2WaitDmaDone(), and Card::mbx.
u32 commandModifiers | ( | struct TestDescription * | td | ) |
Definition at line 553 of file llcontrol-core.c.
References LLCV2_INIT_MAGIC_MARKER, LLCV2_INIT_MARKER, and TestDescription::V2_BUFS.
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_ECM(), and runTest().
void doApplicationWork | ( | struct TestDescription * | td, | |
u32 | offset | |||
) |
Definition at line 276 of file llcontrol-core.c.
References EACHBUF, FOREACHCARD, getVaddr(), icard, TestDescription::iter, td_sample_size(), and TestDescription::work_buf.
Referenced by do_run(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_2VRFM(), and runSYNC_ECM().
void initV2Stats | ( | struct TestDescription * | td | ) |
Definition at line 874 of file llcontrol-core.c.
int runSCM216 | ( | struct TestDescription * | td | ) |
runs the test SCM mode, ACQ216 only. PSEUDO-CODE:
Definition at line 100 of file llcontrol-acq216-core.c.
References BP_MB_A4, TestDescription::decimation, TestDescription::do_work, doApplicationWork216(), EACHBBB, EACHBUF, EACHCARD, EACHMBX, FIRSTMBX, FOREACHCARD, FOREACHCARD_MARK_TIME, G_quit, getBusAddr(), getMboxPollcount(), getVaddr(), TestDescription::hardware_gate_off, TimingStats::hb_poll, TestDescription::hb_polling, hbPoll(), hbPrimePoll(), icard, TestDescription::iter, TestDescription::iterations, TestDescription::llc200_init_count, LLC_CSR_M_ARM, LLC_CSR_M_SOFTCLOCK, LLC_MAKE_DECIM, llCounterRunning(), llSetCmd(), llSetTlatch(), MARK_TIME, TestDescription::min_latency_test, TestDescription::overwrite, POLLALERT, POLLOFF, PRAMS_OFFSET, TestDescription::sample_offset, setAcq216Parameters(), setMbox(), TestDescription::stats_buf, TimingStats::target_poll, td_sample_size(), THIS_CARD, TimingStats::tlatch, TestDescription::tlog, updateTargetAddr(), updateTimingStats(), updateTstats, user_abort, and waitDmaDone.
Referenced by runTest().
int runSYNC_2V | ( | struct TestDescription * | td, | |
int | soft_clock | |||
) |
runs the test SYNC_2V mode.
PSEUDO-CODE:
(b.2)
Definition at line 127 of file llcontrol-sync2v-core.c.
References DAC_COUNT, TestDescription::decimation, TestDescription::do_work, doApplicationWork(), EACHBBB, EACHBUF, EACHCARD, EACHDAC_BASE, EACHDAC_BASE16, EACHMBX, TestDescription::feedback, TestDescription::feedback_channel, FIRSTBUF, FIRSTMBX, FOREACHCARD, FOREACHCARD_MARK_TIME, G_quit, getBusAddr(), getMboxPollcount(), getVaddr(), TestDescription::hardware_gate_off, icard, TestDescription::iter, TestDescription::iterations, LLC_CSR_M_ARM, LLC_CSR_M_SOFTCLOCK, LLC_MAKE_DECIM, llCounterRunning(), LLCV2_AO_HSBS, llSetCmd(), llSetTlatch(), llv2InitDmaDone(), MARK_TIME, memset32(), TestDescription::min_latency_test, OFFSET, POLLALERT, PRINTF, TestDescription::stats_buf, TimingStats::target_poll, td_get_next_dac_data(), TimingStats::tlatch, TestDescription::tlog, TestDescription::update_dacs, updateTargetAddr(), updateTimingStats(), updateTstats, V2SETDACS, and waitDmaDone.
Referenced by runTest().
int runSYNC_2VAO32 | ( | struct TestDescription * | td, | |
int | soft_clock | |||
) |
runs the test SYNC_2V mode.
PSEUDO-CODE:
(b.2)
AO32 update: apply to MASTER only
Definition at line 213 of file llcontrol-sync2VAO32-core.c.
References TestDescription::ao32_count, BASE_AO32, DAC_COUNT, TestDescription::decimation, TestDescription::do_work, doApplicationWork(), EACHBBB, EACHBUF, EACHCARD, EACHDAC_BASE, EACHDAC_BASE16, EACHMBX, TestDescription::feedback, TestDescription::feedback_channel, FIRSTBUF, FIRSTMBX, FOREACHCARD, FOREACHCARD_MARK_TIME, G_quit, getBusAddr(), getMboxPollcount(), getVaddr(), TestDescription::hardware_gate_off, icard, TestDescription::iter, TestDescription::iterations, LLC_CSR_M_ARM, LLC_CSR_M_SOFTCLOCK, LLC_MAKE_DECIM, llCounterRunning(), LLCV2_AO_HSBS, llSetCmd(), llSetTlatch(), llv2InitDmaDone(), MARK_TIME, memset32(), TestDescription::min_latency_test, OFFSET, POLLALERT, PRINTF, setSlaveData(), TestDescription::stats_buf, TimingStats::target_poll, td_get_next_dac_data(), THIS_CARD, TimingStats::tlatch, TestDescription::tlog, TestDescription::update_dacs, updateTargetAddr(), updateTimingStats(), updateTstats, V2SETDACS, and waitDmaDone.
Referenced by runTest().
int runSYNC_2VRFM | ( | struct TestDescription * | td, | |
int | soft_clock | |||
) |
runs the test SYNC_2V mode.
PSEUDO-CODE:
Definition at line 99 of file llcontrol-sync2VRFM-core.c.
References TestDescription::decimation, TestDescription::do_work, doApplicationWork(), EACHCARD, EACHMBX, G_quit, getMboxPollcount(), icard, TestDescription::iter, TestDescription::iterations, LLC_MAKE_DECIM, MARK_TIME, TestDescription::min_latency_test, TestDescription::stats_buf, TimingStats::target_poll, TimingStats::tlatch, TestDescription::tlog, updateTimingStats(), updateTstats, and waitDmaDone.
Referenced by runTest().
int runSYNC_ECM | ( | struct TestDescription * | td, | |
int | soft_clock | |||
) |
runs the test SYNC_ECM mode.
PSEUDO-CODE:
(b.2)
Definition at line 87 of file llcontrol-syncECM-core.c.
References DAC_COUNT, TestDescription::decimation, TestDescription::do_work, doApplicationWork(), EACHBBB, EACHBUF, EACHCARD, EACHDAC_BASE, EACHDAC_BASE16, EACHMBX, TestDescription::feedback, TestDescription::feedback_channel, FIRSTBUF, FIRSTMBX, FOREACHCARD, FOREACHCARD_MARK_TIME, G_quit, getBusAddr(), getMboxPollcount(), getVaddr(), TestDescription::hardware_gate_off, icard, TestDescription::iter, TestDescription::iterations, LLC_CSR_M_ARM, LLC_CSR_M_SOFTCLOCK, LLC_MAKE_DECIM, llCounterRunning(), LLCV2_AO_HSBS, LLCV2_OFFSET_STATUS_HSBT, llSetCmd(), llSetTlatch(), llv2InitDmaDone(), MARK_TIME, memset32(), TestDescription::min_latency_test, OFFSET, POLLALERT, PRINTF, TestDescription::stats_buf, TimingStats::target_poll, td_get_next_dac_data(), TimingStats::tlatch, TestDescription::tlog, TestDescription::update_dacs, updateTargetAddr(), updateTimingStats(), updateTstats, V2SETDACS, and waitDmaDone.
Referenced by runTest().
static void* td_get_next_dac_data | ( | struct TestDescription * | td | ) | [inline, static] |
Definition at line 118 of file llcontrol-core.h.
References TestDescription::dac_cursor, TestDescription::dac_data, TestDescription::dac_data_samples, and DAC_SAMPLE_SIZE.
Referenced by do_run(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
Definition at line 109 of file llcontrol-core.h.
References Card::buf, getBusAddr(), llSetAddr(), Card::mbx, PRINTF, and Card::slot.
Referenced by do_run(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), and runSYNC_ECM().
void v2_updateTstats | ( | u32 | cmd, | |
struct Card * | card, | |||
struct TimingStats * | tstats | |||
) |
updates timing stats from embedded host buffer data
Definition at line 257 of file llcontrol-core.c.
References BP_MB_LLC_CSR, BP_MB_LLC_TINST, Card::buf, getVaddr(), LLC_GET_TCYCLE, LLCV2_OFFSET_STATUS_HSBT, LLCV2_STATUS_TINST, llv2_extend32(), TimingStats::tinst, and TimingStats::tprocess.
void(* updateTstats)(u32 cmd, struct Card *card, struct TimingStats *tstats) |
virtual function to retrieve timing stats.
defaults to V1 mbox.
defaults to V1 mode mbox_updateTstats().
Definition at line 268 of file llcontrol-core.c.
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), appEnterLLC_SYNC_ECM(), do_run(), initV2Stats(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_2VRFM(), and runSYNC_ECM().
int user_abort |
Definition at line 311 of file llcontrol-core.c.
Referenced by do_run(), and runSCM216().
u32(* waitDmaDone)(struct Card *c) |
virtual function to block until DMA done.
defaults to V1 mbox
Definition at line 305 of file llcontrol-core.c.
Referenced by appEnterLLC_SYNC_2V(), appEnterLLC_SYNC_2VAO32(), appEnterLLC_SYNC_ECM(), do_run(), initV2Stats(), runSCM216(), runSYNC_2V(), runSYNC_2VAO32(), runSYNC_2VRFM(), and runSYNC_ECM().