Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

can anybody help m to learn EDK

Status
Not open for further replies.

Nandhini.C

Newbie level 3
Joined
Feb 23, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
xil_printf

i can able to do only vry vry simple application as glowing led and reading key.
 

xuartlite_initialize

Hi,

Just see the attachment, which describes about EDK.

If you need more information, contact me,

Regards,

N. Muralidhara

CRL-BEL
 

xil_printf

I have a completed version of EDK training material from Xilinx Training (USD1000/course).

1) Embedded System Design
2) Advanced Embedded System Design.
- Hardcopy + Training Lab.


The EDK training material (hardcopy)/course may cost you USD 10. If you need it, please feel free to contact me.

Thanks.
 

xuartlite.h

muralicrl said:
Hi,
Just see the attachment, which describes about EDK.

Hi, thanks for your tip, but that attachment does only explain about going through the EDK-IDE, nothing it helps in how to programming....Most of the syntax remains much ambiguous and I'm confused at often....Well!, if you are experienced in programming, then could you give me some of the sample codes which I could use as a reference for my programming,so that I can learn by programming..The target soft processor is "MICROBLAZE".Sample programs like led interface,lcd interface,RS232,etc....Please if anybody has such codes, your sharing could help in million ways....Thanks....
 

blinking leds from edk

I've done this code for a Spartan3 1500 board from NuHorizons.. Its a simple project that uses GPLEDs and a UART. Hope this helps...

Code:
#include "stdio.h"
#include "xparameters.h"
#include "xgpio_l.h"
#include "xgpio.h"
#include "xstatus.h"
#include "xuartlite_l.h"
#include "xuartlite.h"

#define LED_DELAY 1000000
#define LED_ID   XPAR_LEDS_DEVICE_ID
#define UART_ID  XPAR_RS232_DEVICE_ID 

XStatus UartLiteSelfTestExample(Xuint16 DeviceId);
XUartLite xUART;

int main(void)
{

   XGpio gpLED;
   XGpio gpPB;
   XStatus Status;
   
   int i,j,k;
   volatile int Delay; 

   xil_printf("Welcome to the MicroBlaze Developement Kit.");
   xil_printf("\n\t\t\t\t\t This is a test application for GPIO.");
   xil_printf("\n\t\t\t\t\t\t This application blinks the LEDs alternatively.");
	
   // Initialise the peripherals
   XGpio_Initialize(&gpLED, LED_ID);//XPAR_LEDS_DEVICE_ID);
   
   // Set the LED peripheral to outputs
   XGpio_mSetDataDirection(&gpLED, 1, 0x00000000);
   
	
   //XGpio_DiscreteSet(&gpLED, 1, data);
	
	for (i = 0; i < 5; i++)
	 {
	 for(j = 0; j < 5; j++)
	  {
	   xil_printf("\n\t\t\t\t\t\t\t Inside FOR loop2.\t\t");
	   XGpio_DiscreteSet(&gpLED, 1, (int)0x000000AA);
	   for (Delay = 0; Delay < LED_DELAY; Delay++);
	   XGpio_DiscreteSet(&gpLED, 1, (int)0x000000FF);
	   for (Delay = 0; Delay < LED_DELAY; Delay++);
	   XGpio_DiscreteSet(&gpLED, 1, (int)0x00000055);	
	   for (Delay = 0; Delay < LED_DELAY; Delay++);
	   XGpio_DiscreteSet(&gpLED, 1, (int)0x000000FF);
	  }
	 xil_printf("\n\t\t\t\t\t\t Inside FOR loop1.\t");
    for (Delay = 0; Delay < LED_DELAY; Delay++);
	 }
    xil_printf("\n\t\t\t\t\t\t\t\t Now performing UART Self-Test...");
     /*
     * Run the UartLite self test example, specify the the Device ID that is
     * generated in xparameters.h
     */
    Status = UartLiteSelfTestExample(XPAR_RS232_DEVICE_ID); //XPAR_RS232_DEVICE_ID);
    xil_printf("\n\t\t\t\t\t\t\t\t Checking UART initialization status");
	 xil_printf("\n\t\t\t\t\t\t\t Status : %d",Status);
	  xil_printf("\n\t\t\t\t\t\t\t Status : %d",XST_SUCCESS);
	 xil_printf("\n\t\t\t\t\t\t\t\t\t UART Self-test Successful!");
	 if (Status != XST_SUCCESS)
    {
        return XST_FAILURE;
		  xil_printf("\nUART Self-test Failed!");
    }
    
	 return XST_SUCCESS;	 
}



// Function that performs a self-test on the UART

XStatus UartLiteSelfTestExample(Xuint16 DeviceId)
{
    XStatus Status;
    xil_printf("\n\t\t\t\t\t\t Entering UART Self-test function");
	  /*
     * Initialize the UartLite driver so that it is ready to use.
     */
	 xil_printf("\n\t\t\t\t\t\t Initializing UART");
    Status = XUartLite_Initialize(&xUART, DeviceId);
	 xil_printf("\n\t\t\t\t\t\t\t\t Initialized UART");
    xil_printf("\n\t\t\t\t\t\t\t\t\t UART Device ID:%d", DeviceId);
	 if (Status != XST_SUCCESS)
    {
        return XST_FAILURE;
		  xil_printf("\nFailed to initialize UART!!!");
    }

    /*
     * Perform a self-test to ensure that the hardware was built correctly.
     */
    Status = XUartLite_SelfTest(&xUART);
    if (Status != XST_SUCCESS)
    {
        return XST_FAILURE;
    }

    return XST_SUCCESS;
}
 

