Assigning a declared wire to connect ports on two different Verilog modules
Your problem is the order of the declaration in the reference. The error message is indicating they are in the reverse order of what you show. Wires must be declared before they are referenced. Otherwise they become implicit 1-bit wires and the the latter declaration becomes an error.