We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For custom components, what if we did something like this:
type Mux8 struct { In [8]int `hw:in` Sel int `hw:in` Out [8]int `hw:out` } func (m *Mux8) Update(c *Circuit) { // ... } // Along with a Component interface type Component interface { Update(c *Circuit) }
And use reflect to get the specs of a part. Chip.mount could then instantiate parts as needed and init their input/outputs.
reflect
Chip.mount
The text was updated successfully, but these errors were encountered:
Working prototype: https://gist.github.com/db47h/de370b53213766c4890a3f7afcb83253
Sorry, something went wrong.
The prototype works with PartSpec. Plus it's les flexible than PartSpec:
PartSpec
Cons:
Pros:
PartSpec.Mount
Merged 34622ac
No branches or pull requests
For custom components, what if we did something like this:
And use
reflect
to get the specs of a part.Chip.mount
could then instantiate parts as needed and init their input/outputs.The text was updated successfully, but these errors were encountered: