Forum Discussion
Altera_Forum
Honored Contributor
7 years ago --- Quote Start --- Indeed I was thinking of using an external master clock as an input. It will run at a multiple of signal to generate, and clocks the source chip as well, so it must be in sync. Rewriting the new code doesn't appear to be working. It's not doing the pattern thing. What am I doing wrong? Please see attached the new code and a snap of the simulation.... --- Quote End --- 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.