I was doing a testbench and had a “signal” I defined as opcode = intbv('000'). Then I did something like this:
opcode.next = 1
but opcode never changed during the simulation and I never got any warnings or errors.
Of course, the simulation started working correctly once I defined the signal as opcode = Signal(intbv('000')). Without the Signal(), my code was just creating a new attribute called next in the opcode object and this is perfectly legal so I wasn’t getting any indication of a problem.
My question: should the intbv and modbv classes have a predefined next property that will issue an error or warning if an assignment is made to them?
Not often, but it takes a fair amount of time peering into the waveform before this ‘inattention’ is found.