12 Searching

The Find dialogue helps you to find signal patterns. It behaves like the standard find dialogue of the text editors. You type in a find expression, select if you want to search forwards or reverse, with or without wrapping and then click find. The active cursor will be placed at the found position.

Simple Searching

The Find dialogue pops up with a predefined expression. Mofiy its values and press 'Find'.

Complex Search expressions

You can define expressions of any complexity to find problems.

Manage expressions

You can manage your search terms to simplify reuse.

Simple searching

To start searching, select the signals to search and press Ctrl-f. The Find dialogue pops up with a predefined expression. This expression contains all selected signals and compares them with the values at the active cursor position.

Modify the expression to your needs and press find. The active cursor will be placed at the found position. Click Reverse to do reverse searching, or Wrap to move from the end of the signal to its beginning. 

If the expression has an error, you will get a message in the status log below.

Search expressions

No matter if you develop a reader, a recJs script, a search expression or a Signal Script production, impulse provides you always with the same interfaces to read, compare, analyze or generate signal data.

The signal variables s1,s2,… are of the type ISamplePointer. For each search step, the sample pointers are adjusted to the new position and the expression is evaluated. Returning a Boolean true means that the search was successful; false means that the search need to continue. 

Domain relative expressions

Usually all statements of an expression are within the context of the current domain position. If you wish to compare relative positions, then you can use the relative method to obtain a relative pointer. 

	s0.isEdge(1) && 

The expression above returns true at the current position, if s0 has a positive edge and s1's value was 'x2521' 10 ns 'before'.

Logic signals

Logic signal expressions are made easier by using the format methods. There are fbin,fhex,foct and fdec.

	s0.fbin()=='b1' && 
	s1.fbin()=='b0' && 
	s2.fbin()=='b0' && 

Instead of the conversion routines, you can test logic signals with isEdge,isHigh and isLow. These methods have optional parameters for edge detection that can be left empty.

	s0.isEdge(1) && // 1: rising edge -1: falling edge
	s1.fbin()=='b1' &&

Integer and Float

Use the val method to get the native current value. You can compare it with usual js methods.

s0.val()>4.0 && 
	s1.val()==0.0 && 

Events and Text signals

You might use the val or stringValue method to get the current value.

	s0.stringValue()=='Stop' && 

Struct signals (Logs & Transactions)

The struct access members xxxxOf({member}) allows you to compare all members of a struct. Here the method stringValueOf is used:

&& s0.stringValueOf('Message')
	.indexOf("version") >=0

technical software and tooling


Contact Us

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