[Hardware OS Placer Interface] Responsible for interrupting and replacing a running process on the FPGA. More...
#include "hstructures.h"
Go to the source code of this file.
Functions | |
int | hplacer_set_icapdevice (const char *device) |
Set the full filename of the ICAP device. | |
int | hplacer_set_bitfilespath (const char *path) |
Set the path of the bitfiles. | |
char * | hplacer_create_full_bitfilename (struct hprocess *process) |
Create full bitfilename. | |
int | hplacer_interrupt_process (struct hprocess *process) |
Interrupt a process running on the FPGA. | |
int | hplacer_start_process (struct hprocess *process) |
Start a process running on the FPGA. | |
int | hplacer_save_state (struct hprocess *process) |
Communicate with the running FPGA-process and make it send the state information back to the HWOS. | |
int | hplacer_load_state (struct hprocess *process) |
Load state information from memory/disk into the running process on the FPGA. | |
int | hplacer_load_process (struct hprocess *process) |
Load process into FPGA area. |
[Hardware OS Placer Interface] Responsible for interrupting and replacing a running process on the FPGA.
Author (2011): Sindre Hansen
Definition in file hplacer.h.
char* hplacer_create_full_bitfilename | ( | struct hprocess * | process | ) |
Create full bitfilename.
This will allocate a string containing the path of the bitfiles and the file name of the given process' bitfilename.
process | Take bitfilename from this process. |
Definition at line 45 of file hplacer.c.
{ if (process == NULL) return NULL; // Enough memory for the strings + null-char + '/'. char* full_filename = calloc(1, strlen(get_bitfilespath_()) + strlen(hprocess_get_bitfilename(process)) + 2); strcpy(full_filename, get_bitfilespath_()); strcat(full_filename, "/"); strcat(full_filename, hprocess_get_bitfilename(process)); return full_filename; }
int hplacer_interrupt_process | ( | struct hprocess * | process | ) |
int hplacer_load_process | ( | struct hprocess * | process | ) |
Load process into FPGA area.
This will place the given process on the FPGA.
Definition at line 66 of file hplacer.c.
{ char* filename_full = hplacer_create_full_bitfilename(process); int device_handle = hicap_open((char*)get_icap_device_(), "XC4VFX12"); if (device_handle < 0) return -1; hicap_close(device_handle); free(filename_full); return 0; }
int hplacer_load_state | ( | struct hprocess * | process | ) |
Load state information from memory/disk into the running process on the FPGA.
This version of the HWOS will always fetch the state information from a file on disk.
int hplacer_save_state | ( | struct hprocess * | process | ) |
Communicate with the running FPGA-process and make it send the state information back to the HWOS.
This assumes that the process is already placed on the FPGA and is stopped. This version of the HWOS will always store the state information in a file.
int hplacer_set_bitfilespath | ( | const char * | path | ) |
int hplacer_set_icapdevice | ( | const char * | device | ) |
int hplacer_start_process | ( | struct hprocess * | process | ) |
Start a process running on the FPGA.
This assumes that the process is already placed on the FPGA, but not running.