Specifications
Embedded System Tools Guide (EDK 6.2i) www.xilinx.com 335
UG111 (v1.4) January 30, 2004 1-800-255-7778
Example Systems
R
parameter C_HIGHADDR = 0xFFFF10ff
bus_interface SOPB = opb_bus
port Irq = interrupt
port Intr = timer1 & uart1
END
begin microblaze
parameter INSTANCE = mblaze
parameter HW_VER = 1.00.c
bus_interface DOPB = opb_bus
bus_interface DLMB = d_lmb
bus_interface ILMB = i_lmb
port INTERRUPT = interrupt
end
Example MSS File snippet
BEGIN DRIVER
parameter HW_INSTANCE = mytimer
parameter DRIVER_NAME = tmrctr
parameter DRIVER_VER = 1.00.b
parameter INT_HANDLER = timer_int_handler, INT_PORT = Interrupt
END
BEGIN DRIVER
parameter HW_INSTANCE = myuart
parameter DRIVER_NAME = uartlite
parameter DRIVER_VER = 1.00.b
END
Example C Program
#include <xtmrctr_l.h>
#include <xuartlite_l.h>
#include <xintc_l.h>
#include <xgpio_l.h>
#include <xparameters.h>
/* Global variables: count is the count displayed using the
* LEDs, and timer_count is the interrupt frequency.
*/
unsigned int count = 1; /* default count */
unsigned int timer_count = 1; /* default timer_count */
/* uartlite interrupt service routine */
void uart_int_handler(void *baseaddr_p) {
char c;
/* till uart FIFOs are empty */
while (!XUartLite_mIsReceiveEmpty(XPAR_MYUART_BASEADDR)) {
/* read a character */
c = XUartLite_RecvByte(XPAR_MYUART_BASEADDR);
/* if the character is between "0" and "9" */
if ((c>47) && (c<58)) {
timer_count = c-48;
/* print character on hyperterminal (STDOUT) */
putnum(timer_count);










