rohd
rohd copied to clipboard
Allow negative indices on `Logic` and `LogicValue` to relative to the end
Motivation
Python allows you to access the end of a list using negative numbers, which is a nifty feature.
Desired solution
Functions like operator []
, getRange
, and slice
should handle negative numbers, treating it as from the end of the value/signal. -1 is the last element, etc.
Alternatives considered
SystemVerilog does not support this.
Hey Max, I will be working on it.