Site Home Archive Home FAQ Home How to search the Archive How to Navigate the Archive
Compare FPGA features and resources
Threads starting:
Authors:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
On Nov 24, 3:17=A0pm, none <n...@none.com> wrote: > Anyone know what kind of latitude you have for the input frequency of > the IDELAYCTRL primitive? I'm looking at implementing a LVDS link with a > 2:1 DDR (so 4:1) at 156.25MHz. =A0From xapp860 it looks like 200MHz works= , > but I'd rather use a DCM to generate the value from the 156.25MHz > instead of bringing in a 200MHz clock signal from the outside. > > Thanks > > Ron The Virtex 5 Users Guide says "The tap delay resolution is varied by selecting an IDELAYCTRL reference clock from the range specified in the Virtex-5 FPGA Data Sheet. Then the DC and Switching characteristics datasheet lists the refclk range as 200 MHz +/- 10 MHz. It's hard to believe the lock range is that small though.Article: 136601
> Are you nym-shifting? I just change my mind while creating my profile. It seems that there is some the alias update had a latency of some minutes. In any case I am very interested in knowing your opinions about FMC, and specially in its use with low cost FPGAs. Cheers pabloArticle: 136602
David Brown wrote: > Have you looked at MyHDL (www.myhdl.org) ? Yes, it is a big step in the right direction. Just the thing cover math with generated verilog code. > You might be able to get > python test code and vhdl/verilog generation from the same source. Last I looked, vhdl output has some assembly required. -- Mike TreselerArticle: 136603
I am trying to use a timer for regular interrupt in microblaze. I am using edk 9.2i and spartan 3a dsp 1800a. Even following a simple lab example widely used by beginners didn't work: http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf I have connected all the interrupt ports correctly as evident from the following portion of the mhs file: BEGIN microblaze PARAMETER HW_VER = 7.00.a ........... ........... PORT INTERRUPT = interrupt END BEGIN xps_timer PARAMETER INSTANCE = delay PARAMETER HW_VER = 1.00.a PARAMETER C_ONE_TIMER_ONLY = 1 PARAMETER C_BASEADDR = 0x8141c200 PARAMETER C_HIGHADDR = 0x8141c3ff BUS_INTERFACE SPLB = mb_plb PORT Interrupt = timer1 PORT CaptureTrig0 = net_gnd END BEGIN xps_intc PARAMETER INSTANCE = xps_intc_0 PARAMETER HW_VER = 1.00.a PARAMETER C_BASEADDR = 0x81418000 PARAMETER C_HIGHADDR = 0x814181ff BUS_INTERFACE SPLB = mb_plb PORT Irq = interrupt PORT Intr = timer1 END Now for the software settings since I am using edk 9.2i, it does not have option for registering our interrupt handler in software platform settings window (which is what the lab suggests), I used the microblaze_register_handler(...) function ( I took me 3 days to figure out this), but I still don't get how it works differently from the function XIntc_RegisterHandler. The portion of C file is as follows: void timer_int_handler(void * baseaddr_p) { /* Add variable declarations here */ unsigned int csr; /* Read timer 0 CSR to see if it raised the interrupt */ csr = XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADDR,0); /* If the interrupt occurred, then increment a counter */ /* and set one_second_flag to 1 */ if (csr & XTC_CSR_INT_OCCURED_MASK ) { count ++; one_second_flag = 1; } /* Display the count on the LEDs */ XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); /* Print the count using the UART*/ xil_printf("count value is: %x\n\r", count); /* Clear the timer interrupt */ XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr); } int main() { int count_mod_3; //registering an interrupt handler microblaze_register_handler((XInterruptHandler) timer_int_handler, (void *)0); /* Register the Timer interrupt handler in the vector table */ XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, XPAR_XPS_INTC_0_DELAY_INTERRUPT_INTR, (XInterruptHandler) timer_int_handler, (void *)XPAR_DELAY_BASEADDR); /* Enable MicroBlaze Interrupts */ microblaze_enable_interrupts(); /* Initialize and set the direction of the GPIO connected to LEDs */ XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); XGpio_SetDataDirection(&gpio,LEDChan, 0); /* Start the interrupt controller */ XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); /* Set the gpio as output on high 8 bits (LEDs)*/ XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); xil_printf("The value of count = %d\n\r", count); /* Set the number of cycles the timer counts before interrupting */ XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, (timer_count*timer_count) * 50000000); /* Reset the timers, and clear interrupts */ XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); /* Enable timer interrupts in the interrupt controller */ XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MASK); /* Start the timers */ XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK); /* Wait for interrupts to occur */ while(1) { if(one_second_flag){ count_mod_3 = count % 3; if(count_mod_3 == 0) xil_printf("Interrupt taken at %d seconds \n\r",count); one_second_flag=0; xil_printf("."); } } } When I run the system, the value of count does not change from 1. What could be the problem?Article: 136604
On 24 Nov., 08:18, raj <rajesh.o...@gmail.com> wrote: > I need to know the equivalent actel smartgen RAM of the above > distributed dual port RAM with asynchronous read ..I tried smartgen's > two port and dual port RAM both are not equivalent.. > > Can u pls suggest the change i need to do in two port and dual port > RAM of ACTEL to achieve the Distributed Dual port RAM with > asynchronous read...Do Actel has RAM with asynchronous read?Is it > possible? Yes, just have a look at http://www.actel.com/documents/pa_libguide_ug.pdf http://www.actel.com/documents/pa_libguide_ug.pdf http://www.actel.com/documents/libguide_ug.pdf. Maybe you should be aware that actel is a vendor with several technologies. bye ThomasArticle: 136605
Hi! I wonder, whether "one_second_flag" is declared as volatile? If not, the compiler optimizes your if-statement in the while(1) loop away. You can check this by using mb-objdump. Cheers, Matthias bish schrieb: > I am trying to use a timer for regular interrupt in microblaze. I am > using edk 9.2i and spartan 3a dsp 1800a. > Even following a simple lab example widely used by beginners didn't > work: http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf > > I have connected all the interrupt ports correctly as evident from the > following portion of the mhs file: > BEGIN microblaze > PARAMETER HW_VER = 7.00.a > ........... > ........... > PORT INTERRUPT = interrupt > END > > BEGIN xps_timer > PARAMETER INSTANCE = delay > PARAMETER HW_VER = 1.00.a > PARAMETER C_ONE_TIMER_ONLY = 1 > PARAMETER C_BASEADDR = 0x8141c200 > PARAMETER C_HIGHADDR = 0x8141c3ff > BUS_INTERFACE SPLB = mb_plb > PORT Interrupt = timer1 > PORT CaptureTrig0 = net_gnd > END > > BEGIN xps_intc > PARAMETER INSTANCE = xps_intc_0 > PARAMETER HW_VER = 1.00.a > PARAMETER C_BASEADDR = 0x81418000 > PARAMETER C_HIGHADDR = 0x814181ff > BUS_INTERFACE SPLB = mb_plb > PORT Irq = interrupt > PORT Intr = timer1 > END > > > Now for the software settings since I am using edk 9.2i, it does not > have option for registering our interrupt handler in software platform > settings window (which is what the lab suggests), I used the > microblaze_register_handler(...) function ( I took me 3 days to figure > out this), but I still don't get how it works differently from the > function XIntc_RegisterHandler. > The portion of C file is as follows: > void timer_int_handler(void * baseaddr_p) { > /* Add variable declarations here */ > unsigned int csr; > /* Read timer 0 CSR to see if it raised the interrupt */ > csr = XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADDR,0); > /* If the interrupt occurred, then increment a counter */ > /* and set one_second_flag to 1 */ > if (csr & XTC_CSR_INT_OCCURED_MASK ) { > count ++; > one_second_flag = 1; > } > > /* Display the count on the LEDs */ > XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); > > /* Print the count using the UART*/ > xil_printf("count value is: %x\n\r", count); > /* Clear the timer interrupt */ > XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr); > } > > int main() { > > int count_mod_3; > > //registering an interrupt handler > microblaze_register_handler((XInterruptHandler) timer_int_handler, > (void *)0); > > /* Register the Timer interrupt handler in the vector table */ > XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, > XPAR_XPS_INTC_0_DELAY_INTERRUPT_INTR, > (XInterruptHandler) timer_int_handler, > (void *)XPAR_DELAY_BASEADDR); > /* Enable MicroBlaze Interrupts */ > microblaze_enable_interrupts(); > > > /* Initialize and set the direction of the GPIO connected to LEDs */ > XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); > XGpio_SetDataDirection(&gpio,LEDChan, 0); > > /* Start the interrupt controller */ > XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); > XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); > > /* Set the gpio as output on high 8 bits (LEDs)*/ > XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); > xil_printf("The value of count = %d\n\r", count); > > /* Set the number of cycles the timer counts before interrupting */ > XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, > (timer_count*timer_count) * 50000000); > > /* Reset the timers, and clear interrupts */ > XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); > > /* Enable timer interrupts in the interrupt controller */ > XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MASK); > > /* Start the timers */ > XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | > XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK); > > /* Wait for interrupts to occur */ > while(1) { > if(one_second_flag){ > count_mod_3 = count % 3; > if(count_mod_3 == 0) > xil_printf("Interrupt taken at %d seconds \n\r",count); > one_second_flag=0; > xil_printf("."); > } > } > } > > When I run the system, the value of count does not change from 1. What > could be the problem? >Article: 136606
On 24 Nov, 18:35, "Michael Brown" <s...@signature.below> wrote: > Rob Gaddi wrote: > > On Sat, 22 Nov 2008 14:57:52 +0100 > > Lorenz Kolb <lorenz.k...@uni-ulm.de> wrote: > [...] > >> Well it's not a student-board, though in terms of cost (compared to > >> typical costs) Avnet has a Virtex-5FXT Evaluation board for "only" 395 > >> $. > [...] > > Really?? =A0From the last time I price checked any of the V5s, at that > > price you could buy the eval boards, desolder, reball, and still turn a > > profit. > > Amazingly, it's true:http://www.em.avnet.com/evk/home/0,4534,CID%253D4647= 1%2526CCD%253DUSA... > They'll even knock off another buck if you order more than 100 of them :)= If > the URL doesn't work, it's part number AES-V5FXT-EVL30-G. The FPGA is an > XC5VFX30T-1FFG665, which Avnet sells at $500 a pop. I'm not sure if this = one > is supported by Webpack, though (I know only a small number of Virtex > devices are supported, but I can't find a list anywhere), so you may also > need to spend another ~2.5 kilobucks to get Foundation. > > If I'd found this one when I was shopping (ended up with the Spartan 3E > Starter Kit) it'd have been very tempting. Of course, now that the > Australian dollar has tanked, it's a little more than I'd like to spend, = but > for those getting paid in greenbacks I'd say it's a killer deal. > > -- > Michael Brown > Add michael@ to emboss.co.nz ---+--- My inbox is always open Webpack support list - http://www.xilinx.com/ise/products/webpack_config.ht= m shows that it supports the XC5VFX30T. John Adair Enterpoint Ltd.Article: 136607
On Nov 24, 11:34=A0am, palvarez <pabloalvarezsanc...@gmail.com> wrote: > Hi, > > Have you had a look at the new FMC standard (VITA 57)? It looks > extremely promising as nowadays many designs are based on a simple > FPGA with variations on the front pannel. =A0Sofar I have only seen FMC > developments for high perfomance plataforms based on Virtex5, but I > feel that a great benefit would appear when using a flexible low > budget carrier with flexible low cost front pannels. > > Check this article for quick intro to VITA 57 > > http://www.vmecritical.com/articles/id/?3575 > > What do you think? > > Cheers > > pablo Well the article doesn't go too deeply into the standard, but the basic idea makes sense. Many manufacturers already have proprietary mezzanine cards for doing exactly this. At Alacron, we use both standard and proprietary mezzanines. For example we use the "user defined" fourth connector of PMC to connect directly to our FPGA on the base card. Some of our add-on "PMC" modules don't have the PCI bus at all and just use this fourth connector. On some of our newer boards we have proprietary mezzanines using high-speed connectors to add various font-end interfaces like analog VGA input or Camera Link. I imagine using a standard for these front-end cards would allow us to add third-party modules to quickly add more front-end interfaces. Of course this all depends on the details, which are not in the article. Regards, GaborArticle: 136608
On Nov 25, 12:25=A0pm, Matthias Alles <REMOVEallesCAPIT...@NOeit.SPAMuni- kl.de> wrote: > Hi! > > I wonder, whether "one_second_flag" is declared as volatile? If not, the > compiler optimizes your if-statement in the while(1) loop away. You can > check this by using mb-objdump. I tried using the volatile for one_second_flag, still it does not work. It just prints "the value of count =3D 1" once in terminal and nothing happens then. > > Cheers, > Matthias > > bish schrieb: > > > > > I am trying to use a timer for regular interrupt in microblaze. I am > > using edk 9.2i and spartan 3a dsp 1800a. > > Even following a simple lab example widely used by beginners didn't > > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf > > > I have connected all the interrupt ports correctly as evident from the > > following portion of the mhs file: > > BEGIN microblaze > > =A0PARAMETER HW_VER =3D 7.00.a > > ........... > > ........... > > PORT INTERRUPT =3D interrupt > > END > > > BEGIN xps_timer > > =A0PARAMETER INSTANCE =3D delay > > =A0PARAMETER HW_VER =3D 1.00.a > > =A0PARAMETER C_ONE_TIMER_ONLY =3D 1 > > =A0PARAMETER C_BASEADDR =3D 0x8141c200 > > =A0PARAMETER C_HIGHADDR =3D 0x8141c3ff > > =A0BUS_INTERFACE SPLB =3D mb_plb > > =A0PORT Interrupt =3D timer1 > > =A0PORT CaptureTrig0 =3D net_gnd > > END > > > BEGIN xps_intc > > =A0PARAMETER INSTANCE =3D xps_intc_0 > > =A0PARAMETER HW_VER =3D 1.00.a > > =A0PARAMETER C_BASEADDR =3D 0x81418000 > > =A0PARAMETER C_HIGHADDR =3D 0x814181ff > > =A0BUS_INTERFACE SPLB =3D mb_plb > > =A0PORT Irq =3D interrupt > > =A0PORT Intr =3D timer1 > > END > > > Now for the software settings since I am using edk 9.2i, it does not > > have option for registering our interrupt handler in software platform > > settings window (which is what the lab suggests), I used the > > microblaze_register_handler(...) function ( I took me 3 days to figure > > out this), =A0but I still don't get how it works differently from the > > function XIntc_RegisterHandler. > > The portion of C file is as follows: > > void timer_int_handler(void * baseaddr_p) { > > =A0 =A0 /* Add variable declarations here */ > > =A0 =A0unsigned int csr; > > =A0 =A0/* Read timer 0 CSR to see if it raised the interrupt */ > > =A0 =A0csr =3D XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADDR,0); > > =A0 =A0/* If the interrupt occurred, then increment a counter */ > > =A0 =A0/* and set one_second_flag to 1 */ > > =A0 =A0if (csr & XTC_CSR_INT_OCCURED_MASK ) { > > =A0 =A0 =A0 =A0 =A0 =A0count ++; > > =A0 =A0 =A0 =A0 =A0 =A0one_second_flag =3D 1; > > =A0 =A0} > > > =A0 =A0/* Display the count on the LEDs */ > > =A0 =A0XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); > > > =A0 =A0/* Print the count using the UART*/ > > =A0 =A0xil_printf("count value is: %x\n\r", count); > > =A0 =A0/* Clear the timer interrupt */ > > =A0 =A0XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr); > > } > > > int main() { > > > =A0 int count_mod_3; > > > =A0 //registering an interrupt handler > > =A0 microblaze_register_handler((XInterruptHandler) timer_int_handler, > > (void *)0); > > > =A0 /* Register the Timer interrupt handler in the vector table */ > > =A0 XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0XPAR_XPS_INT= C_0_DELAY_INTERRUPT_INTR, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(XInterruptH= andler) timer_int_handler, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void *)XPAR= _DELAY_BASEADDR); > > =A0 /* Enable MicroBlaze Interrupts */ > > =A0 microblaze_enable_interrupts(); > > > =A0 /* Initialize and set the direction of the GPIO connected to LEDs *= / > > =A0 XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); > > =A0 XGpio_SetDataDirection(&gpio,LEDChan, 0); > > > =A0 /* Start the interrupt controller */ > > =A0 XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); > > =A0 XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); > > > =A0 /* Set the gpio as output on high 8 bits (LEDs)*/ > > =A0 XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); > > =A0 xil_printf("The value of count =3D %d\n\r", count); > > > =A0 /* Set the number of cycles the timer counts before interrupting */ > > =A0 XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, > > (timer_count*timer_count) * 50000000); > > > =A0 /* Reset the timers, and clear interrupts */ > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); > > > =A0 /* Enable timer interrupts in the interrupt controller */ > > =A0 XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MASK); > > > =A0 /* Start the timers */ > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK); > > > =A0 /* Wait for interrupts to occur */ > > =A0 while(1) { > > =A0 =A0if(one_second_flag){ > > =A0 =A0 =A0 =A0 =A0 =A0count_mod_3 =3D count % 3; > > =A0 =A0 =A0 =A0 =A0 =A0if(count_mod_3 =3D=3D 0) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0xil_printf("Interrupt taken at %= d seconds \n\r",count); > > =A0 =A0 =A0 =A0 =A0 =A0one_second_flag=3D0; > > =A0 =A0 =A0 =A0 =A0 =A0xil_printf("."); > > =A0 =A0 =A0 =A0 =A0 =A0} > > =A0 =A0} > > } > > > When I run the system, the value of count does not change from 1. What > > could be the problem?- Hide quoted text - > > - Show quoted text -Article: 136609
raj wrote: > Can u pls suggest the change i need to do in two port and dual port > RAM of ACTEL to achieve the Distributed Dual port RAM with > asynchronous read...Do Actel has RAM with asynchronous read?Is it > possible? www.actel.com/documents/hdlcode_ug.pdf pg 95 says that smartgen RAM cannot be inferred from code. Either instance the rams or change brands. -- Mike TreselerArticle: 136610
"Mike Treseler" <mtreseler@gmail.com> wrote in message news:492C27FC.7080904@gmail.com... > raj wrote: > >> Can u pls suggest the change i need to do in two port and dual port >> RAM of ACTEL to achieve the Distributed Dual port RAM with >> asynchronous read...Do Actel has RAM with asynchronous read?Is it >> possible? > > www.actel.com/documents/hdlcode_ug.pdf pg 95 > says that smartgen RAM cannot be inferred from code. > I suspect the documentation was written during the Actmap days and never updated since ;-) Hans. www.ht-lab.com > Either instance the rams or change brands. > > -- Mike TreselerArticle: 136611
There is a 9.2 MicroBlaze Timer Interrupt example done by Avnet at www.em.avnet.com/virtex4lx-sx-mb-dev, then click Support Files & Downloads. Bryan On Nov 24, 7:19=A0pm, bish <bishes...@gmail.com> wrote: > I am trying to use a timer for regular interrupt in microblaze. I am > using edk 9.2i and spartan 3a dsp 1800a. > Even following a simple lab example widely used by beginners didn't > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf > > I have connected all the interrupt ports correctly as evident from the > following portion of the mhs file: > BEGIN microblaze > =A0PARAMETER HW_VER =3D 7.00.a > ........... > ........... > PORT INTERRUPT =3D interrupt > END > > BEGIN xps_timer > =A0PARAMETER INSTANCE =3D delay > =A0PARAMETER HW_VER =3D 1.00.a > =A0PARAMETER C_ONE_TIMER_ONLY =3D 1 > =A0PARAMETER C_BASEADDR =3D 0x8141c200 > =A0PARAMETER C_HIGHADDR =3D 0x8141c3ff > =A0BUS_INTERFACE SPLB =3D mb_plb > =A0PORT Interrupt =3D timer1 > =A0PORT CaptureTrig0 =3D net_gnd > END > > BEGIN xps_intc > =A0PARAMETER INSTANCE =3D xps_intc_0 > =A0PARAMETER HW_VER =3D 1.00.a > =A0PARAMETER C_BASEADDR =3D 0x81418000 > =A0PARAMETER C_HIGHADDR =3D 0x814181ff > =A0BUS_INTERFACE SPLB =3D mb_plb > =A0PORT Irq =3D interrupt > =A0PORT Intr =3D timer1 > END > > Now for the software settings since I am using edk 9.2i, it does not > have option for registering our interrupt handler in software platform > settings window (which is what the lab suggests), I used the > microblaze_register_handler(...) function ( I took me 3 days to figure > out this), =A0but I still don't get how it works differently from the > function XIntc_RegisterHandler. > The portion of C file is as follows: > void timer_int_handler(void * baseaddr_p) { > =A0 =A0 /* Add variable declarations here */ > =A0 =A0 =A0 =A0 unsigned int csr; > =A0 =A0 =A0 =A0 /* Read timer 0 CSR to see if it raised the interrupt */ > =A0 =A0 =A0 =A0 csr =3D XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADDR,= 0); > =A0 =A0 =A0 =A0 /* If the interrupt occurred, then increment a counter */ > =A0 =A0 =A0 =A0 /* and set one_second_flag to 1 */ > =A0 =A0 =A0 =A0 if (csr & XTC_CSR_INT_OCCURED_MASK ) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 count ++; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 one_second_flag =3D 1; > =A0 =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0 /* Display the count on the LEDs */ > =A0 =A0 =A0 =A0 XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); > > =A0 =A0 =A0 =A0 /* Print the count using the UART*/ > =A0 =A0 =A0 =A0 xil_printf("count value is: %x\n\r", count); > =A0 =A0 =A0 =A0 /* Clear the timer interrupt */ > =A0 =A0 =A0 =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr); > > } > > int main() { > > =A0 int count_mod_3; > > =A0 //registering an interrupt handler > =A0 microblaze_register_handler((XInterruptHandler) timer_int_handler, > (void *)0); > > =A0 /* Register the Timer interrupt handler in the vector table */ > =A0 XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0XPAR_XPS_INTC_= 0_DELAY_INTERRUPT_INTR, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(XInterruptHan= dler) timer_int_handler, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void *)XPAR_D= ELAY_BASEADDR); > =A0 /* Enable MicroBlaze Interrupts */ > =A0 microblaze_enable_interrupts(); > > =A0 /* Initialize and set the direction of the GPIO connected to LEDs */ > =A0 XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); > =A0 XGpio_SetDataDirection(&gpio,LEDChan, 0); > > =A0 /* Start the interrupt controller */ > =A0 XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); > =A0 XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); > > =A0 /* Set the gpio as output on high 8 bits (LEDs)*/ > =A0 XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); > =A0 xil_printf("The value of count =3D %d\n\r", count); > > =A0 /* Set the number of cycles the timer counts before interrupting */ > =A0 XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, > (timer_count*timer_count) * 50000000); > > =A0 /* Reset the timers, and clear interrupts */ > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); > > =A0 /* Enable timer interrupts in the interrupt controller */ > =A0 XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MASK); > > =A0 /* Start the timers */ > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK)= ; > > =A0 /* Wait for interrupts to occur */ > =A0 while(1) { > =A0 =A0 =A0 =A0 if(one_second_flag){ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 count_mod_3 =3D count % 3; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if(count_mod_3 =3D=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xil_printf("Interrupt tak= en at %d seconds \n\r",count); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 one_second_flag=3D0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xil_printf("."); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0 } > > } > > When I run the system, the value of count does not change from 1. What > could be the problem?Article: 136612
Good Morning, I need to de-serialize a camlink LVDS stream because my FPGA doesnt have enough pins to accept parallel from a DS90288 etc. and am looking for a push in the right direction in where to start. I realise i need to set the constraints file such that the pins are set for LVDS input, but I have no experience with constraints files, so a quick run-down or resource would be great. I think I can handle the rest wrt locking the 7x clock and decoding. Any samples or resources (particularly pertaining to how UCF files work) would be great. PS: I use Xilinx 9.2i and VHDL GintsArticle: 136613
On Nov 26, 2:37=A0am, bish <bishes...@gmail.com> wrote: > On Nov 25, 12:25=A0pm, Matthias Alles <REMOVEallesCAPIT...@NOeit.SPAMuni- > > kl.de> wrote: > > Hi! > > > I wonder, whether "one_second_flag" is declared as volatile? If not, th= e > > compiler optimizes your if-statement in the while(1) loop away. You can > > check this by using mb-objdump. > > I tried using the volatile for one_second_flag, still it does not > work. It just prints "the value of count =3D 1" once in terminal and > nothing happens then. > > > > > Cheers, > > Matthias > > > bish schrieb: > > > > I am trying to use a timer for regular interrupt in microblaze. I am > > > using edk 9.2i and spartan 3a dsp 1800a. > > > Even following a simple lab example widely used by beginners didn't > > > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf > > > > I have connected all the interrupt ports correctly as evident from th= e > > > following portion of the mhs file: > > > BEGIN microblaze > > > =A0PARAMETER HW_VER =3D 7.00.a > > > ........... > > > ........... > > > PORT INTERRUPT =3D interrupt > > > END > > > > BEGIN xps_timer > > > =A0PARAMETER INSTANCE =3D delay > > > =A0PARAMETER HW_VER =3D 1.00.a > > > =A0PARAMETER C_ONE_TIMER_ONLY =3D 1 > > > =A0PARAMETER C_BASEADDR =3D 0x8141c200 > > > =A0PARAMETER C_HIGHADDR =3D 0x8141c3ff > > > =A0BUS_INTERFACE SPLB =3D mb_plb > > > =A0PORT Interrupt =3D timer1 > > > =A0PORT CaptureTrig0 =3D net_gnd > > > END > > > > BEGIN xps_intc > > > =A0PARAMETER INSTANCE =3D xps_intc_0 > > > =A0PARAMETER HW_VER =3D 1.00.a > > > =A0PARAMETER C_BASEADDR =3D 0x81418000 > > > =A0PARAMETER C_HIGHADDR =3D 0x814181ff > > > =A0BUS_INTERFACE SPLB =3D mb_plb > > > =A0PORT Irq =3D interrupt > > > =A0PORT Intr =3D timer1 > > > END > > > > Now for the software settings since I am using edk 9.2i, it does not > > > have option for registering our interrupt handler in software platfor= m > > > settings window (which is what the lab suggests), I used the > > > microblaze_register_handler(...) function ( I took me 3 days to figur= e > > > out this), =A0but I still don't get how it works differently from the > > > function XIntc_RegisterHandler. > > > The portion of C file is as follows: > > > void timer_int_handler(void * baseaddr_p) { > > > =A0 =A0 /* Add variable declarations here */ > > > =A0 =A0unsigned int csr; > > > =A0 =A0/* Read timer 0 CSR to see if it raised the interrupt */ > > > =A0 =A0csr =3D XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADDR,0); > > > =A0 =A0/* If the interrupt occurred, then increment a counter */ > > > =A0 =A0/* and set one_second_flag to 1 */ > > > =A0 =A0if (csr & XTC_CSR_INT_OCCURED_MASK ) { > > > =A0 =A0 =A0 =A0 =A0 =A0count ++; > > > =A0 =A0 =A0 =A0 =A0 =A0one_second_flag =3D 1; > > > =A0 =A0} > > > > =A0 =A0/* Display the count on the LEDs */ > > > =A0 =A0XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); > > > > =A0 =A0/* Print the count using the UART*/ > > > =A0 =A0xil_printf("count value is: %x\n\r", count); > > > =A0 =A0/* Clear the timer interrupt */ > > > =A0 =A0XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr); > > > } > > > > int main() { > > > > =A0 int count_mod_3; > > > > =A0 //registering an interrupt handler > > > =A0 microblaze_register_handler((XInterruptHandler) timer_int_handler= , > > > (void *)0); > > > > =A0 /* Register the Timer interrupt handler in the vector table */ > > > =A0 XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0XPAR_XPS_I= NTC_0_DELAY_INTERRUPT_INTR, > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(XInterrup= tHandler) timer_int_handler, > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void *)XP= AR_DELAY_BASEADDR); > > > =A0 /* Enable MicroBlaze Interrupts */ > > > =A0 microblaze_enable_interrupts(); > > > > =A0 /* Initialize and set the direction of the GPIO connected to LEDs= */ > > > =A0 XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); > > > =A0 XGpio_SetDataDirection(&gpio,LEDChan, 0); > > > > =A0 /* Start the interrupt controller */ > > > =A0 XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); > > > =A0 XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); > > > > =A0 /* Set the gpio as output on high 8 bits (LEDs)*/ > > > =A0 XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); > > > =A0 xil_printf("The value of count =3D %d\n\r", count); > > > > =A0 /* Set the number of cycles the timer counts before interrupting = */ > > > =A0 XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, > > > (timer_count*timer_count) * 50000000); > > > > =A0 /* Reset the timers, and clear interrupts */ > > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > > XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); > > > > =A0 /* Enable timer interrupts in the interrupt controller */ > > > =A0 XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MASK)= ; > > > > =A0 /* Start the timers */ > > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > > XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK); > > > > =A0 /* Wait for interrupts to occur */ > > > =A0 while(1) { > > > =A0 =A0if(one_second_flag){ > > > =A0 =A0 =A0 =A0 =A0 =A0count_mod_3 =3D count % 3; > > > =A0 =A0 =A0 =A0 =A0 =A0if(count_mod_3 =3D=3D 0) > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0xil_printf("Interrupt taken at= %d seconds \n\r",count); > > > =A0 =A0 =A0 =A0 =A0 =A0one_second_flag=3D0; > > > =A0 =A0 =A0 =A0 =A0 =A0xil_printf("."); > > > =A0 =A0 =A0 =A0 =A0 =A0} > > > =A0 =A0} > > > } > > > > When I run the system, the value of count does not change from 1. Wha= t > > > could be the problem?- Hide quoted text - > > > - Show quoted text - Hello, Here is how I set up a timer interrupt in 9.2: void TimerCounterHandler(void *CallBackRef) { print("timer interrupt "); } Int main (void) { XIntc intr_ctrl; XTmrCtr timr; XIntc_Initialize(&intr_ctrl,XPAR_XPS_INTC_0_DEVICE_ID); XTmrCtr_Initialize(&timr,XPAR_XPS_TIMER_1_DEVICE_ID); XIntc_Connect(&intr_ctrl, XPAR_XPS_INTC_0_XPS_TIMER_1_INTERRUPT_INTR, (XInterruptHandler) XTmrCtr_InterruptHandler, (void *)&timr); XIntc_Start(&intr_ctrl, XIN_REAL_MODE); XIntc_Enable(&intr_ctrl, XPAR_XPS_INTC_0_XPS_TIMER_1_INTERRUPT_INTR); XTmrCtr_SetHandler(&timr, (void *)TimerCounterHandler, void); XTmrCtr_SetOptions(&timr, 0, XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION); XTmrCtr_SetResetValue(&timr, 0, 0xF0000000); XTmrCtr_Start(&timr,0); microblaze_enable_interrupts(); while(1){ //wait for interrupts } } If you are using the Intc component, you no longer need to use the microblaze_register_handler function - instead use the XIntc_Connect() function. The XTmrCtr driver provides its own interrupt handler XTmrCtr_InterruptHandler() which you should use to service the interrupt. It will issue a callback to a function of your choice (set with XTmrCtr_SetHandler) Hope this helps, DavidArticle: 136614
Hi Gints, there's a xapp for LVDS serializers and deserializers that work for CameraLink Interfaces. For The UCF flie have a look into the Constraints Guide of the Xilinx Documentation. A LVDS Example Application can be downloaded from http://www.xilinx.com/products/devkits/HW-SPAR3E-DISP-DK-UNI-G.htm Look under the ressources tab. There are the files. Have a nice synthesis Eilert reganireland@gmail.com schrieb: > Good Morning, > > I need to de-serialize a camlink LVDS stream because my FPGA doesnt > have enough pins to accept parallel from a DS90288 etc. and am looking > for a push in the right direction in where to start. > > I realise i need to set the constraints file such that the pins are > set for LVDS input, but I have no experience with constraints files, > so a quick run-down or resource would be great. I think I can handle > the rest wrt locking the 7x clock and decoding. > > Any samples or resources (particularly pertaining to how UCF files > work) would be great. > > PS: I use Xilinx 9.2i and VHDL > > GintsArticle: 136615
On Nov 26, 3:29=A0am, Bryan <bryan.fletc...@avnet.com> wrote: > There is a 9.2 MicroBlaze Timer Interrupt example done by Avnet atwww.em.= avnet.com/virtex4lx-sx-mb-dev, then click Support Files & > Downloads. > I downloaded V4MB_SX35_interrupt_Design_Rev2_Rev3 example design, it had used two timers, so I commented out the second timer relevant codes and used only a single timer from its system.c file, still the problem is the interrupt handler seems never to be called. I am trying to use a single timer for interrupt and this is the only device to generate an interrupt. Is it possible that the XPS Interrupt Controller when used must need more than one interrupt inputs?? Because I still cannot figure out what the problem is, I have tried quite a few other examples too. Another one I used from other example design has: And this is also not working!!! Can anybody check the following out in edk 9.2: using ONLY ONE TIMER (from XPS_TIMER) and XPS interrupt controller??? Using the code given below:: // Driver instances //static XGpio myGpio; static XTmrCtr myTimer; static XIntc myIntc; // Timer ISR: void timer_a_int_handler(void *CallBackRef/*, Xuint8 TmrCtrNumber*/) { //if (TmrCtrNumber=3D=3D0) { xil_printf("In timer interrupt handler... waiting for 3 seconds\r\n"); //usleep(3000000); xil_printf("Leaving timer interrupt handler ...\r\n"); //} //Clear the interrupt XIntc_Acknowledge (&myIntc,XPAR_XPS_INTC_0_XPS_TIMER_0_INTERRUPT_INTR); } // Main: this is the function that is executed at the start of the program. int main(){ //********************** 1. Device initialization and configuration ************************* xil_printf("Setting up peripherals...\r\n"); //Initialize and configuring the timer XTmrCtr_Initialize(&myTimer, XPAR_XPS_TIMER_0_DEVICE_ID); //XTmrCtr_SelfTest(&myTimer, 0); XTmrCtr_SetOptions(&myTimer,(Xuint8)0,XTC_INT_MODE_OPTION | XTC_DOWN_COUNT_OPTION | XTC_AUTO_RELOAD_OPTION); XTmrCtr_SetHandler(&myTimer,(XTmrCtr_Handler) timer_a_int_handler,NULL); //*************** 2. Interrupt controller initialization and configuration ****************** xil_printf("Setting up interrupt controller...\r\n"); XIntc_Initialize(&myIntc, XPAR_XPS_INTC_0_DEVICE_ID); //Attach the ISRs to the interrupt controller driver. XIntc_Connect(&myIntc, XPAR_XPS_INTC_0_XPS_TIMER_0_INTERRUPT_INTR, (XInterruptHandler) XTmrCtr_InterruptHandler, =20 &myTimer); XIntc_Start(&myIntc, XIN_REAL_MODE); XIntc_Enable(&myIntc, XPAR_XPS_INTC_0_XPS_TIMER_0_INTERRUPT_INTR); //Set the timer to expire every 6 seconds XTmrCtr_SetResetValue(&myTimer, (Xuint8)0, 6 * 50000000); XTmrCtr_Start(&myTimer, (Xuint8)0); xil_printf("Entering loop...\r\n"); while(1){ //xil_printf("in loop..\r\n"); } } > Bryan > > On Nov 24, 7:19=A0pm, bish <bishes...@gmail.com> wrote: > > > > > I am trying to use a timer for regular interrupt in microblaze. I am > > using edk 9.2i and spartan 3a dsp 1800a. > > Even following a simple lab example widely used by beginners didn't > > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf > > > I have connected all the interrupt ports correctly as evident from the > > following portion of the mhs file: > > BEGIN microblaze > > =A0PARAMETER HW_VER =3D 7.00.a > > ........... > > ........... > > PORT INTERRUPT =3D interrupt > > END > > > BEGIN xps_timer > > =A0PARAMETER INSTANCE =3D delay > > =A0PARAMETER HW_VER =3D 1.00.a > > =A0PARAMETER C_ONE_TIMER_ONLY =3D 1 > > =A0PARAMETER C_BASEADDR =3D 0x8141c200 > > =A0PARAMETER C_HIGHADDR =3D 0x8141c3ff > > =A0BUS_INTERFACE SPLB =3D mb_plb > > =A0PORT Interrupt =3D timer1 > > =A0PORT CaptureTrig0 =3D net_gnd > > END > > > BEGIN xps_intc > > =A0PARAMETER INSTANCE =3D xps_intc_0 > > =A0PARAMETER HW_VER =3D 1.00.a > > =A0PARAMETER C_BASEADDR =3D 0x81418000 > > =A0PARAMETER C_HIGHADDR =3D 0x814181ff > > =A0BUS_INTERFACE SPLB =3D mb_plb > > =A0PORT Irq =3D interrupt > > =A0PORT Intr =3D timer1 > > END > > > Now for the software settings since I am using edk 9.2i, it does not > > have option for registering our interrupt handler in software platform > > settings window (which is what the lab suggests), I used the > > microblaze_register_handler(...) function ( I took me 3 days to figure > > out this), =A0but I still don't get how it works differently from the > > function XIntc_RegisterHandler. > > The portion of C file is as follows: > > void timer_int_handler(void * baseaddr_p) { > > =A0 =A0 /* Add variable declarations here */ > > =A0 =A0 =A0 =A0 unsigned int csr; > > =A0 =A0 =A0 =A0 /* Read timer 0 CSR to see if it raised the interrupt *= / > > =A0 =A0 =A0 =A0 csr =3D XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADD= R,0); > > =A0 =A0 =A0 =A0 /* If the interrupt occurred, then increment a counter = */ > > =A0 =A0 =A0 =A0 /* and set one_second_flag to 1 */ > > =A0 =A0 =A0 =A0 if (csr & XTC_CSR_INT_OCCURED_MASK ) { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 count ++; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 one_second_flag =3D 1; > > =A0 =A0 =A0 =A0 } > > > =A0 =A0 =A0 =A0 /* Display the count on the LEDs */ > > =A0 =A0 =A0 =A0 XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); > > > =A0 =A0 =A0 =A0 /* Print the count using the UART*/ > > =A0 =A0 =A0 =A0 xil_printf("count value is: %x\n\r", count); > > =A0 =A0 =A0 =A0 /* Clear the timer interrupt */ > > =A0 =A0 =A0 =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr)= ; > > > } > > > int main() { > > > =A0 int count_mod_3; > > > =A0 //registering an interrupt handler > > =A0 microblaze_register_handler((XInterruptHandler) timer_int_handler, > > (void *)0); > > > =A0 /* Register the Timer interrupt handler in the vector table */ > > =A0 XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0XPAR_XPS_INT= C_0_DELAY_INTERRUPT_INTR, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(XInterruptH= andler) timer_int_handler, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void *)XPAR= _DELAY_BASEADDR); > > =A0 /* Enable MicroBlaze Interrupts */ > > =A0 microblaze_enable_interrupts(); > > > =A0 /* Initialize and set the direction of the GPIO connected to LEDs *= / > > =A0 XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); > > =A0 XGpio_SetDataDirection(&gpio,LEDChan, 0); > > > =A0 /* Start the interrupt controller */ > > =A0 XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); > > =A0 XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); > > > =A0 /* Set the gpio as output on high 8 bits (LEDs)*/ > > =A0 XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); > > =A0 xil_printf("The value of count =3D %d\n\r", count); > > > =A0 /* Set the number of cycles the timer counts before interrupting */ > > =A0 XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, > > (timer_count*timer_count) * 50000000); > > > =A0 /* Reset the timers, and clear interrupts */ > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); > > > =A0 /* Enable timer interrupts in the interrupt controller */ > > =A0 XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MASK); > > > =A0 /* Start the timers */ > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK= ); > > > =A0 /* Wait for interrupts to occur */ > > =A0 while(1) { > > =A0 =A0 =A0 =A0 if(one_second_flag){ > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 count_mod_3 =3D count % 3; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if(count_mod_3 =3D=3D 0) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xil_printf("Interrupt t= aken at %d seconds \n\r",count); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 one_second_flag=3D0; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 xil_printf("."); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0 } > > > } > > > When I run the system, the value of count does not change from 1. What > > could be the problem?- Hide quoted text - > > - Show quoted text -Article: 136616
On Nov 26, 4:58=A0am, David <simianfe...@gmail.com> wrote: > On Nov 26, 2:37=A0am, bish <bishes...@gmail.com> wrote: > > > > > > > On Nov 25, 12:25=A0pm, Matthias Alles <REMOVEallesCAPIT...@NOeit.SPAMun= i- > > > kl.de> wrote: > > > Hi! > > > > I wonder, whether "one_second_flag" is declared as volatile? If not, = the > > > compiler optimizes your if-statement in the while(1) loop away. You c= an > > > check this by using mb-objdump. > > > I tried using the volatile for one_second_flag, still it does not > > work. It just prints "the value of count =3D 1" once in terminal and > > nothing happens then. > > > > Cheers, > > > Matthias > > > > bish schrieb: > > > > > I am trying to use a timer for regular interrupt in microblaze. I a= m > > > > using edk 9.2i and spartan 3a dsp 1800a. > > > > Even following a simple lab example widely used by beginners didn't > > > > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf > > > > > I have connected all the interrupt ports correctly as evident from = the > > > > following portion of the mhs file: > > > > BEGIN microblaze > > > > =A0PARAMETER HW_VER =3D 7.00.a > > > > ........... > > > > ........... > > > > PORT INTERRUPT =3D interrupt > > > > END > > > > > BEGIN xps_timer > > > > =A0PARAMETER INSTANCE =3D delay > > > > =A0PARAMETER HW_VER =3D 1.00.a > > > > =A0PARAMETER C_ONE_TIMER_ONLY =3D 1 > > > > =A0PARAMETER C_BASEADDR =3D 0x8141c200 > > > > =A0PARAMETER C_HIGHADDR =3D 0x8141c3ff > > > > =A0BUS_INTERFACE SPLB =3D mb_plb > > > > =A0PORT Interrupt =3D timer1 > > > > =A0PORT CaptureTrig0 =3D net_gnd > > > > END > > > > > BEGIN xps_intc > > > > =A0PARAMETER INSTANCE =3D xps_intc_0 > > > > =A0PARAMETER HW_VER =3D 1.00.a > > > > =A0PARAMETER C_BASEADDR =3D 0x81418000 > > > > =A0PARAMETER C_HIGHADDR =3D 0x814181ff > > > > =A0BUS_INTERFACE SPLB =3D mb_plb > > > > =A0PORT Irq =3D interrupt > > > > =A0PORT Intr =3D timer1 > > > > END > > > > > Now for the software settings since I am using edk 9.2i, it does no= t > > > > have option for registering our interrupt handler in software platf= orm > > > > settings window (which is what the lab suggests), I used the > > > > microblaze_register_handler(...) function ( I took me 3 days to fig= ure > > > > out this), =A0but I still don't get how it works differently from t= he > > > > function XIntc_RegisterHandler. > > > > The portion of C file is as follows: > > > > void timer_int_handler(void * baseaddr_p) { > > > > =A0 =A0 /* Add variable declarations here */ > > > > =A0 =A0unsigned int csr; > > > > =A0 =A0/* Read timer 0 CSR to see if it raised the interrupt */ > > > > =A0 =A0csr =3D XTmrCtr_mGetControlStatusReg(XPAR_DELAY_BASEADDR,0); > > > > =A0 =A0/* If the interrupt occurred, then increment a counter */ > > > > =A0 =A0/* and set one_second_flag to 1 */ > > > > =A0 =A0if (csr & XTC_CSR_INT_OCCURED_MASK ) { > > > > =A0 =A0 =A0 =A0 =A0 =A0count ++; > > > > =A0 =A0 =A0 =A0 =A0 =A0one_second_flag =3D 1; > > > > =A0 =A0} > > > > > =A0 =A0/* Display the count on the LEDs */ > > > > =A0 =A0XGpio_mSetDataReg(XPAR_LED_HIGHADDR, LEDChan, count); > > > > > =A0 =A0/* Print the count using the UART*/ > > > > =A0 =A0xil_printf("count value is: %x\n\r", count); > > > > =A0 =A0/* Clear the timer interrupt */ > > > > =A0 =A0XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR,0,csr); > > > > } > > > > > int main() { > > > > > =A0 int count_mod_3; > > > > > =A0 //registering an interrupt handler > > > > =A0 microblaze_register_handler((XInterruptHandler) timer_int_handl= er, > > > > (void *)0); > > > > > =A0 /* Register the Timer interrupt handler in the vector table */ > > > > =A0 XIntc_RegisterHandler(XPAR_XPS_INTC_0_BASEADDR, > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0XPAR_XPS= _INTC_0_DELAY_INTERRUPT_INTR, > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(XInterr= uptHandler) timer_int_handler, > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void *)= XPAR_DELAY_BASEADDR); > > > > =A0 /* Enable MicroBlaze Interrupts */ > > > > =A0 microblaze_enable_interrupts(); > > > > > =A0 /* Initialize and set the direction of the GPIO connected to LE= Ds */ > > > > =A0 XGpio_Initialize(&gpio, XPAR_LED_DEVICE_ID); > > > > =A0 XGpio_SetDataDirection(&gpio,LEDChan, 0); > > > > > =A0 /* Start the interrupt controller */ > > > > =A0 XIntc_mMasterEnable(XPAR_XPS_INTC_0_BASEADDR); > > > > =A0 XIntc_mEnableIntr(XPAR_XPS_INTC_0_BASEADDR, 0x1); > > > > > =A0 /* Set the gpio as output on high 8 bits (LEDs)*/ > > > > =A0 XGpio_mSetDataReg(XPAR_LED_DEVICE_ID,LEDChan, ~count); > > > > =A0 xil_printf("The value of count =3D %d\n\r", count); > > > > > =A0 /* Set the number of cycles the timer counts before interruptin= g */ > > > > =A0 XTmrCtr_mSetLoadReg(XPAR_DELAY_BASEADDR, 0, > > > > (timer_count*timer_count) * 50000000); > > > > > =A0 /* Reset the timers, and clear interrupts */ > > > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > > > XTC_CSR_INT_OCCURED_MASK | XTC_CSR_LOAD_MASK ); > > > > > =A0 /* Enable timer interrupts in the interrupt controller */ > > > > =A0 XIntc_mEnableIntr(XPAR_DELAY_BASEADDR, XPAR_DELAY_INTERRUPT_MAS= K); > > > > > =A0 /* Start the timers */ > > > > =A0 XTmrCtr_mSetControlStatusReg(XPAR_DELAY_BASEADDR, 0, > > > > XTC_CSR_ENABLE_TMR_MASK | XTC_CSR_ENABLE_INT_MASK | > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_DOWN_COUNT_MASK); > > > > > =A0 /* Wait for interrupts to occur */ > > > > =A0 while(1) { > > > > =A0 =A0if(one_second_flag){ > > > > =A0 =A0 =A0 =A0 =A0 =A0count_mod_3 =3D count % 3; > > > > =A0 =A0 =A0 =A0 =A0 =A0if(count_mod_3 =3D=3D 0) > > > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0xil_printf("Interrupt taken = at %d seconds \n\r",count); > > > > =A0 =A0 =A0 =A0 =A0 =A0one_second_flag=3D0; > > > > =A0 =A0 =A0 =A0 =A0 =A0xil_printf("."); > > > > =A0 =A0 =A0 =A0 =A0 =A0} > > > > =A0 =A0} > > > > } > > > > > When I run the system, the value of count does not change from 1. W= hat > > > > could be the problem?- Hide quoted text - > > > > - Show quoted text - > > Hello, > > Here is how I set up a timer interrupt in 9.2: > > void TimerCounterHandler(void *CallBackRef) > { > =A0 =A0 =A0 =A0 print("timer interrupt "); > > } > > Int main (void) { > > =A0 =A0 =A0 =A0 XIntc intr_ctrl; > =A0 =A0 =A0 =A0 XTmrCtr timr; > > =A0 =A0 =A0 =A0 XIntc_Initialize(&intr_ctrl,XPAR_XPS_INTC_0_DEVICE_ID); > =A0 =A0 =A0 =A0 XTmrCtr_Initialize(&timr,XPAR_XPS_TIMER_1_DEVICE_ID); > > =A0 =A0 =A0 =A0 XIntc_Connect(&intr_ctrl, XPAR_XPS_INTC_0_XPS_TIMER_1_INT= ERRUPT_INTR, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(XInterruptHandler= ) > XTmrCtr_InterruptHandler, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(void *)&timr); > > =A0 =A0 =A0 =A0 XIntc_Start(&intr_ctrl, XIN_REAL_MODE); > > =A0 =A0 =A0 =A0 XIntc_Enable(&intr_ctrl, XPAR_XPS_INTC_0_XPS_TIMER_1_INTE= RRUPT_INTR); > > =A0 =A0 =A0 =A0 XTmrCtr_SetHandler(&timr, (void *)TimerCounterHandler, vo= id); This issued an error so I replaced void with NULL in the third argument above. Apart from that I didn't change anything, but still the terminal never printed "timer interrupt" so still the problem remains!! > > =A0 =A0 =A0 =A0 XTmrCtr_SetOptions(&timr, 0, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0XTC_INT_MODE_OPTION | XTC_= AUTO_RELOAD_OPTION); > > =A0 =A0 =A0 =A0 XTmrCtr_SetResetValue(&timr, 0, 0xF0000000); > > =A0 =A0 =A0 =A0 XTmrCtr_Start(&timr,0); > > =A0 =A0 =A0 =A0 microblaze_enable_interrupts(); > > =A0 =A0 =A0 =A0while(1){ > =A0 =A0 =A0 //wait for interrupts > =A0 =A0 =A0 } > > } > > If you are using the Intc component, you no longer need to use the > microblaze_register_handler function - instead use the XIntc_Connect() > function. > The XTmrCtr driver provides its own interrupt handler > XTmrCtr_InterruptHandler() which you should use to service the > interrupt. =A0It will issue a callback to a function of your choice (set > with XTmrCtr_SetHandler) > > Hope this helps, > > David- Hide quoted text - > > - Show quoted text -Article: 136617
none wrote: > Anyone know what kind of latitude you have for the input frequency of > the IDELAYCTRL primitive? I'm looking at implementing a LVDS link with a > 2:1 DDR (so 4:1) at 156.25MHz. From xapp860 it looks like 200MHz works, > but I'd rather use a DCM to generate the value from the 156.25MHz > instead of bringing in a 200MHz clock signal from the outside. Have a look at xapp707. This is for Virtex4, but I would think that the IDELAYCTRL hasn't changed much in Virtex5. This xapp has a bunch of measurements for different REFCLK speeds (see page 27) and also deals with the subject of jitter in REFCLK. Bottom line: - you could use 156.25MHz directly as REFCLK, but then your tap delay is different and the signal quality may be slightly degraded - using a DCM to generate the 200MHz is OK. The DCM does add jitter to REFCLK, but that jitter is not transferred to the signals that go through the IDELAY primitives. From page 25: "The amount of jitter transfer from the IDELAYCTRL 200 MHz reference clock to the data signal in the IDELAY chain is too small to quantify. The jitter transfer is ~0. Because the jitter tolerance is so low, the CLKFX output of a DCM can be used in any configuration to generate the 200 MHz reference clock." Again, the document applies to Virtex4, and I don't know if all of this is valid for Virtex5 as well. HTH, Sean -- My email address is only valid until the end of the month. Try figuring out what the address is going to be after that...Article: 136618
On Nov 26, 1:39=A0am, backhus <n...@nirgends.xyz> wrote: > Hi Gints, > there's a xapp for LVDS serializers and deserializers that work for > CameraLink Interfaces. > For The UCF flie have a look into the Constraints Guide of the Xilinx > Documentation. > A LVDS Example Application can be downloaded from > > http://www.xilinx.com/products/devkits/HW-SPAR3E-DISP-DK-UNI-G.htm > > Look under the ressources tab. There are the files. > > Have a nice synthesis > =A0 =A0Eilert > > reganirel...@gmail.com schrieb: > > > Good Morning, > > > I need to de-serialize a camlink LVDS stream because my FPGA doesnt > > have enough pins to accept parallel from a DS90288 etc. and am looking > > for a push in the right direction in where to start. > > > I realise i need to set the constraints file such that the pins are > > set for LVDS input, but I have no experience with constraints files, > > so a quick run-down or resource would be great. I think I can handle > > the rest wrt locking the 7x clock and decoding. > > > Any samples or resources (particularly pertaining to how UCF files > > work) would be great. > > > PS: I use Xilinx 9.2i and VHDL > > > Gints > > I'd be very interested to hear how well this works. I've generally stayed away from this technique in favor of the National DC90CR28x parts for a couple reasons. One of course is the simplicity. Another is the very wide lock range. Also when I did use the FPGA directly, I was using a Lattice ECP2 part which has PLL's and some very useful clocking features that made the job easier. Even then I needed to create different configuration files for different input frequency ranges, due to the narrower lock range of the FPGA's PLL wrt the National chip. Regards, GaborArticle: 136619
Hi, In early 2008, Stuart Sutherland presented a paper at DVCON 2008 on the enhancements to the standard which were approved by the committee up to that time. The paper can be found at http://sutherland-hdl.com/papers-by-sutherland.php. Brad Pierce recently posted on the SV-BC mail reflector, at http://www.eda.org/sv-bc/hm/8983.html, an updated list of enhancements to the SV-BC part of the standard (mostly the general and design constructs). Regarding VCS, the new version (2008.09) supports the IEEE 1800-2005 version of the standard. IUS82 now supports unions. I personally feel that Questa has the best implementation of SystemVerilog, but VCS and IUS are closing the gap. Shalom Bresticker Intel LAD, JerusalemArticle: 136620
Hi, For several reasons a need very low jitter on some of my outputs. I was thinking of using LVDS for my I/Os and of course I do not consider using a clock manager. Do you have an idea of the order of magnitude of jitter one can get? What fpga would you recomend for a low cost small design? Cheers PabloArticle: 136621
"palvarez": > For several reasons a need very low jitter on some of my outputs. I > was thinking of using LVDS for my I/Os and of course I do not consider > using a clock manager. Do you have an idea of the order of magnitude > of jitter one can get? What fpga would you recomend for a low cost > small design? I'm having a similar design constraint for a given project. But in that case, only one external clock-net is jitter-sensitive, so that jitter on the data-lines doesn't matter at all. Gruss Jan BrunsArticle: 136622
Is Vita-57 an approved standard? Here's an alternative that has been in use for more than 2 years: www.em.avnet.com/exp. It was developed and is now used by Avnet for FPGA development boards and expansion modules, but the specification is public for anyone to use. nic On Nov 25, 6:33=A0am, Gabor <ga...@alacron.com> wrote: > On Nov 24, 11:34=A0am, palvarez <pabloalvarezsanc...@gmail.com> wrote: > > > > > > > Hi, > > > Have you had a look at the new FMC standard (VITA 57)? It looks > > extremely promising as nowadays many designs are based on a simple > > FPGA with variations on the front pannel. =A0Sofar I have only seen FMC > > developments for high perfomance plataforms based on Virtex5, but I > > feel that a great benefit would appear when using a flexible low > > budget carrier with flexible low cost front pannels. > > > Check this article for quick intro to VITA 57 > > >http://www.vmecritical.com/articles/id/?3575 > > > What do you think? > > > Cheers > > > pablo > > Well the article doesn't go too deeply into the standard, but > the basic idea makes sense. =A0Many manufacturers already have > proprietary mezzanine cards for doing exactly this. =A0At > Alacron, we use both standard and proprietary mezzanines. > For example we use the "user defined" fourth connector of > PMC to connect directly to our FPGA on the base card. =A0Some > of our add-on "PMC" modules don't have the PCI bus at all > and just use this fourth connector. > > On some of our newer boards we have proprietary mezzanines > using high-speed connectors to add various font-end interfaces > like analog VGA input or Camera Link. =A0I imagine using a > standard for these front-end cards would allow us to add > third-party modules to quickly add more front-end interfaces. > Of course this all depends on the details, which are not > in the article. > > Regards, > Gabor- Hide quoted text - > > - Show quoted text -Article: 136623
Thanks guys I'll try check it out. If it makes it any simpler regarding locking ranges, it is for a single camera in a single application, so the frequency is known (40MHz) Will post with results, GintsArticle: 136624
Hi deep, > i am trying to connect the ip core provided by > the xillinx for the vga port interface with other multiple sources to > be interconnected to create entire new module in "spartan 3a 1800a dsp > fpga development board".if anybody is working or interested in the > above field can share the view on how to connect these ip cores. You need to add definitions for the core in question to your VHDL (Verilog) file. If you go into ISE into the 'Edit' menu, then 'Language Templates', then 'CORE Generator' you will find an example for the core that you are working with. There will be two sections in the code exapmle, clearly marked as destined for the 'architecture header' and 'architecture body' part of your file. But beware, if it's a parameterized IP core (like the FFT I'm using) the size of the busses in the example might be off. I hope this anwsers your question because I've been unable to find an IP core for VGA in the Xilinx tools. Regards, Paul Boven.
Site Home Archive Home FAQ Home How to search the Archive How to Navigate the Archive
Compare FPGA features and resources
Threads starting:
Authors:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z