With the current release of the VHLS tools, everything needs to be static at compile time.
Taking as an example, a templated FIR filter:
This cannot be a top level function.
However, the following would be a valid top level:
It should be clear that top_type1 and top_type2 would be very different in size and performance.
As shown in this example, the tool cannot be expected to generate both top_type1 and top_type2 or any other combination on demand.