Only pulse signal without changing the direction level signa

hello,everyone!I have an obsession , I have only one pulse signal , but no direction signal level , if this is the case even though it can compromise into the motor work , but can not change the direction of random , though a kind of method is to change the A, A- 's direction , but this is too much trouble, I want to automatically control ;
I thought in this way: whether there is a circuit that can be implemented at the input of an input pulse signal after processing the signal at the output of two kinds of formation , a pulse , a signal direction , it is possible to freely change the motor motion, but I do not know what this circuit should be constructed by the hardware , I hope you can give me some suggestions, thank you !