/********************* Simulation (inmem) Scan inlined functions: *******************/ /* Since the scan interference should be minimal, the event loop uses these inlined functions to minimize setup time, etc. The code sections for inmem creation and loading (during initialization & bin setup) are more invloved; thus these are handled by dedicated routines (//dpsf: see xxx & xxx). The inmem contains a tiny "stub" event, which will be thrown away, along with the events destined for the SDSPs which are participating in the scan. The stub event bypasses the inmem playback bug which exists in the newer (vers. e 1c - 1e) controller FPGA code. Once an inmem playback is triggered, it will send out all the events within the inmem whether the destination SDSPs are ready or not. This should not be a problem, since the inmem events are the same length, and so if one is ready, they typically all will be. To handle this, the simulation scanning macros keep track of which SDSPs were ready. At the end of a transmission sequence, any data which remains in the formatters because its DSP wasn't ready is removed by resetting the corresponding link (quickest method). Additional regularization can be imposed by allowing the inmems to transmit only when the first SDSP is ready for its event (ensuring that all will be). This way a minimum amount of interference is generated by the fact that the inmem playback must transmit all the events as a single group. The functions are: simScanTrigger: Controls the issuing of triggers. simScanPlaybackInit: Initiates inmem playback, and suppresses playback after the 1st one (=> stub event). simScanPostPlayback: Cleans up after playback, if necessary. */