So, I have a theoretical question about the Chisel code transformation.
I know Chisel is actually a set of Scala definitions, so it is compiled to Java bytecodes, which in turn run in the JVM and, just like a magic, it spits out Verilog equivalent description and even C++ description for older versions of Chisel.
The point is that I could not figure out how this "magic" works. My guess is that the code transformation from Chisel to Verilog/C++ is all based on Scala reflection. But I'm not sure about it as I could not find anything related to this topic.
So, is it about reflection? If so, is it compile time our runtime reflection? Can someone please give me a clue?
Thanks a lot.