I'm fairly new to HD description languages. I'm finding it a bit hard to change my C-ish programming skills, and I'm looking for a little guaidance to help my throw the following problem.
I want to implement a full tree, that its inner nodes are different than its leaves. The number of the leaves is generic (asuming there is 2^k leaves so the tree can be full)
Each inner node is a component made out of a simple combinational circuit.
The leaves are synchronized with a clock, and are connected to the next leaf (breaking the tree structures - and forming something like a shift register)
This means that my design has to have a generic number of components that is connected according to the number of leaves.
While this could be solved recursivly in no time in C-based languages. I can't grasp the idea of solving it in HDL, since this generic form is different than n-bit input signals...
My implementation must be synthesizable, so SystemVerilog can't shine in this area :(
Is it possible to implement the described problem while keeping my code synthesizable? can anyone guide me throw this or point me to a good reference regarding this topic?