1 of 1 people found this helpful
there are multiple ways to do this, but doing as much as possible in HW leads me to this.
Add another input pin to the lookup table and let it perform a mirror of the LUT.
I draw this quickly so please check the LUT before implementing it on your own, to avoid any damage. It is important to make sure that switching the direction in any state leads to a smooth transition.
Thanks, David this worked perfectly.