In the paper we have presented a polynomial-time algorithm that decides existence of a locally injective or surjective homomorphism of two universal covers of graphs. These covers are encoded by finite degree matrices.