My knowledge in this area is limited, but I believe you should look at the interconnect feature of SystemVerilog. This is what lets the compiler derive the type of the port by what it is connected to.
Also, wreal is not part of the SystemVerilog standard, but some vendors support it under the appropriate switches. Check your documentation.