nyanotech has quit [Remote host closed the connection]
nyanotech has joined #amaranth-lang
sporniket has joined #amaranth-lang
<sporniket>
Hello, back to toying a little with amaranth hdl after a long period toying with other thing ; bumping my dependencies, I notice the warning about the deprecation "DeprecationWarning: instead of using `Past`, create a register explicitly"
<sporniket>
The thing is
<sporniket>
I don't know at all what I should write instead.
<sporniket>
I searched a little bit for an hint (some issues about Past like #526,
<sporniket>
googling this libera chat salon's history about "Past"
<sporniket>
looking at amaranth.hdl.ast.py for clues
<sporniket>
)
<sporniket>
but I admit that I have no idea
<sporniket>
of what to do
<sporniket>
So, what would be the equivalent of "Past(dut.mysignal, n_cycles_back_in_time)" given I have just a single clock ?
<sporniket>
thanks in advance
<jn>
sporniket: as far as i understand it: creating a register explicitly more or less means creating a shift register which is shifted by 1 on every clock, and always gets the current value of your signal on the input end. then, you can access shiftreg[n] to get the value that is n cycles in the past
<jn>
(i haven't tried it myself so i can't provide exact syntax for this)
<sporniket>
ha, that I understand better, I can work from that.