Decided it is time to move on to other projects.
The more readable version I distilled from the crude version compiles with timing problems and does not work on the scope, but in simulation the response seems to be correct. Since it is a crap design I don't feel the urge to continue on it.
With the crude version of the design, generated with the tool I wrote for it, it is proven that it is possible to get a somewhat working design from a given bit stream. Renamed most of the nets, and the ones left are for reading the data with the MCU and for the I2C part of the design.
Granted it is not perfect, and there are still issues when compiling it back into a bit stream due to compiler version, timing constraints and differences in place and route.
Conclusion is that it requires a lot of patience, skill and persistence to get a thing like this done. It was fun and I learned a lot from it about the working of FPGA's and simulation.
I uploaded the latest results to the repository https://github.com/pecostm32/Anlogic_AL3-10_Analyzing
First of all:
my deepest RESPECT for what you accomplished here.
It's mind-blowing the level of knowlege, wit and resilience you showed! Doing all this quest alone is quite a feat.
I had surfed your MCU software investigations but I had never seen this FPGA reversing thread, until today. Just to be able to follow your descriptions requires a unique ammount of knowledge (that I unfortunately only have a small part) but, nonetheless, provides a perfect sense of a reverse process goes along and how a reverser's mind work.
Love the iteration, bug catching, optimization, head banging, adaptation, accomplishment satisfaction, return to start...
Very well done. This is pure reversing and looks amazing in one's curriculum!
I hope to see (one day) you finish the work with the official HYPER-CRAP design and tools... (I know, from experience, that such an endeaveour is never finished, in one's mind, if we don't proper close it...
)