Click here to Skip to main content
15,891,473 members
Articles / Programming Languages / CUDA

Xilinx FPGA with AVRILOS

Rate me:
Please Sign up or sign in to vote.
4.87/5 (12 votes)
9 Nov 2011CDDL21 min read 50K   689   14  
How-To Embed Xilinx FPGA Configuration Data to AVRILOS
/* Debug Extension commands */
/***************************************************************************
 Project:		AVRILOS
 Title:			Compact Debugger/Monitor extensions
 Author:		Ilias Alexopoulos
 Version:		2.01
 Last updated:	05-May-2010
 Target:		NA
 File:			dbgext.c

* Support E-mail:
* avrilos@ilialex.gr
* 
* History
* V2.00     28-Oct-2011     Initial AVRILOS Release
* V2.01     05-May-2011     Added FPGA Commands, User command is Explicit command to configure FPGA.
*
* license: See license.txt on root directory (CDDL)
*

* DESCRIPTION
* Debugger Monitor for AVR (compact)
* Extension functions for external peripherals
***************************************************************************/

#include "../includes/types.h"
#include "../includes/settings.h"

#include "../periphext/lcm_char.h"
#include "../Applic/fpgassi.h"
#include "../periphext/lpc.h"
#include "../periphext/sst.h"
#include "../periphext/xcs_cfg.h"

/*  user debugger command */
void f_Dbg_User_Cmd(void)
{
	f_CfgSPIFPGA();
}


/*
; When FPGA is not present or this type of communication
; with the FPGA is not valid place RET
; instead of real functions of Read/Write Regs
; through the interface
*/

void f_DebugFPGAWr(INT8U addr, INT8U data)
{
#ifdef MOD_FPGAXCS_SSI	
	f_FPGAWr(addr, data);
#endif
}

INT8U f_DebugFPGARd(INT8U addr)
{
#ifdef MOD_FPGAXCS_SSI		
	return f_FPGARd(addr);
#endif	
}

void f_DebugLCMWrCmd(INT8U data)
{
#ifdef MOD_LCMCHAR_ON
	lcd_outcmd(data);
#endif
}

void f_DebugLCMWrData(INT8U data)
{
#ifdef MOD_LCMCHAR_ON	
	lcd_outdata(data);
#endif
}

INT8U f_DebugLCMRd(INT8U addr)
{
#ifdef MOD_LCMCHAR_ON	
	return lcd_incmd();
#else
	return 0;
#endif
}

void f_DebugLPCWr(INT32U addr, INT8U data)
{
#ifdef MOD_LPC_ON
	f_LPC_Write(addr, data);
#else
#endif
}

void f_DebugSSTWr(INT32U addr, INT8U data)
{
#ifdef MOD_LPC_ON
	f_SSTWrite(addr, data);
#else
#endif
}

INT8U f_DebugLPCRd(INT32U addr)
{
#ifdef MOD_LPC_ON
	return f_LPC_Read(addr);
#else
	return 0;
#endif
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Systems Engineer AI ZeroCaliber Ltd
Cyprus Cyprus
More than 15 year of Embedded Systems development designing both hardware & software.
Experience with Product Development,lab prototypes and Automated Testers, Sensors, motors and System Engineering. Have used numerous micro-controllers/processors, DSP & FPGAs.

Please check AI ZeroCaliber if you need any help.
You may find also my personal site: Ilialex and my blog site: Ilialex Blog

Comments and Discussions