notes:fpga:xilinx
Differences
This shows you the differences between two versions of the page.
| notes:fpga:xilinx [2025/02/14 11:31] – ↷ Page moved from notes:xilinx to notes:fpga:xilinx azman | notes:fpga:xilinx [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Xilinx Tools on Linux ====== | ||
| - | |||
| - | These notes are for ISE Design Suite 10.1 (applicable to ISE WebPack 10.1)... also, the later ones when implied. | ||
| - | |||
| - | ====== General Stuff ====== | ||
| - | |||
| - | ===== Warning! ===== | ||
| - | |||
| - | I found [[https:// | ||
| - | |||
| - | ===== Information ===== | ||
| - | |||
| - | I've also downloaded ISE 12.1 and found out that it is now using flexlm-based license. So, the easiest way to setup the license is to place it in '' | ||
| - | |||
| - | The TCL script I created with 10.1 may still be usable after all in 12.1. The project name extension HAS to be '' | ||
| - | |||
| - | Also, the project option for simulation tool using Xilinx ISE Simulator gets a new label - "ISim (VHDL/ | ||
| - | |||
| - | Changing time resolution for ISIM - edit '' | ||
| - | |||
| - | ISIM supports VHDL2000 and Verilog2001 (I don't care about other HDLs). Of course, it also supports a mixed VHDL/ | ||
| - | |||
| - | So, the free ISIM Lite has a limitation after all (I think they don't have this in earlier versions - e.g. ISE10 and older). So Based on Xilinx ISIM user guide UG660 (version 12.4) dated 14/12/2010, when "// | ||
| - | |||
| - | ===== FPGA Design Flow ===== | ||
| - | |||
| - | This is a summary for FPGA design flow using Xilinx tools that comes with ISE. | ||
| - | |||
| - | < | ||
| - | - Synthesis Tool (xst) | ||
| - | |||
| - | = [formal] creates a netlist from design entry | ||
| - | = [plain] identifies component (fsm, reg, mux, etc.) structure | ||
| - | = outputs ngc file (Xilinx netlist format) | ||
| - | = optionally outputs a log file | ||
| - | = creates other files like lso (library search order) | ||
| - | = requires temporary directory (xst - but can be set) | ||
| - | = need input project prj file (list of design files) | ||
| - | = need input command xst file (xst command options) | ||
| - | |||
| - | - Translate Tool (ngdbuild) | ||
| - | |||
| - | = [formal] generates a database of required resources on specified package | ||
| - | = [plain] translates the netlist into physical component in an fpga package | ||
| - | = will fail if the specified package cannot provide enough resources | ||
| - | = outputs ngd file (Xilinx data format) | ||
| - | = creates temporary bld file | ||
| - | = requires temporary directory (_ngo - but can be set) | ||
| - | = need input netlist ngc file | ||
| - | = need input contraints ucf file (includes pin assignments) | ||
| - | |||
| - | - Mapping Tool (map) | ||
| - | |||
| - | = [formal] maps requested resources to specific area on the fpga | ||
| - | = [plain] puts the physical component into their actual location on fpga | ||
| - | = can be time-driven (which puts connected component close to avoid delay) | ||
| - | = outputs an intermediate ncd file (placement file format) & pcf file | ||
| - | = optionally outputs a usage file | ||
| - | = creates mrp file (details), ngm file | ||
| - | = need input database ngd file | ||
| - | |||
| - | - Place & Route Tool (par) | ||
| - | |||
| - | = [formal] refine resource allocation to comply with timing constraits | ||
| - | = [plain] rearrange the resources so that the design performs better | ||
| - | = outputs final ncd file (placement file format) | ||
| - | = creates pad, par, unroutes xpi, _pad.csv, _pad.txt file | ||
| - | = need input intermediate placement ncd file | ||
| - | = need input physical constraints pcf file | ||
| - | |||
| - | - Bitstream Generation Tool (bitgen) | ||
| - | |||
| - | = [formal] creates final bitstream from placement file | ||
| - | = [plain] generate the bitstream file to be programmed onto the fpga | ||
| - | = outputs bit file (bitstream file) | ||
| - | = creates bgn, drc file | ||
| - | = need input final placement ncd file | ||
| - | |||
| - | - (Optional) Simulation File Creation Tool (trce) | ||
| - | |||
| - | = back-annotation? | ||
| - | = creates twr file from ncd & pcf | ||
| - | </ | ||
| - | |||
| - | ===== VHDL Library Selection ===== | ||
| - | |||
| - | When working with VHDL for hardware logic design (i.e. for synthesis to be used on programmable logic hardware), using IEEE std_logic_1164 package is a must. This is the core package to work with low level signals. When you need arithmetic package there are 2 options: | ||
| - | |||
| - | - The std_logic_arith package: this is an extension by Synopsys that was widely used by hardware vendors. However, there is a slight possibility that this will not be supported by tools that decided not to implement them since they are not actually a defined standard. | ||
| - | - The numeric_std package: this is the standard defined by IEEE. However, it is relatively new compared to std_logic_arith - so, the possibility of this not being implemented by a tool is even greater. However, at the time of writing, it can be confirmed that Xilinx ISE suite and Modelsim simulator both support this library. | ||
| - | |||
| - | I was more familiar with the std_logic_arith package - but somehow I just experienced something that might just push me towards using the other package. Now, to use signed arithmetic, we need another package called std_logic_signed (surprise, surprise...). It turns out, conv_integer for both signed and unsigned type will yield signed results and adding std_logic_unsigned will create an error because it will try to define the same set of functions. Using numeric_std gave no problems at all. So, maybe it's time I get standardized. | ||
| - | |||
| - | ===== Tcl Interface ===== | ||
| - | |||
| - | It's an abbreviation for Tool Command Language - but became ' | ||
| - | |||
| - | Running the shell: | ||
| - | |||
| - | < | ||
| - | # tclsh | ||
| - | </ | ||
| - | |||
| - | Getting the info: | ||
| - | |||
| - | < | ||
| - | % info tclversion | ||
| - | 8.5 | ||
| - | % info patchlevel | ||
| - | 8.5.7 | ||
| - | % package require Tcl | ||
| - | 8.5.7 | ||
| - | </ | ||
| - | |||
| - | [[wp> | ||
| - | |||
| - | ====== Installation Issues ====== | ||
| - | |||
| - | ===== Linux USB Cable ===== | ||
| - | |||
| - | Installing cable driver is a mess. There' | ||
| - | |||
| - | ===== Enforced Path-name ===== | ||
| - | |||
| - | ISE 12.1 (I guess starting from ISE 11) starts to impose ISE_DS in the installation path. This does not work well with my script. I know I can change my script, but then the installation path will be a bit long and this has, in the past, pose some problems. A solution is to edit all '' | ||
| - | |||
| - | <file bash chpath.sh> | ||
| - | #!/bin/bash | ||
| - | |||
| - | CURRPATH=$(pwd) | ||
| - | CONFFILE=$(find $CURRPATH -maxdepth 1 -name " | ||
| - | |||
| - | [[ " | ||
| - | |||
| - | for settfile in $(find $CURRPATH -name " | ||
| - | sed -i ' | ||
| - | echo " | ||
| - | done | ||
| - | </ | ||
| - | |||
| - | ===== Digilent USB Cable ===== | ||
| - | |||
| - | To use Digilent USB JTAG cable, have this in ''/ | ||
| - | <file udev 99-digilent-usb.rules> | ||
| - | SUBSYSTEM==" | ||
| - | </ | ||
| - | |||
| - | Of course, we need to install stuffs from digilent (Adept?). | ||
| - | |||
| - | ====== Run-time Issues ====== | ||
| - | |||
| - | Run-time issues running Xilinx tools on Slackware Linux. | ||
| - | |||
| - | ===== Running ISE 12.1 on Slackware 14.1 ===== | ||
| - | |||
| - | When trying to run ISE 12.1 on Slackware 14.1, nothing comes up. Turns out an environment variable QT_PLUGIN_PATH is the reason for this. Unsetting this (or setting to ' | ||
| - | |||
| - | < | ||
| - | QT_PLUGIN_PATH= ise | ||
| - | </ | ||
| - | |||
| - | //**Note:** KDE_SESSION_VERSION variable is no longer an issue in Slackware 14.1!// | ||
| - | |||
| - | ===== Running ISE 12.1 on KDE 4 ===== | ||
| - | |||
| - | When trying to run ISE 12.1 on KDE, it will give out a segmentation fault. Googling for it brings us to this [[https:// | ||
| - | |||
| - | < | ||
| - | unset KDE_SESSION_VERSION; | ||
| - | </ | ||
| - | |||
| - | ===== Conflicting TCL Library ===== | ||
| - | |||
| - | Apparently running Xilinx' | ||
| - | |||
| - | <code bash> | ||
| - | # added to override usage of system' | ||
| - | LD_PRELOAD=${XILINX}/ | ||
| - | export LD_PRELOAD | ||
| - | </ | ||
| - | |||
| - | ***Update20100609*** This is no longer needed for Slackware 13.0 | ||
| - | |||
| - | ===== Missing Library ===== | ||
| - | |||
| - | I got myself the Video Starter Kit development board from Xilinx - which comes with ISE Design Suite 10.1 that includes a license for EDK and System Generator. I was trying to synthesize the demo project when it complains about a shared library // | ||
| - | |||
| - | ====== Technical Issues ====== | ||
| - | |||
| - | ===== 20150616 - Impact sometimes refuse to connect (USB cable) ===== | ||
| - | |||
| - | On Linux, run this: | ||
| - | < | ||
| - | |||
| - | ===== 20121218 - Running Check Syntax in 64-bit ISE 12.1 ===== | ||
| - | |||
| - | I've just found out this issue when running the command using tcl script - I got a " | ||
| - | |||
| - | **ADDED201212182133** Maybe... just maybe... it would work fine if I use multi-lib? | ||
| - | |||
| - | ===== 20100819 - GNU Cross-Compiler for Microblaze in 64-bit ISE 10.1 ===== | ||
| - | |||
| - | I found this out earlier but I just remembered to put this here. The GNU cross-compiler for Microblaze (at least some of the binaries) are actually 32-bit ELF binaries. Obviously, I can't run this on my 64-bit machine. For the record, I don't like having multi-lib configuration - my system is a pure 64-bit system. So, I have to split the bitstream and software development and synthesis/ | ||
| - | |||
| - | ===== 20091221 - Creating SystemACE file ===== | ||
| - | |||
| - | I managed to find out how I can create system.ace file from both executable.elf and download.bit - we need the genace.tcl script ($XILINX/ | ||
| - | |||
| - | < | ||
| - | xmd -tcl genace.tcl -opt genace.opt | ||
| - | </ | ||
| - | |||
| - | Running the command without //-opt// will give you a short description on how to use the script. I'd like to remind myself that this script requires a shell environment with Xilinx environment set (i.e. sourcing settings32.sh/ | ||
| - | |||
| - | < | ||
| - | PATH=$XILINX/ | ||
| - | </ | ||
| - | |||
| - | Without these paths (actually you only need one depending on which processor core you're using), the script will not be able to extract information like the start address from the ELF file. The path is where the related tools are located. | ||
| - | |||
| - | Unfortunately, | ||
| - | |||
| - | < | ||
| - | -jprog | ||
| - | -board user | ||
| - | -target mdm | ||
| - | -hw implementation/ | ||
| - | -elf Camera_Frame_Buffer_Sw/ | ||
| - | -configdevice devicenr 1 idcode 0x05059093 irlength 16 partname xcf32p | ||
| - | -configdevice devicenr 2 idcode 0x06e59093 irlength 8 partname xc2c64a | ||
| - | -configdevice devicenr 3 idcode 0x0a001093 irlength 8 partname xccace | ||
| - | -configdevice devicenr 4 idcode 0x0384e093 irlength 6 partname xc3sd3400a | ||
| - | -debugdevice devicenr 4 cpunr 1 | ||
| - | -ace system.ace | ||
| - | </ | ||
| - | |||
| - | The hardest part was to find the IDcode/ | ||
| - | |||
| - | We can get the chain information (device number) and part names by running Impact (with the board connected and switched on). We can also get the IDcodes here but somehow I can't get the one for '' | ||
| - | |||
| - | So, with all these, I managed to create a system.ace file - but I haven' | ||
| - | |||
| - | **Update20100119** Okay... it did not get me the desired results. The created ACE file was not loaded properly! Where did I do wrong?? | ||
| - | |||
| - | **Update20100121** Need to look into '' | ||
| - | |||
| - | **Update20100520** Thanks to Vit Zikmund who emailed me a solution for this! I managed to get it working from the created ACE file! So... the final configuration file is as shown below. | ||
| - | |||
| - | < | ||
| - | -jprog | ||
| - | -board user | ||
| - | -target mdm | ||
| - | -hw download.bit | ||
| - | -elf executable.elf | ||
| - | -configdevice devicenr 1 idcode 0x0384e093 irlength 6 partname xc3sd3400a | ||
| - | -debugdevice devicenr 1 cpunr 0 | ||
| - | -ace system.ace | ||
| - | </ | ||
| - | |||
| - | ===== 20091217 - Softapps too big for bitstream ===== | ||
| - | |||
| - | There are times (like what I'm facing while working on the Xilinx Spartan3A Video Starter Kit) when the software (e.g. executable.elf file) is too big to be embedded in the bitstream. As a solution, we can try to convert the application into a system ace file. I still can't do that but for the time being, here's a usable solution: | ||
| - | |||
| - | 1. download the bitstream file as usual, but you most probably can't see any difference since the software part is still not running | ||
| - | |||
| - | 2. open up XMD debugger interface that will take you to an XMD prompt | ||
| - | |||
| - | 3. type these commands: | ||
| - | |||
| - | < | ||
| - | XMD% Stop | ||
| - | XMD% dow path/ | ||
| - | XMD% run | ||
| - | </ | ||
| - | |||
| - | 4. you should now have the application running as expected | ||
| - | |||
| - | // | ||
| - | |||
| - | ===== 20091215 - Using Xilinx EDK Tool ===== | ||
| - | |||
| - | Now I remember why I hate working with EDK. Synthesis took forever... and I can't create/ | ||
| - | |||
| - | I need to work with the [[https:// | ||
| - | |||
| - | |||
| - | ====== Custom Solutions ====== | ||
| - | |||
| - | Stuffs to share... | ||
| - | |||
| - | ===== Startup Script ===== | ||
| - | |||
| - | Based on the issues discussed above, I have created a bash startup script for my Xilinx Tool. | ||
| - | |||
| - | **Updated 20100715** This one adds support for 64-bit Linux. | ||
| - | |||
| - | <file bash xil-exec> | ||
| - | #!/bin/bash | ||
| - | |||
| - | XILINX_VERS=${XILINX_VERS: | ||
| - | XILINX_PATH=${XILINX_PATH: | ||
| - | XILINX_ARCH=" | ||
| - | [[ " | ||
| - | XILINX_CONF=${XILINX_CONF: | ||
| - | XILEDK_CONF=${XILEDK_CONF: | ||
| - | PATH_ARCH="" | ||
| - | [[ " | ||
| - | |||
| - | if [ -r $XILINX_CONF ] ; then | ||
| - | source $XILINX_CONF | ||
| - | else | ||
| - | echo " | ||
| - | exit 1 | ||
| - | fi | ||
| - | |||
| - | if [ -r $XILEDK_CONF ] ; then | ||
| - | source $XILEDK_CONF | ||
| - | else | ||
| - | echo " | ||
| - | exit 1 | ||
| - | fi | ||
| - | |||
| - | # allow ISE/EDK to use the USB Cable Driver | ||
| - | #export XIL_IMPACT_USE_LIBUSB=1 | ||
| - | # added to override usage of system' | ||
| - | # may not need this on slack13.0 (tcl8.5.7) | ||
| - | #export LD_PRELOAD=${XILINX}/ | ||
| - | # added to use a working cable driver | ||
| - | #export LD_PRELOAD=" | ||
| - | |||
| - | if [ " | ||
| - | # start a shell | ||
| - | THISPATH=" | ||
| - | export PATH=$THISPATH: | ||
| - | exec env PS1=" | ||
| - | else | ||
| - | target=$1 | ||
| - | shift | ||
| - | [ " | ||
| - | [ " | ||
| - | [ " | ||
| - | fi | ||
| - | |||
| - | exit 0 | ||
| - | </ | ||
| - | |||
| - | ===== Bitstream File Info ===== | ||
| - | |||
| - | Something I wrote based on some info I got on the internet... it has been a while since I last used this. It was working... I think. | ||
| - | |||
| - | <file c xbitinfo.c> | ||
| - | #include < | ||
| - | #include < | ||
| - | |||
| - | #define BIT_HEAD_LENGTH 0x0009 | ||
| - | #define ONE_HEAD_LENGTH 0x0001 | ||
| - | /* LITTLE-ENDIAN of 0xaa995566 */ | ||
| - | #define DATA_SYNC 0x665599aa | ||
| - | |||
| - | typedef unsigned long kword; | ||
| - | typedef unsigned short hword; | ||
| - | typedef unsigned char kbyte; | ||
| - | |||
| - | typedef struct _bitsdata | ||
| - | { | ||
| - | kword sizeup; | ||
| - | hword length; | ||
| - | kbyte *pdata; | ||
| - | } | ||
| - | bitsdata; | ||
| - | |||
| - | hword swapbyte(hword test) | ||
| - | { | ||
| - | hword temp = test & 0xff; | ||
| - | test >>= 8; | ||
| - | temp <<= 8; | ||
| - | temp |= test; | ||
| - | return temp; | ||
| - | } | ||
| - | |||
| - | kword swapword(kword test) | ||
| - | { | ||
| - | kword temp = test & 0xff; | ||
| - | test >>= 8; | ||
| - | temp <<= 8; | ||
| - | temp |= test & 0xff; | ||
| - | test >>= 8; | ||
| - | temp <<= 8; | ||
| - | temp |= test & 0xff; | ||
| - | test >>= 8; | ||
| - | temp <<= 8; | ||
| - | temp |= test & 0xff; | ||
| - | return temp; | ||
| - | } | ||
| - | |||
| - | int getalpha(FILE* pfile, char test) | ||
| - | { | ||
| - | char tdata; | ||
| - | void *ptest = (void*) &tdata; | ||
| - | fread(ptest, | ||
| - | if(tdata==test) return 1; | ||
| - | else return 0; | ||
| - | } | ||
| - | |||
| - | int getlength(FILE* pfile, hword* pdata) | ||
| - | { | ||
| - | int retval; | ||
| - | void *ptest = (void*) pdata; | ||
| - | retval = fread(ptest, | ||
| - | *pdata = swapbyte(*pdata); | ||
| - | return retval; | ||
| - | } | ||
| - | |||
| - | int getsizeup(FILE* pfile, kword* pdata) | ||
| - | { | ||
| - | int retval; | ||
| - | void *ptest = (void*) pdata; | ||
| - | retval = fread(ptest, | ||
| - | *pdata = swapword(*pdata); | ||
| - | return retval; | ||
| - | } | ||
| - | |||
| - | int createdata(FILE* pfile, bitsdata* pbits) | ||
| - | { | ||
| - | kbyte* ptemp = 0x0; | ||
| - | kword sizeup = 0x0; | ||
| - | hword length = 0x0; | ||
| - | void* ptest; | ||
| - | int result; | ||
| - | /* get data length */ | ||
| - | if(pbits-> | ||
| - | { | ||
| - | getsizeup(pfile,& | ||
| - | length = sizeup; | ||
| - | } | ||
| - | else | ||
| - | { | ||
| - | getlength(pfile,& | ||
| - | sizeup = length; | ||
| - | } | ||
| - | /* create storage */ | ||
| - | ptemp = malloc(sizeup); | ||
| - | if(!ptemp) return -1; | ||
| - | /* setup structure */ | ||
| - | pbits-> | ||
| - | pbits-> | ||
| - | pbits-> | ||
| - | /* read in data, return read count */ | ||
| - | ptest = (void*) pbits-> | ||
| - | result = fread(ptest, | ||
| - | if(result!=(int)sizeup) | ||
| - | { | ||
| - | printf(" | ||
| - | result, | ||
| - | } | ||
| - | return result; | ||
| - | } | ||
| - | |||
| - | int deletedata(bitsdata* pbits) | ||
| - | { | ||
| - | if(pbits-> | ||
| - | pbits-> | ||
| - | pbits-> | ||
| - | pbits-> | ||
| - | return 0; | ||
| - | } | ||
| - | |||
| - | int main(int argc, char *argv[]) | ||
| - | { | ||
| - | FILE *pfile; | ||
| - | int count; | ||
| - | bitsdata xdata = { 0,0,0x0 }; | ||
| - | kword* datasync; | ||
| - | kbyte headmask = 0x0f; | ||
| - | char protocol = ' | ||
| - | |||
| - | if(argc< | ||
| - | { | ||
| - | printf(" | ||
| - | return -1; | ||
| - | } | ||
| - | |||
| - | pfile = fopen(argv[1]," | ||
| - | if(!pfile) | ||
| - | { | ||
| - | printf(" | ||
| - | return -2; | ||
| - | } | ||
| - | |||
| - | /* get file header */ | ||
| - | if(createdata(pfile,& | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check file header length */ | ||
| - | if(xdata.length!=BIT_HEAD_LENGTH) | ||
| - | { | ||
| - | printf(" | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check file header */ | ||
| - | for(count=0; | ||
| - | { | ||
| - | if(xdata.pdata[count] != headmask) | ||
| - | { | ||
| - | printf(" | ||
| - | headmask, | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | headmask = ~headmask; | ||
| - | } | ||
| - | if(xdata.pdata[BIT_HEAD_LENGTH-1]!=0x00) | ||
| - | { | ||
| - | printf(" | ||
| - | xdata.pdata[BIT_HEAD_LENGTH-1]); | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* data not used anymore! */ | ||
| - | deletedata(& | ||
| - | /* check special length data? -> not in pattern? */ | ||
| - | getlength(pfile,& | ||
| - | if(xdata.length!=ONE_HEAD_LENGTH) | ||
| - | { | ||
| - | printf(" | ||
| - | ONE_HEAD_LENGTH, | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check protocol char */ | ||
| - | if(!getalpha(pfile, | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check design name */ | ||
| - | if(createdata(pfile,& | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* validate data */ | ||
| - | if(xdata.pdata[xdata.length-1]!=0x00) | ||
| - | { | ||
| - | printf(" | ||
| - | xdata.pdata[xdata.length-1]); | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* print design name */ | ||
| - | printf(" | ||
| - | deletedata(& | ||
| - | /* check next protocol char */ | ||
| - | protocol++; | ||
| - | if(!getalpha(pfile, | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check part name */ | ||
| - | if(createdata(pfile,& | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* validate data */ | ||
| - | if(xdata.pdata[xdata.length-1]!=0x00) | ||
| - | { | ||
| - | printf(" | ||
| - | xdata.pdata[xdata.length-1]); | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* print part name */ | ||
| - | printf(" | ||
| - | deletedata(& | ||
| - | /* check next protocol char */ | ||
| - | protocol++; | ||
| - | if(!getalpha(pfile, | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check string date */ | ||
| - | if(createdata(pfile,& | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* validate data */ | ||
| - | if(xdata.pdata[xdata.length-1]!=0x00) | ||
| - | { | ||
| - | printf(" | ||
| - | xdata.pdata[xdata.length-1]); | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* print string date */ | ||
| - | printf(" | ||
| - | deletedata(& | ||
| - | /* check next protocol char */ | ||
| - | protocol++; | ||
| - | if(!getalpha(pfile, | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check string time */ | ||
| - | if(createdata(pfile,& | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* validate data */ | ||
| - | if(xdata.pdata[xdata.length-1]!=0x00) | ||
| - | { | ||
| - | printf(" | ||
| - | xdata.pdata[xdata.length-1]); | ||
| - | deletedata(& | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* print string time */ | ||
| - | printf(" | ||
| - | deletedata(& | ||
| - | /* check next protocol char */ | ||
| - | protocol++; | ||
| - | if(!getalpha(pfile, | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* check raw bits */ | ||
| - | xdata.sizeup = 1; | ||
| - | if(createdata(pfile,& | ||
| - | { | ||
| - | printf(" | ||
| - | fclose(pfile); | ||
| - | return -1; | ||
| - | } | ||
| - | /* validate raw bit stream */ | ||
| - | datasync = (kword*) xdata.pdata; | ||
| - | printf(" | ||
| - | datasync++; | ||
| - | printf(" | ||
| - | if(*datasync!=DATA_SYNC) | ||
| - | printf(" | ||
| - | /* print raw bits */ | ||
| - | printf(" | ||
| - | deletedata(& | ||
| - | |||
| - | fclose(pfile); | ||
| - | return 0; | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | ===== Using Digilent JTAG-USB Cable ===== | ||
| - | |||
| - | - install digilent adept runtime & utilities | ||
| - | = need to tweak udev rules a bit... (do i really have to?) | ||
| - | - install libusb | ||
| - | - read the README file that comes with the plugin! how to select using that plugin! | ||
| - | |||
| - | //to be continued...// | ||
notes/fpga/xilinx.1739503876.txt.gz · Last modified: by azman