pouzivam edk xilinx

i went to know if i can use integrated processor to simulate algorthme on Xilinx FPGA
 

how to learn edk c code

Nandhini.C said:
i can able to do only vry vry simple application as glowing led and reading key.
hellow sir /mam
i am not able to interface lcd with spartan 3e board.i have just to learn the edk.i hv followed steps in lab3 tutorials of xilinx.its showing platgen failed with the errors.plz help me out.
 

xilinx edk uartlite device id

cj007 said:
I have a completed version of EDK training material from Xilinx Training (USD1000/course).

1) Embedded System Design
2) Advanced Embedded System Design.
- Hardcopy + Training Lab.


The EDK training material (hardcopy)/course may cost you USD 10. If you need it, please feel free to contact me.

Thanks.

Hi,

I am interested in training material. Can you please mail it to me at elecrom [a t] gmail [d o t] com
 

Re: xil_printf

can anyone say,how to do simple examples such as glowing of LEDs in EDK.
please give the details and materials regarding to it.

thanking you
rajendra
email: rajisvec@gmail.com
 

If you create a simple EDK project, it creates 2 SW projects for you, one for testing the memory and the other one "TestApp_Peripheral", there you can find everything you need on how to interface the HW.

XStatus GpioOutputExample(Xuint16 DeviceId, Xuint32 GpioWidth)
{
Xuint32 Data;
volatile int Delay;
Xuint32 LedBit;
Xuint32 LedLoop;
XStatus Status;

/* Initialize the GPIO driver so that it's ready to use,
* specify the device ID that is generated in xparameters.h
*/
Status = XGpio_Initialize(&GpioOutput, DeviceId);
if (Status != XST_SUCCESS)
{
return XST_FAILURE;
}
/* Set the direction for all signals to be outputs
*/
XGpio_SetDataDirection(&GpioOutput, LED_CHANNEL, 0x0);

/* Set the GPIO outputs to low
*/
XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL, 0x0);

for (LedBit = 0x0; LedBit < GpioWidth; LedBit++)
{
for (LedLoop = 0; LedLoop < LED_MAX_BLINK; LedLoop++)
{
/* Set the GPIO Output to High
*/
XGpio_DiscreteWrite(&GpioOutput, LED_CHANNEL, 1 << LedBit);

#ifndef __SIM__
/*
* Wait a small amount of time so the LED is visible
*/
for (Delay = 0; Delay < LED_DELAY; Delay++);

#endif
/* Read the state of the data so that it can be verified
*/
/* Data = XGpio_DiscreteRead(&GpioOutput, LED_CHANNEL); */


/* If the data read back is not the same as the data
* written then return FAILURE
*/
/*if (Data != (1 << LedBit))
{
return XST_FAILURE;
}*/


/* Clear the GPIO Output
*/
XGpio_DiscreteClear(&GpioOutput, LED_CHANNEL, 1 << LedBit);


/* Read the state of the data so that it can be verified
*/
/* Data = XGpio_DiscreteRead(&GpioOutput, LED_CHANNEL);*/
/* If the data read back is not the same as the data
* written then return FAILURE
*/
/* if (Data & ( 1 << LedBit))
{
return XST_FAILURE;
}*/
#ifndef __SIM__
/*
* Wait a small amount of time so the LED is visible
*/
for (Delay = 0; Delay < LED_DELAY; Delay++);
#endif
}
}
return XST_SUCCESS;
}
 

Re: xil_printf

rajisvec said:
can anyone say,how to do simple examples such as glowing of LEDs in EDK.
please give the details and materials regarding to it.
LED coding in EDK is much easy. I can give that. But much of the hidden registers are unknown. For example to read a data from a port, you can use "mgetdatareg(DIP_SWITCH_base_address,2,1)....". There is another syntax "mread_data_reg". But I don't really know what is the difference between these two...The meaning for the syntax has not been described anywhere.I just had to learn it myself...That is the problem. You must know what are the syntax available for using the appropriate peripheral. I have only few sample coding which restricts my usage at all cost..Some expert could help us.
 

Re: xil_printf

cj007 said:
I have a completed version of EDK training material from Xilinx Training (USD1000/course).

1) Embedded System Design
2) Advanced Embedded System Design.
- Hardcopy + Training Lab.


The EDK training material (hardcopy)/course may cost you USD 10. If you need it, please feel free to contact me.

Thanks.

hi,

i have 4 bit counter. i want to add it to Microblaze processor. Then, through software i want to write initial value from where up counting has to start. While counting happens i want to read the value again through software. Is this possible?

Can anyone provide relevant material ? it would be really helpful.

Thanks in advance
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top