Community

Ask A Question
Subscribe

You’re not receiving notifications from this thread.

simulation stack exceeded, but only for subcircuit

Created by Derek Wheeler • 3 years ago
General
avatar of user

Derek Wheeler

On  Oct 13, 2020

https://circuitverse.org/users/49622/projects/subcircuit-problem

I created a minimum circuit that demonstrates a problem I saw in a larger circuit. In this circuit, there's an input with a tristate gate attached to a common bus. Also on the bus is a D flip flop, with it's input from the bus, and it's output sent to a tristate gate which outputs to the bus. That's the upper circuit on the Main tab and that all works fine.

When I put the D flip flop into it's own subcircuit, I get 'simulation stack exceeded' when I change the input and try to latch that into the flip flop. That's the bottom circuit. So it's the exact same components, but just one of them is in a subcircuit.

Has anyone seen this behavior? Maybe I'm doing something wrong?

Thanks

avatar of user

Derek Wheeler

On  Oct 27, 2020

I've figured out a workaround and updated the example circuit. I added a new subcircuit that incorporates the tristate, rather than having the tristate in the main circuit. I added a new circuit at the bottom of the main circuit that shows this works and doesn't give the 'simulation stack exceeded' error.

avatar of user

Satvik Ramaprasad

On  Nov 09, 2020

Yes this a known bug, the tristate has to be used only in the final circuits, we are looking for a fix for this.

avatar of user

Derek Wheeler

On  Nov 18, 2020

Thanks Satvik!

avatar of user

noulmao

On  May 13, 2021

avatar of user

noulmao

On  May 13, 2021

it uses a tristate so if it overflows (2 or more on) cout will turn on and give a 1 to the NOT gate and the LED. causing an overflow error. (this could help.)

Want To Join The Discussion ?
Create account Log in