1
$\begingroup$

I have a problem regarding dependencies. I'm making a circuit simulator thingy and I stumbled upon the problem of determining which circuit component should be updated first (since updates in my case mean that the output is transformed based on its inputs according to some specified behaviour, the behaviour being irrelevant). How does one efficiently tackle this problem and how does he approach the problem of circular dependencies? (e.g. in counters)

Sources on the topic are much appreciated!

$\endgroup$
0

1 Answer 1

1
$\begingroup$

If there are no circular dependencies you can just use a topological order of the associated directed graph (that contains edge $(u,v)$ if $v$ uses the output of $u$ as an input).

If there are circular dependencies then you could update the output of each component in discrete time steps, and compute it as a function of its inputs in the previous time step. This will work fine unless the circuit output depends on the subtle timing difference, as in some latches.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.