亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ispvm_ui.c

?? 在嵌入式系統(tǒng)中對Lattice CPLD軟件升級時所需的VME文件生成所需源代碼。
?? C
?? 第 1 頁 / 共 2 頁
字號:

/****************************************************************************
              ispvm_ui.c of  ispVM(tm) Embedded (File Based)                                      
              Lattice Semiconductor Corp. Copyright 1998-2003.
  ispVM(tm) ISP Virtual Machine provide multiple vendor In-System
  Programming support.
  All In-System Programmable devices can be supported by 4 simple constructs:
   SIR, SDR, STATE and WAIT.
  Complex tool is not required to support those 4 constructs. Lattice's
  ispVM(tm) Embedded supports those 4 basic constructs through the most
  efficient manner.
  By using those 4 basic constructs and by adding a few high level
  ispVM(tm) opcodes, In-System Programmable devices from any vendors can
  be daisy chained together for programming by the ispVM(tm).
  Other ispVM(tm) opcodes such as read and save, checksum calculation,
  branching, indirect data addressing, operation selection etc. are all 
  deleted from this ispVM(tm) Embedded Version to make the footprint of the 
  ispVM(tm) Embedded the most ideal solution for embedded applications.

  ispVME(tm) ispVM(tm) Embedded for Embedded Applications Where Resources
  is A Premium.
  This is the scale down version of the full ispVM target for embedded     
  applications. The footprint of this VM is less than 8K bytes in size.    
  Huffman encoding is used to minimize the Virtual Machine Format file size
  without increasing the VM footprint and addtional RAM for decompression  
  is not required.                                                         
  Typically only 100 bytes of RAM is required to hold one row of data when 
  processing the VMF file. The VM itself also need less than 100 bytes of  
  RAM to hold all the variables it needs.   
  Even if repeat looping is selected to reduce the VME file size, only 
  about 50 bytes of extra RAM will be required to hold the entire 
  repeat loop.                               
                                                                           
  This module is the front end of the ispVME(tm) where the VME (Virtual
  Machine Embedded) file resides on a hard disk. 

  The executable vme.exe comprises with the 3 modules:
  ispvm_ui.c       The User Interface of ispVME(tm);
  ivm_Core.c       The Core of the ispVM(tm).
  hardware.c       The hardware interface.

  The VME files can be obtained by using the SVF2VME.exe utility to convert
  SVF files from any vendors. 

  The VME file for ispLSI and ispGDX devices can be generated by using the
  dld2vme.exe utility.
  The daisy chaining process is automatically done by the utility. Example:
      svf2vme ispLSI.svf ispMACH.svf 6 9500XL.svf 7000AE.svf -o chain.vme
  A single VME file by the name of chain.vme is created which program
  the ispLSI, ispMACH, 9500XL and 7000AE sequentially.

  Simply launch the ispVME(tm) by typing:
      vme chain.vme

  The functional modules:
  GetByte()           Read a byte of code from the targeted VME file.
  ispVMMemManager()   Allocate memory to hold a row of data.
  ispVM()             Launch the ispVM(tm) with the given VME file.
  error_handler()     Supply error messages.

    7.000 Howard Tang   8/20/98 convert form ispCODE5C.c v5c.001            
    7.001 Howard Tang   11/9/98 take care of last bits of data.             
    8.000 Howard Tang   Employ splitting process for large data burst:
                        Example:
                        The large burst:   SDR 120000 TDI (0000000.....);
                        Split into:        ENDDR DRPAUSE;
                                           SDR 60000 TDI (000000..);
                                           SDR 60000 TDI (000000..);
    9.000 Howard Tang   4/26/01 Enhance ispVMBypass function to accept
                        HIR 32 TDI (00000000);
                        so that multiple device in a single SVF file is
                        supported.
                        NOTE: The more complicated construct of Header like
                              HIR 32 TDI (00000000) TDO (00000000)
                              are not supported. 
    9.001 ht   8/23/01  Add a flow control register to turn on
                        and off SDR cascading due to the splitting of a large
                        burst.
                        Add support to token based ispSTREAM file from
                        ispcode V7.0 created by dld2isp V7.0.  The Token
                        based ispSTREAM file is smaller in size than a VME
                        file. However the token based ispSTREAM file is
                        for ispLSI and ispGDX devices only. All MACH devices
                        shall use SVF file the convert to VME file.
*	tnt	10/22/02	set freed memory to null								*
*	tnt	10/22/02	free memory after each vme file processed if multiple	*
*					vme files are given										*
*  4/28/03 Update to v10.1.  v10.1 supports Continue If Fail (USERCODE      *
*          Verification).  Also changed were the preprocessor definitions   *
*          to make them clearer and easier to remove.                       *
*          Those definitions are: VME_NT, VME_1532, VME_DEBUG.              *
*          By simply defining these in the make file, they will enable their*
*          respective functions.                                            *
*          Note: VME_NT will include source code that Lattice Semiconductor *
*          Corporation does not release regularly.  Justifications must be  *
*          necessary to obtain the required files to compile for the NT     *
*          platform.                                                        *
*	2/11/03		Remove IEEE 1532 support.                                   *
*                                                                           *
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vmopcode.h"
#include "hardware.h"
#include "vmedefinitions.h"
#include "cable.h"

FILE * fptrVME;     /*file pointer to the VME file*/

