Skip to content

Complex circuits performance #278

@hinell

Description

@hinell

Hi.

I got used to Digital for a while and currently experimenting with simulation a couple of sophisticated memory circuits but I came across an issue of freezing Digital when I hit the RUN or STEP-RUN buttons.

The Circuit

Screenshot_1

As you can see I'm trying to emulate simple memory cell
(it isn't that obvious but on the left there are addresses and on the right are the outputs).

The circuit I have created uses 3-levels of nested (embedded) sub circuits. You may notice that it also uses a lot of tunnels (don't ask me how I've created them). The tunnels are also used in the sub circuits.

The every slightly pinkish circuit contains about a 2 ^ 8 (total = 256) addressable cell each of which contains 32 bit-wide D-Flip-Flop. Everything is addressed by MUX.

The Issue

The issue arises when I hit the run button. The program simply renders unresponsive. It neither does shows signs of high CPU usage nor of excessive memory consumption. When I switch (open and run emulation) to a single circuit (pink in color) below it works at this level but it still takes noticeable time to respond.

Footnotes

So far I wasn't able to identify the weak part of the circuits. I came to a conclusion that Digital still doesn't handle well such complex cases. I'm still looking for solution or at least advice on how to organize custom-built RAM in order to get it to work.

Any thoughts?

I also noticed that there is no debuglog or something like that enabling users to report their problems supplying basic info about digital's state. It would be really nice feature I believe.

Related issues

The circuit above doesn't relate to a concept called unaligned memory access that was mentioned in the #233 issue.

Configuration

I've tried two versions of Digital.

  • Digital: V0.22
  • Digital: v0.22-119-g27301f2
  • Windows 10 x64 (16GB ram, Ryzen 5 2600 6 cores/12 Threads)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions