Suppose I have VHDL code that has a generic string STACK with the value "top". I want to pass it to a SystemVerilog module as a parameter, but SV does not have a type compatible with VHDL string. So I want to pass an integer generic with the ascii value of the string. If the string is "top", the integer value is 746F7020. If the string is "mid", the integer value is 6D696420. Is there a VHDL function or cast or something so I can instantiate the SV module with a generic like STACK => ascii_to_integer(STACK) ?
I've tried things like std_logic_vector(STACK) or integer'value(STACK), many other tries. I expect there's one simple answer that I just haven't found yet.