unsigned char * pucHeapMemory = NULL; /*holds the entire repeat loop*/
unsigned short iHeapCounter = 0;           /*points to the current byte of HEAP*/
unsigned short iHEAPSize = 0;              /*the current size of HEAP in bytes*/

unsigned char * OutMaskData = NULL,    /*local RAM hold one row of MASK data*/
              * InData = NULL,         /*local RAM hold one row of TDI data*/
			  * OutData = NULL,        /*local RAM hold one row of TDO data*/
			  * HIRData = NULL,        /*local RAM hold the current SIR header*/
			  * TIRData = NULL,        /*local RAM hold the current SIR trailer*/
			  * HDRData = NULL,        /*local RAM hold the current SDR header*/
			  * TDRData = NULL;        /*local RAM hold the current SDR trailer*/ 
    
unsigned short InPort = 0x379;
unsigned short OutPort = 0x378;
unsigned short delayPercent = 0;

char szCommandLineArg[ 300 ] = { 0 };

extern unsigned short usFlowControl;
extern unsigned short usDataType;

/* In IVM_CORE.c */
extern char ispVMCode(void);
extern unsigned char File_Compress; 
extern char GetByte(void);

char ispVM( char * );
char GetByte(void);
void ispvMMemManager(char, unsigned short);
char ispVMFreeMem(void);

/* 05/27/03 Nguyen added to support Dynamic IO */
unsigned char *OutDMaskData=NULL;    /*local RAM hold one row of MASK data*/


/****************************************************************************
                      GETBYTE 
This procedure reads a byte from the VME File  
8/29/01 ht Enhanced to copy the file into memory for repeat loop support.
           Enhanced to read form the repeat loop memory base on the
           usDataType flag.

 Gobal:
 usDataType------It controls the source of getting data.
 pucHeapMemory-------It is to hold the entire repeat loop for execution.

*****************************************************************************/
unsigned char GetByte()
{
	unsigned char ucData;

#ifdef VME_DEBUG
	if ( usDataType & HEAP_IN ) {
		printf( "Data retrieved from HEAP\n" );
	}
	else {
		printf( "Data retrieved from FILE\n" );
	}
#endif
	
	if ( usDataType & HEAP_IN ) { /*fetch data from HEAP memory where repeat loop is*/
		if ( iHeapCounter > iHEAPSize ) {
			return -1;  /*heap over-run occur*/
		}
		ucData = pucHeapMemory[ iHeapCounter++ ];  /*fetch data from the stored repeat loop*/
	}
	else {
		ucData = fgetc( fptrVME );
		if ( feof( fptrVME ) ) {
			return -1;
		}
	}

#ifdef VME_DEBUG
	printf( "%.2X\n", ucData );
#endif
	
	return ( ucData );
}

