sieve¶
Consumes and discards all data received at its input.
-
sieve(din, *, key) → din[key]¶ Outputs a slice of the
dininput interface. Thesieve()gear is automatically instantiated when an index operator[]is used on an interfaces. Thekeyparameter can be both a single key or a sequence of keys. Which keys are exactly supported depends on the type of thedininput interface, so checkout the__getitem__method of the specific type. For an example ofUint[8]interfacedin = Intf(Uint[8])
we could slice it using Python index operator to obtain a high nibble:
>>> din[4:] Intf(Uint[4])
which outputs an interface of the type
Uint[4]. The same would be achieved if thesievegear were instantiated explicitly:>>> sieve(din, key=slice(4, None, None)) Intf(Uint[4])