chisel2-deprecated icon indicating copy to clipboard operation
chisel2-deprecated copied to clipboard

Adding risingedge() function in ChiselUtil package

Open Martoni opened this issue 10 years ago • 0 comments

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 ?

We can also add fallingedge and bothedge maybe.

Martoni avatar Oct 02 '15 07:10 Martoni