Skip to content

About Simulator #289

Answered by mkorbel1
chykon asked this question in Q&A
Feb 27, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Why is Simulator not an abstract class? Is there any use case for the Simulator object?

It should be abstract, good point! I'm not sure how that was missed. Opening an issue/PR for it would be a good idea, which I can do if you don't feel like it

Why is Simulator a static class? So the user is limited to one simulation context. If the state of the simulation were stored in an object, the user could create as many simulation contexts as needed.

There are a variety of constructs during a simulation that need to reference a single central simulator. For example, sequential logic (e.g. Sequential) needs to know when to sample a signal and when to drive an output based on clock edges. The …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@chykon
Comment options

@mkorbel1
Comment options

Answer selected by chykon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants