-
Notifications
You must be signed in to change notification settings - Fork 1
Extract Decoder and Jump chips from the CPU #2
New issue
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
base: master
Are you sure you want to change the base?
Conversation
I like this a lot, especially how much cleaner the CPU is after extracting the Jump chip. I also wonder if a possible further improvement might be to only pass the relevant bits of the instruction into the I haven't tested this at all, but what do we think about something like:
|
Thanks, @leocassarani; I've updated the PR with your suggested changes. I did wonder about passing only the required bits but was a bit stumped on the naming, what do you think to the updates? |
I actually think the original commit is better, as the I suggest an API similar to the below:
This would mean that only the |
There's definitely something appealing about having a single
|
I don't remember coming across anything in the Appendix about doing that (and don't have access to my book for a few days), I guess it's a tradeoff between a min-gate solution and an abstracted more understandable (hopefully) one. It seems like either we're missing something or there's a pretty huge hole in their hdl spec for something that seems basic? I guess I do remember reading that you could make a builtin using Java, but you'd still be left with a 'no-op' chip:
But since you would still have to specify in and out, it's not much of an improvement really. |
This is something we discussed during meeting 5b as a potential refactoring. I'm not sure if it makes things any clearer but might be worth reviewing.