/* This is the code for mesh_NxN for the final debug challenge. */ import mesh_defs::*; module mesh_NxN #(parameter N=2) (If_mesh if_mesh); // ALL INDICES IN THIS FILE ARE TREATED AS Y,X LOCATIONS (I.E., ROW,COLUMN), // WHICH IS HOW MATRICES AND 2D ARRAYS USUALLY WORK. // BUT IT IS NOT HOW COORDINATES ARE USUALLY GIVEN IN GEOMETRY. //////////////////////////////////////////// // Declare the ring signals. //////////////////////////////////////////// Ring_slot vert_ring[N][N], hori_ring[N][N]; bit vert_link_dead[N][N]; //////////////////////////////////////////// // Instantiantiate the NxN array of mesh stops //////////////////////////////////////////// // See https://stackoverflow.com/questions/12504837/ // verilog-generate-genvar-in-an-always-block generate genvar x, y; for (y=0; y