I'm trying to construct an 8-Bit Program Counter, in Logisim. It currently has functions LOAD, which makes the 8-Bit input (A0-A7) appear at the output (S0-S7) on the clock pulse:
When LOAD is high, A0-A7 is run through the full adder, which technically is used – it just adds 0, so therefore doesn't affect the output.
Now I'm trying to implement an INC (increment) also, which when high will basically just add 1, but take the current register value as the input, rather than A0-A7. Here is the logic flowing in the simulation, which is exactly what I want (I've circled the value going into the register, which is 2 – perfect):
However, now when I try to store this value in the register by pulsing the clock – I get an 'oscillation detected' error in Logisim:
This is the first time I've tried to build this, so is there something intrinsically wrong with my implementation, or am I missing something small which should make it perform as expected?
Best Answer
Your register is propagating it's output based on the "clock" level and not it's transition (aka transparent register), which is creating an unstable loop. For that circuit to work, you'd have to:
or