HISTORY 1997 creation 1998-1999 various mods, including incrementally add 4010, 4013, etc. capability 2000 rewritten from standalone to library routine 8/2001 rewrote xilinx header code to be smarter, now actually decodes header and finds data size and start of data reliably and independent of the xilinx size. Also rewrote to look at and get sizes of and create a list of files found, then sort by size and try in order smallest to largest, since can SMOKE a 600 part trying to load a larger file in it.
(C) 1997-2007 Engineering Design Team, Inc.
Definition in file edt_bitload.c.
#include "edtinc.h"
#include "edt_bitload.h"
#include "pciload.h"
#include <stdlib.h>
#include <unistd.h>
Go to the source code of this file.
Defines | |
| #define | BUF_ENABLE 0x40 |
| #define | CCLK_ON 0x10 |
| #define | DATA_REG 0x40 |
| #define | DEBUG1 EDTLIB_MSG_INFO_1 |
| #define | DEBUG2 EDTLIB_MSG_INFO_2 |
| #define | DONE 0x02 |
| #define | INITL 0x01 |
| #define | INITL_OUTPUT_OFF 0x04 |
| #define | PROG_ENABLE 0x20 |
| #define | PROG_REG 0x41 |
| #define | PROGL 0x08 |
| #define | PROM_BUFSIZE ((SIZED_DATASIZE/4) - sizeof(u_int)) |
| #define | RC_MASK PDV_AIA_MC_MASK |
| #define | RC_X_CCLK PDV_AIA_MC1 |
| #define | RC_X_DATA PDV_AIA_MC2 |
| #define | RC_X_DONE PDV_CHAN_ID0 |
| #define | RC_X_INITSTAT PDV_CHAN_ID1 |
| #define | RC_X_PROG PDV_AIA_MC3 |
| #define | STAT_REG 0x42 |
| #define | X_CCLK 0x020000 |
| #define | X_DATA 0x010000 |
| #define | X_DONE 0x100000 |
| #define | X_INIT 0x080000 |
| #define | X_INITSTAT 0x200000 |
| #define | X_PROG 0x040000 |
Functions | |
| int | bitload_read_header (char *bitpath, char *header, int *size) |
| int | bitload_xilinx_from_path (char *path, char *xilinx) |
| int | edt_access_bitfile (char *tmppath, int perm) |
| int | edt_bitload (EdtDev *edt_p, const char *basedir, const char *bitfilename, int flags, int skip) |
| Searches for and loads a Xilinx gate array bit file into an EDT PCI board. | |
| void | edt_bitload_devid_to_bitdir (EdtDev *edt_p, char *devdir) |
| edt_bitload_from_prom (EdtDev *edt_p, u_char *addr1, int size1, u_char *addr2, int size2, int flags) | |
| Bitload from a given address in the PCI PROM. | |
| int | edt_bitload_loadit (EdtDev *edt_p, char *bitpath, int size, int skip, int ovr, int alt, int alt_param, int try, int do_sleep) |
| int | edt_bitload_select_fox_file (EdtDev *edt_p, char *rbtfile) |
Variables | |
| u_char * | Prombuf |
1.5.1