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