Forum Discussion
Altera_Forum
Honored Contributor
7 years ago --- Quote Start --- Stay away from the XOR ... as I said oring it with a clock and then registering that with the same clock is fraught with possible issues; draw the timing diagram (carefully) and you will see why. Assume your clock is running at twice the bit-rate, and every '1'or '0' at the input lasts for 2 clock periods, you can write a (very simple) state machine to generate the correct code depending on the input received. --- Quote End --- Thanks! I changed the code following your suggestion. What I had in mind was treating the received input, output pattern forming register and output as 2-bit vectors, and using simple IF statements. However it doesn't seem to work. No pattern going on. New code and sim shot attached below. What am I doing wrong? :confused: Thank you!