I have been reading through the Diplomacy model for Chisel. I had a question regarding the design philosophy behind this. As I can understand, the lazy evaluation of Scala is used to register some compile time information which can be forced to evaluate during elaboration before FIRRTL generation to do meta-operations like parameter negotiation.
My question is, is this the only approach? Would it be possible to create a proxy object in Scala which registers these meta-properties and evaluates them when a particular function is called? Then this function can be called before evaluation, to do the negotiation.
The reason I am asking this is because I am incrementally learning Scala and Chisel, thus would like to understand how to build abstractions as incrementally as possible, without as basic primitives as possible.