XY02 Synchronisation Example: Synchronizing with a reset signal
In this example,
the adapter is synchronized using a signal from a different source (reset). First step is to get a
signal pointer to that signal.
Then it check if the signal exists and tries to move to the
first negative edge.
With reset.getPosition() it fetches the position of
the edge and calls isync.setSynced.
// base: root cell of type ICell (usually a record cell) // insertPoint: root cell of this port of type PortScope // isync: sync interface of type IPortSync // console: console output of type MessageConsoleStream var reset<:ISamplePointer:> = isync.getPointer( 'wavetest\\reset_s'); if (reset != null){ if (reset.goNextEdge( 0)){ isync.setSynced(reset.getPosition()); console.println( "Synced: "+reset.getPosition()); }else console.println( "Sync not found!"); }else console.println( "Signal not found!");About the synchronisation Open JavaDoc Reference