This work aims to study the interplay between the Wilson–Cowan model and connection matrices. These matrices describe cortical neural wiring, while Wilson–Cowan equations provide a dynamical description of neural interaction. We formulate Wilson–Cowan equations on locally compact Abelian groups. We show that the Cauchy problem is well posed. We then select a type of group that allows us to incorporate the experimental information provided by the connection matrices. We argue that the classical Wilson–Cowan model is incompatible with the small-world property. A necessary condition to have this property is that the Wilson–Cowan equations be formulated on a compact group. We propose ap-adic version of the Wilson–Cowan model, a hierarchical version in which the neurons are organized into an infinite rooted tree. We present several numerical simulations showing that thep-adic version matches the predictions of the classical version in relevant experiments. Thep-adic version allows the incorporation of the connection matrices into the Wilson–Cowan model. We present several numerical simulations using a neural network model that incorporates ap-adic approximation of the connection matrix of the cat cortex.