/***************************************************************************
                     ispVMMemManager                                       
 Input:                                                           
 cTarget---------Memory for holding one row of TDI, TDO or MASK data.
 usSize-----------The size (in bytes) of memory to be allocated.

 Each VME file contains an MEM opcode which is to inform the ispVM on the
 worst case RAM size it needs to hold a row of data. This size actaully
 is user controllable. By default it is 8000 bytes maximum. Typical size
 is 100 bytes.
 Memory is allocated upon on need basis to minimize waste. 
****************************************************************************/
void ispVMMemManager( char cTarget, unsigned short usSize )
{
	static unsigned short usPreviousSize = 0;
	switch ( cTarget ) {
	case XTDI:
    case TDI:  
		if ( InData != NULL ) {
			if ( usPreviousSize == usSize ) {/*memory exist*/
				break;
			}
			else {
				free( InData );
				InData = NULL;
			}
		}
		InData = ( unsigned char * ) malloc( usSize / 8 + 2 );
		usPreviousSize = usSize;
		break;
    case XTDO:
    case TDO:
		if ( OutData!= NULL ) { 
			if ( usPreviousSize == usSize ) { /*already exist*/
				break;
			}
			else {
				free( OutData );
				OutData = NULL;
			}
		}
		OutData = ( unsigned char * ) malloc( usSize / 8 + 2 );
		usPreviousSize = usSize;
		break;
    case MASK:
		if ( OutMaskData != NULL ) {
			if ( usPreviousSize == usSize ) {/*already allocated*/
				break;
			}
			else {
				free( OutMaskData ); 
				OutMaskData = NULL;
			}
		}
		OutMaskData = ( unsigned char * ) malloc( usSize / 8 + 2 );
		usPreviousSize = usSize;
		break;
    case HIR:
		if ( HIRData != NULL ) {
			free( HIRData );
			HIRData = NULL;
		}
		HIRData = ( unsigned char * ) malloc( usSize / 8 + 2 );
		break;
    case TIR:
		if ( TIRData != NULL ) {
			free( TIRData );
			TIRData = NULL;
		}
		TIRData = ( unsigned char * ) malloc( usSize / 8 + 2 );
		break;
    case HDR:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级在线看| 日本福利一区二区| 色综合久久久久久久久久久| 欧美色视频在线观看| 亚洲综合图片区| 国产一区二区久久| 欧美色区777第一页| 国产精品久久久久久福利一牛影视| 日韩av网站免费在线| 97久久超碰国产精品电影| 日韩欧美一区在线观看| 亚洲尤物视频在线| 成人av电影免费观看| 亚洲精品一区二区三区四区高清 | 亚洲国产精品ⅴa在线观看| 一区二区在线观看免费| 成人晚上爱看视频| 精品国产一区二区三区av性色| 亚洲国产欧美另类丝袜| 91在线观看免费视频| 国产精品久久久久久久蜜臀| 国产精品一二二区| 精品女同一区二区| 麻豆精品精品国产自在97香蕉| 欧美亚洲综合网| 一区二区三区高清| 99视频一区二区| 国产精品久久久久久亚洲伦| 成人美女在线视频| 亚洲国产激情av| 国产成人精品免费视频网站| 26uuu亚洲婷婷狠狠天堂| 精品制服美女丁香| 精品乱人伦小说| 国内一区二区在线| 久久久国产精品麻豆| 国产麻豆视频一区二区| 久久综合九色综合97婷婷女人| 激情综合色播激情啊| 精品噜噜噜噜久久久久久久久试看| 美女网站在线免费欧美精品| 日韩欧美你懂的| 国内成人免费视频| 亚洲国产精品av| 色综合一区二区| 亚洲一区二区三区视频在线播放| 91久久线看在观草草青青| 亚洲一区在线观看网站| 欧美人妖巨大在线| 捆绑变态av一区二区三区| www欧美成人18+| 成人av网站在线观看免费| 亚洲视频综合在线| 欧美高清视频不卡网| 麻豆国产91在线播放| 国产欧美一区二区三区在线老狼| 成人黄色在线视频| 亚洲一区在线视频| 久久亚洲一区二区三区明星换脸 | 亚洲成av人片在线观看| 欧美高清视频不卡网| 国产伦理精品不卡| 亚洲激情中文1区| 日韩三级在线免费观看| 成人在线视频一区| 天堂资源在线中文精品| 精品日韩成人av| 色婷婷激情久久| 国产在线不卡一卡二卡三卡四卡| 国产精品卡一卡二| 91精品国产综合久久久久久 | 日日骚欧美日韩| 久久精品视频在线免费观看| 色综合一个色综合亚洲| 美女网站在线免费欧美精品| 日韩毛片视频在线看| 日韩午夜激情av| 一本到一区二区三区| 国产呦精品一区二区三区网站| 亚洲美女精品一区| 精品成人免费观看| 欧美日韩一卡二卡| 成人午夜又粗又硬又大| 麻豆国产精品官网| 亚洲一二三四在线观看| 国产精品丝袜91| 精品久久久久久综合日本欧美| 色综合久久88色综合天天6| 狠狠色综合日日| 天堂一区二区在线| 一区二区在线观看免费视频播放| 久久久欧美精品sm网站| 欧美一级高清大全免费观看| 一本大道av伊人久久综合| 国产精品77777| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲美女淫视频| 亚洲欧洲日产国产综合网| 久久美女艺术照精彩视频福利播放| 欧美日韩国产123区| 欧洲一区二区av| 91美女片黄在线观看| 成人免费视频一区二区| 国内不卡的二区三区中文字幕 | 亚洲人成伊人成综合网小说| av成人动漫在线观看| 久久久久久久综合日本| 国产一区二区电影| 欧美年轻男男videosbes| 国产一区二区三区四区在线观看| 婷婷开心激情综合| 亚洲国产sm捆绑调教视频| 一区二区三区免费观看| 亚洲欧美另类综合偷拍| 亚洲日韩欧美一区二区在线| 国产精品少妇自拍| 中文字幕 久热精品 视频在线| 国产亚洲一区字幕| 欧美激情自拍偷拍| 国产精品免费视频一区| 中文字幕在线观看不卡视频| 国产精品久久一卡二卡| 18欧美亚洲精品| 一二三四社区欧美黄| 亚洲国产一区在线观看| 日本中文字幕一区| 韩国视频一区二区| 亚洲第一综合色| 91视频www| 日韩欧美色综合| 久久亚洲免费视频| 国产精品免费免费| 亚洲色大成网站www久久九九| 亚洲欧美视频在线观看| 亚洲高清中文字幕| 美女尤物国产一区| 风流少妇一区二区| 91看片淫黄大片一级| 欧美蜜桃一区二区三区| 精品乱码亚洲一区二区不卡| 国产日产精品一区| 一级中文字幕一区二区| 免费久久精品视频| 成人aa视频在线观看| 欧美日韩免费观看一区二区三区| 日韩一区二区三区四区| 欧美国产成人精品| 亚洲v日本v欧美v久久精品| 激情伊人五月天久久综合| 91在线你懂得| 日韩一区二区在线观看| 国产精品国产三级国产三级人妇 | 亚洲成人综合在线| 久久99精品久久久久久动态图| 成人aaaa免费全部观看| 欧美精品自拍偷拍动漫精品| 欧美韩国日本不卡| 五月激情六月综合| 丁香六月综合激情| 制服丝袜亚洲网站| 亚洲人成网站精品片在线观看| 美女任你摸久久| 91视频观看视频| 久久亚洲免费视频| 午夜私人影院久久久久| 成人av电影免费观看| 日韩午夜电影av| 亚洲专区一二三| 成人黄页毛片网站| 欧美α欧美αv大片| 亚洲国产精品久久艾草纯爱| 成人一区二区三区视频在线观看| 67194成人在线观看| 亚洲啪啪综合av一区二区三区| 九一久久久久久| 欧美绝品在线观看成人午夜影视| 《视频一区视频二区| 国产成人免费av在线| 欧美一级夜夜爽| 亚洲国产精品久久艾草纯爱| 色综合天天视频在线观看| 久久久亚洲高清| 国产制服丝袜一区| 日韩视频免费观看高清完整版在线观看 | 一区二区激情视频| 成人国产一区二区三区精品| 久久先锋影音av| 美女诱惑一区二区| 欧美一级午夜免费电影| 婷婷成人激情在线网| 欧美视频在线播放| 亚洲国产欧美另类丝袜| 欧美午夜精品理论片a级按摩| 亚洲三级小视频| 国产91丝袜在线播放0| 国产午夜精品美女毛片视频| 国产又黄又大久久| 国产无人区一区二区三区| 国产一区二区三区在线观看免费| 精品久久久久久无|