General • Asked 4 months ago by Kenneth
I'm reading the book called CODE by Charles Petzold. I'm currently in page 159 and I built a 8 bit binary adding machine that has 2 8 bit inputs. The sum is saved in an 8 bit level triggered D-type latch and the output of that 8 bit latch is given to the 2nd 8 bit input of the 8 bit adder. There's an Add button in the 8 bit latch which is basically just the clock, when 0 it will not save the 8 bit input, when 1 it will save it.
Whenever I press the Add button it will give an error "Simulation Stack limit exceeded: maybe due to cyclic paths or contention". I'm not sure how to fix this but I'm assuming because when I press Add, the output is given to the adder and adds it again, so the sum will be given to the 8-bit latch and the Add is still 1 so it will save the new sum and give it again to the adder and this repeats so fast that it will cause that error. But I'm not really how to make a workaround for this..
Please share the circuit and the steps to reproduce the event.