System Verilog typing warning.This assignment is a violation of SystemVerilog strong typing rules for enumeration datatypes

In reply to dave_59:

speed_port0 is just temporary variable , it is declared as
logic [2:0] speed_port0;