In reply to rishikpillai90:
It should work with the definition I showed you.
But you should aks if a direct combinatorical relationship between inputs and outputs is a good thing.
I believe you’ll run in serious trouble when doing other things like DFT pattern generation.