In synthesizable VHDL designs, I often need to do a few "software" calculations to convert high-level parameters (generics) into low-level configurations.
generic