|
@@ -47,9 +47,6 @@ init_pcilib (App *app)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- pcilib_enable_irq (app->pci, PCILIB_IRQ_TYPE_ALL, 0);
|
|
|
- pcilib_clear_irq (app->pci, PCILIB_IRQ_SOURCE_DEFAULT);
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -61,7 +58,7 @@ close_pcilib (App *app)
|
|
|
}
|
|
|
|
|
|
static cl_mem
|
|
|
-create_fpga_buffer (cl_context context, size_t size, uint8_t *base_addr, cl_int *error)
|
|
|
+create_fpga_buffer (App *app, size_t size, cl_int *error)
|
|
|
{
|
|
|
cl_mem buffer;
|
|
|
cl_mem_flags flags;
|
|
@@ -71,7 +68,7 @@ create_fpga_buffer (cl_context context, size_t size, uint8_t *base_addr, cl_int
|
|
|
addr.surface_bus_address = (cl_ulong) base_addr;
|
|
|
addr.marker_bus_address = (cl_ulong) base_addr;
|
|
|
|
|
|
- buffer = clCreateBuffer (context, flags, size, &addr, error);
|
|
|
+ buffer = clCreateBuffer (app->context, flags, size, &addr, error);
|
|
|
|
|
|
return buffer;
|
|
|
}
|
|
@@ -95,7 +92,7 @@ init_opencl (App *app)
|
|
|
app->check_buffer = clCreateBuffer (app->context, CL_MEM_WRITE_ONLY, 8, NULL, &error);
|
|
|
OCL_CHECK_ERROR (error);
|
|
|
|
|
|
- app->fpga_buffer = create_fpga_buffer (app->context, 1024 * 64, app->bar, &error);
|
|
|
+ app->fpga_buffer = create_fpga_buffer (app, 1024 * 64, &error);
|
|
|
OCL_CHECK_ERROR (error);
|
|
|
|
|
|
return error != CL_SUCCESS ? false : true;
|
|
@@ -134,8 +131,6 @@ launch_signal (App *app)
|
|
|
uint32_t check[2];
|
|
|
size_t global_work_size;
|
|
|
|
|
|
- uint32_t *data;
|
|
|
-
|
|
|
addr = 0x9168;
|
|
|
|
|
|
/* try to override defaultvalue */
|
|
@@ -171,7 +166,7 @@ launch_signal (App *app)
|
|
|
if (check[0] == addr && check[1] == value)
|
|
|
printf ("success\n");
|
|
|
else
|
|
|
- printf ("failed\n");
|
|
|
+ printf ("failed [0x%x != 0x%x || %u != %u]\n", check[0], addr, check[1], value);
|
|
|
}
|
|
|
|
|
|
int
|