33 if ((
nx > 32766) || (
ny > 32766)) {
34 vpr_printf(TIO_MESSAGE_ERROR,
"nx and ny must be less than 32767, since the router uses shorts (16-bit) to store coordinates.\n");
39 assert(
nx >= 1 &&
ny >= 1);
45 for (i = 0; i <= (
nx + 1); ++i) {
46 for (j = 0; j <= (
ny + 1); ++j) {
52 num_instances_type[i] = 0;
60 for (i = 1; i <=
nx; i++) {
74 for (i = 1; i <=
ny; i++) {
89 for (i = 1; i <=
nx; i++) {
91 for (j = 1; j <=
ny; j++) {
100 vpr_printf(TIO_MESSAGE_ERROR,
"in FillArch(), expected core blocks to have capacity <= 1 but (%d, %d) has type '%s' and capacity %d.\n",
117 dump =
my_fopen(
"grid_type_dump.txt",
"w", 0);
118 for (j = (
ny + 1); j >= 0; --j)
120 for (i = 0; i <= (
nx + 1); ++i)
122 fprintf(dump,
"%c",
grid[i][j].type->
name[1]);
136 for (i = 0; i <= (
nx + 1); ++i) {
137 for (j = 0; j <= (
ny + 1); ++j) {
149 for (i = 0; i <= (
nx + 1); ++i) {
150 for (j = 0; j <= (
ny + 1); ++j) {
152 vpr_printf(TIO_MESSAGE_ERROR,
"grid[%d][%d] has no type.\n", i, j);
157 vpr_printf(TIO_MESSAGE_ERROR,
"grid[%d][%d] has non-zero usage (%d) before netlist load.\n", i, j,
grid[i][j].
usage);
163 vpr_printf(TIO_MESSAGE_ERROR,
"grid[%d][%d] has invalid offset (%d).\n", i, j,
grid[i][j].
offset);
168 && (
grid[i][j].type->capacity > 0)) {
169 vpr_printf(TIO_MESSAGE_ERROR,
"grid[%d][%d] has no block list allocated.\n", i, j);
181 int priority, num_loc;
193 for (j = 0; j < num_loc; j++) {
205 }
else if (repeat > 0 && x > start && start > 0) {
206 if ((x - start) % repeat == 0) {
213 if (
nint(rel *
nx) == x) {
FILE * my_fopen(const char *fname, const char *flag, int prompt)
void ** alloc_matrix(int nrmin, int nrmax, int ncmin, int ncmax, size_t elsize)
void free_matrix(void *vptr, int nrmin, int nrmax, int ncmin, size_t elsize)
struct s_grid_loc_def * grid_loc_def
void alloc_and_load_grid(INOUTP int *num_instances_type)
static void * my_malloc(int ibytes)
static void CheckGrid(void)
struct s_grid_tile ** grid
static t_type_ptr find_type_col(INP int x)
struct s_type_descriptor * type_descriptors
static const char * match(const struct slre *, int, const char *, int, int *, struct cap *)