XY02 Synchronisation Example: Synchronizing with a reset signal

Content outdated

We are in the process of migrating all content to impulse version 2.0.

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

toem

technical software and tooling

Company

Contact Us

This email address is being protected from spambots. You need JavaScript enabled to view it.