Hi,
 
  
> how does sigrok behave if I put two triggers on two different channels (for 
> example: on one channel rising edge and on the other the falling edge)?
I don't think sigrok has any rules or restrictions when it comes to multiple 
triggers. libsigrok.h simply specifies triggers, trigger stages and trigger 
matches. 
In other words, it allows specifying a list of triggers on multiple channels 
with arbitrary combination of matches (e.g. rising edge, falling edge, trigger 
threshold (for analog channels etc.)

> Does it depend perhaps on the hw (I have a DreamSourceLab DSLogic Plus)?
In most of the cases yes. Triggers are often implemented directly in HW and 
depending on the HW this behavior for multiple triggers are different. This may 
also be the reason why
sigrok is quite generic when it comes to triggers.

There is also something which is called soft trigger (libsigrok/soft-trigger.c) 
which performs trigger matching inside of the HW driver before sending samples 
to the upper layer (pulseview/sigrok).
This acts more as an initial guard before sending samples while the the HW 
already sends the samples to the driver. 

> I can't believe that it's an AND of the two instead, because in fact if I put 
> two triggers on front it's very unlikely that the two fronts will happen 
> together.
The demo device for instance makes use of the soft trigger and if you look at 
the implementation
of the soft trigger, you will see it performs a logic AND (see 
soft_trigger_logic_check() - you can also check the behavior in pulseview).
But i agree with you, especially at high sample rates this may become 
unpractical since the probability that two matches happen on the same sample 
decreases.

As far as DSLogic devices are concerned: I can only tell that the trigger 
configuration is sent to the device in set_trigger() 
(libsigrok/src/hardware/dreamsourcelab-dslogic/protocol.c). Essentially, this 
function maps between
libsigrok trigger list and the trigger configuration DSLogic HW expects. I 
don't know by heart what is the actual behavior then in hardware, i'm using 
single triggers only. Let me check with my DSLogic U3Pro16 the next days to see 
how it behaves.

Christian.




_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to