Go to the source code of this file.
void alloc_and_load_grid |
( |
INOUTP int * |
num_instances_type | ) |
|
Definition at line 22 of file SetupGrid.c.
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]);
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)
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)
Definition at line 130 of file SetupGrid.c.
136 for (i = 0; i <= (
nx + 1); ++i) {
137 for (j = 0; j <= (
ny + 1); ++j) {
void free_matrix(void *vptr, int nrmin, int nrmax, int ncmin, size_t elsize)
struct s_grid_tile ** grid