-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pattern atomize #9
base: master
Are you sure you want to change the base?
Conversation
Good proposal @redxeth, I like the additional functionality it would add. Some initial thoughts/comments as I read through it...
Just some ideas to think about, but I think we really need to flesh this stuff out in the RFC since I think there are a lot more corner cases and challenges with the actual pattern and program generation side of things vs. the register dirty tracking which is the focus of the RFC so far. |
@ginty thanks for the feedback. I was thinking only in terms of register tracking since for patterns that's the only thing that initially it seemed I needed to worry about. And pin states. Let me answer your bullets one by one:
Perhaps I would define v1 and v2 of the atomization upgrade in the RFC that imply different phases of it.
|
I would call those individual register methods, so you propose calling that on individual registers directly, rather than say for all registers or for all registers owned by a particular model. So the app will be responsible for keeping track of which registers to clean then? From your other comments it seems that I misunderstood the first time around. From the way you wrote def some_operation
atomize(options) do |atom|
block_select(blah)
end
atomize(options) do |atom|
erase(blah)
end
end But then on the other hand, you are talking about manually managing the list of atoms required for a particular test and about generating the atoms directly - in which case I can't see how the above would work, how would you launch the generation of an atom embedded within code like that? If atomize is really a top-level wrapper, then what does it do over and above the existing API for pattern creation? # pattern/block_select.rb
Pattern.create skip_startup: true, skip_shutdown: true do
block_select
end
# pattern/erase.rb
Pattern.create skip_startup: true, skip_shutdown: true do
erase
end If that's more like what we are talking about, how does the register stuff fit into that? At least in the block select case, you don't really want to reset the registers that it touches, so above is probably fine. For the second one, I could see two approaches that might work well, add a new Pattern.create skip_startup: true, skip_shutdown: true, restore_regs: true do
erase
end Or add a switch to tell Origen to treat all incoming register states as undefined: Pattern.create skip_startup: true, skip_shutdown: true, reg_states_undefined: true do
erase
end WIth all register states marked as undefined, it would mean that any application code that asked for values X in register Y, would always apply that and not skip an operation because it thinks the value is already there - i.e. you are telling it basically not to rely on reset values. This last approach seems the safest to me. |
Origen would be responsible for tracking which registers are at what state. Instead of
I envision it that was as well.
Not sure what you mean by manually here, the application handling it? In my above comments I kinda changed my mind a bit while I wrote so it can be confusing. So ignore this:
I would want ultimately for the program generation side to not have to worry at all about whether or not we are doing pattern atomization. So how to do that since the patset sheet (or equivalent) has to know the exact pattern filenames. It's a bit of chicken-and-egg (and hence your 4-step process above). (Was writing a BUNCH here, but decided after a bit to update the original proposal so it's more clear. Will try to address your concerns). |
RFCS for pattern atomization concept. Wanting to open up this topic for discussion and feedback.
View the RFC here - https://github.com/redxeth/rfcs/blob/e3ff5de27609c42f1952055bbe366a892386af51/0000-pattern-atomization.md