-
Notifications
You must be signed in to change notification settings - Fork 6
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
SR latch configuration in PAL unsupported: causes mismatch error during analysis #3
Comments
It shouldn't be possible (barring bugs, of course, didn't have 20L8 at hand to test), usually happens if a state was misrecorded. Now, this is more or less impossible for me to diagnose remotely, but when I had it in the past, in one case I had a flaky PAL which threw this randomly, and in the other I was able to get it working in the following way: First, execute the run of the analyzer to extract the IO mask and find which pins are inputs. |
Yep. Actually was just in the middle of working in peeper instead and I have one pin that will go to a stuck state once activated. I'll just have to ignore that pin for now. |
Ah, another time it happened (but doesn't look to be the case here) is I had one that several hours into the analysis started doing strange things. "Solved" placing a heatsink on it... |
Another thing that came to my mind: i wonder if this could be another case of pin being a feedback into itself, something like Maybe I should document this possibility.... |
I am thinking it might be possible. There is a single databus and IOW input on this PAL. Might be using it as a set once register. |
Solution for now is to just leave the pin lifted. Crude but effective. |
Figured it out after more poking. Turns out it's a SR latch. https://www.paul.de/tips/sr-ff-in-gal.htm |
Ah good job finding that out. I think it's worth tracking this. I don't have time right now to work on this, but who knows in the future (or maybe someone else). The issue here is that the algorithm is taking the inputs as enough to define a state change and move through the graph to another node, but in this case taking in account the output values would also be required. Example from the website above: |
@raymondh2 Should you happen to be able to reverse the PAL or generate equations that give you the same issue, I'd appreciate if you could upload them here. |
Hmm, I had some time today to look back at my code. Actually, I took into considerations the possibility of latches back then, and in fact, at least for simple ones, they do work. The important equation is the following: |
Tested this as well and had it work. There might be a more complex equation going on here. |
So it does seem to be a SR latch in this case. What is tripping it up is there being more than one state that resets and sets it. Example of case below /* *************** INPUT PINS ********************/ /* *************** OUTPUT PINS ********************/ A10 = 'b'x; !IDECS0 = (IDEPRI & !AEN & DSK) # (ALTIDEPRI & !AEN & !DSK); |
Thanks for looking into it. |
Been working on a PAL20L8 and running into this error. Really not sure how this is possible un an unregistered array.
[main] ERROR info.hkzlab.dupal.analyzer.palanalisys.explorers.OSExplorer - exploreOutStates() -> Mismatch in expected pins (E:A9|00 - A:E9|00) after walking path to state OS[O:A9|Z:00]
Exception in thread "main" info.hkzlab.dupal.analyzer.exceptions.DuPALAnalyzerException: exploreOutStates() -> Mismatch in expected pins after walking to state OS[O:A9|Z:00]
at info.hkzlab.dupal.analyzer.palanalisys.explorers.OSExplorer.exploreOutStates(OSExplorer.java:58)
at info.hkzlab.dupal.analyzer.board.boardio.DuPALAnalyzer.startAnalisys(DuPALAnalyzer.java:116)
at info.hkzlab.dupal.analyzer.App.main(App.java:74)
The text was updated successfully, but these errors were encountered: