risingedge function is given as example in Chisel tutorial :
def risingedge(x: Bool) = x && !Reg(next = x)
It's a really usefull function I redefine in lot of module in my projects. It can be a good idea to add it in ChiselUtil package to avoid duplicate code everywhere no ?
risingedge function is given as example in Chisel tutorial :
It's a really usefull function I redefine in lot of module in my projects. It can be a good idea to add it in ChiselUtil package to avoid duplicate code everywhere no ?
We can also add fallingedge and bothedge maybe.