72579a6129
In python a negative indices usually mean start counting from the right side. I.e. if the index is negative is acutal index used is len(l) + i. E.g. l[-2] equals l[len(l)-2]. Being able to specify an index this way also comes in handy for migen slices in some cases. E.g. the following snippet can be implement to shift an abitrary length register n bits to the right: reg.eq(Cat(Replicate(0, n), reg[-n:]) Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> |
||
---|---|---|
.. | ||
actorlib | ||
bank | ||
bus | ||
fhdl | ||
flow | ||
genlib | ||
pytholite | ||
sim | ||
uio | ||
__init__.py |