Search the Community

Showing results for tags 'sdk'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 83 results

  1. sgandhi

    Webserver using Zybo Z7

    Hello, I have been successful in running the lwIP echo server on the Zybo Z7 board. However, I want to develop a web server on Zynq. I have gone through the lwIP documentation. However, in the discussion of this topic, I was successful in reading the .bin file from the SD card. Now I want to set up a web server on Zynq so I can command the server to read the .bin file from SD card and store it in the DDR. How do I start working on the web server. I have been searching a lot for the tutorial or anything that could make me understand in a simpler way but I failed to find any.! I also tried understanding the echo server C code in sdk however, after a point it seems too confusing to me. I could even think of modifying the echo server C code to develop a web server with some help, may be. The documentation of lwIP is confusing to me at this point.... Thanks, Shyama.
  2. Hello Digilent Forums, I have an Analog Discovery 2 + Impedance Analyzer board, and have been programmatically manipulating the board via the DWF library. I am now trying to plot Input Phase (∠) programmatically. The SDK for Python comes with a `dwfconstants.py`, which houses values of `c_int()`, corresponding with various measurement types. For example, `DwfAnalogImpedanceImpedance` measurement type corresponds to `c_int(0)`. I do not see a constant for Input Phase inside `dwfconstants.py`. Is it possible to get Input Phase? Thank you in advance for your help!
  3. Hi, I'm trying to use the UART of my Analog Discovery 2 in python. I've had a look at the example and just ran it. At first, I thought it worked. But then I realized it was okay only for the first frame. After increasing the sleeping before the print (see the pics just under), the values are more often correct, but there's still a lot of unexpected results. (see the pics just under ). The thing is, when I use Waveforms, it works(see the pic just under). Also I thought of a problem with the SDK, even if I don't really think so. Could someone help me? Thanks, Marc
  4. YakirP

    Pmod wifi SDK problem

    Hi i'm using Vivado 2018.2 + Zedboard, my goal is to use the WiFiScan from the examples attached to Pmod WiFi folder. i have build the project in vivado section and exported it to SDK at that point i'm creating new application project, choose C++ project and select finish. i'm getting the following errors: flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T' DHCP.h ‪/proj_bsp/ps7_cortexa9_0/include/DEIPcK/utility‬ line 216 C/C++ Problem flexible array member 'DHCPDG_T::options' not at end of 'struct DHCPMEM_T' DHCP.h ‪/proj_bsp/ps7_cortexa9_0/libsrc/PmodWIFI_v1_0/src/DEIPcK/utility‬ line 216 C/C++ Problem flexible array member 'SMGR_T::rgPages' not at end of 'class TCPSocket' HeapMgr.h ‪/proj_bsp/ps7_cortexa9_0/include/DEIPcK/utility‬ line 145 C/C++ Problem flexible array member 'SMGR_T::rgPages' not at end of 'class TCPSocket' HeapMgr.h ‪/proj_bsp/ps7_cortexa9_0/libsrc/PmodWIFI_v1_0/src/DEIPcK/utility‬ line 145 C/C++ Problem flexible array member 'SMGR_T::rgPages' not at end of 'class UDPSocket' HeapMgr.h ‪/proj_bsp/ps7_cortexa9_0/include/DEIPcK/utility‬ line 145 C/C++ Problem flexible array member 'SMGR_T::rgPages' not at end of 'class UDPSocket' HeapMgr.h ‪/proj_bsp/ps7_cortexa9_0/libsrc/PmodWIFI_v1_0/src/DEIPcK/utility‬ line 145 C/C++ Problem flexible array member 'SMGR_T::rgPages' not at end of 'struct DNSMEM_T' HeapMgr.h ‪/proj_bsp/ps7_cortexa9_0/include/DEIPcK/utility‬ line 145 C/C++ Problem flexible array member 'SMGR_T::rgPages' not at end of 'struct DNSMEM_T' HeapMgr.h ‪/proj_bsp/ps7_cortexa9_0/libsrc/PmodWIFI_v1_0/src/DEIPcK/utility‬ line 145 C/C++ Problem thanks for the help
  5. Esti.A

    OpenCV and Pcam5-c

    Hi everyone, I am working in teh demo that was created by Digilent to get images from teh Pcam5-c that is connected by a MIPI CSI-2 interface to teh zybo z7-020 board. In this case, I was wondering if I decide to do the processing of the image (edge detection, enhancement of light,...) I would need to use SDx. I have seen that there are plenty of solutions in OpenCv but I dont know how the hardware proyect and the SDx project can be linked. Note, in this initial design I have teh initiallization od teh camara and platform in a C++ application file that I dont know how if I should export to sdx file and how does this interact with the platform. Anothr queation I have is that for interacting with the openCv set-up do I must use Linux ? Kind regards Esti
  6. Hello, I am a college student currently working on the HDMI Input demo for the Zybo board on Vivado 2018.3 and SDK. I am following the steps provided on this forum, but I end up with trouble displaying the HDMI source onto the monitor. Without any modification, I can get the HDMI source to display properly; however, there seems to be many errors and warnings. In addition, modifying the C code by commenting out some of the switch statements resulted in no change whatsoever. After creating a new bsp and application project, followed by copy and pasting all of the source files, I had no errors popping up. I was able to see the results of the modifications I made, but the HDMI source wouldn't display onto the monitor (just the DemoPrintTest shows up). I have posted my project onto this link. https://drive.google.com/open?id=1lvM1tz8zgd_w3UtlYuTKOEKojWYyn3rg If possible, I would like to get help on this matter.
  7. Kris Persyn

    Stuck in SDK

    Hi, I'm stuck in SDK. I want to control my hardware design through the use of IP cores, but can't seem to get my software to run properly. I cant even xil_printf nor light some LEDs on my Zybo z20. Any suggestions? head.h helloworld.c
  8. Hello, I am using Vivado 2018.2 i downloaded "Zybo-Z7-20-Pcam-5C-2018.2-*.zip" demo project in original project "part" option is choosen then I created a new vivado project i choose "board" option and i created same block design with "Zybo-Z7-20-Pcam-5C-2018.2-*.zip" demo project. I inserted same IP blocks and made connections. I did synthesis and implementation succesfully but when i exported to SDK and i tried to boot from SD card (i used hello world template) i did not see anything on terminal but when i am trying to export original project to SDK not which i create, then i can see hello world message on Terminal. Why did i not see anything in my project but i saw in original demo project? what could possibly be the problem? Hoping to read from you soon Best regards
  9. I am kind of new on electronics. I am trying to set a trigger connection to analog discovery 2(AD2) from matlab. Since matlab has a supporting package of AD2 for data acquisition tool, I tried to set a trigger with the function addTriggerConnection() but i got the message You cannot use "addTriggerConnection" with Digilent hardware. Is there any other suggestions on how to trigger data Recording from matlab data acquisition tool for AD2.
  10. Hi, I get infinite loops when I enter a digit which is not expected from scanf function while programming a standalone application for the retired version of zybo. what I want is to enter just an integer. I used the next code to avoid entering something that is not an integer by accident, as an alternative for scanf. This works great on CodeBlocks, but when I try to use it on SDK it does not work, it's like I cannot enter anything. How can I solve this issue? should I use another function or library? #include <stdio.h> #include <stdlib.h> int main(void) { char *p, s[100]; int n; while(1) { while (fgets(s, sizeof(s), stdin)) { n = strtol(s, &p, 10); if (p == s || *p != '\n') { printf("Please enter an integer: "); } else break; printf("You entered: %d\n", n); } printf("the number is %d\n",n); } }
  11. Hi! I can't get the Python script DigitalIn_Record.py to work properly. Environment that I've tried with: Windows 7 & 10 Python3 SDK 3.9.1 and 3.10.2 Digital Discovery and Analog Discovery 1 Just running the script as is, it seems to be working, but the triggering point is not correct. (When running DD I added FDwfDigitalInInputOrderSet to set fDioFirst=True) IMHO, this line seems not correct: if cSamples == 0 and (sts == DwfStateConfig or sts == DwfStatePrefill or sts == DwfStateArmed) : sts is declared as c_byte() and DwfState... as c_ubyte(), so they will never be equal. Adding .value will fix this: if cSamples == 0 and (sts.value == DwfStateConfig.value or sts.value == DwfStatePrefill.value or sts.value == DwfStateArmed.value) : Now the script will be hanging, as the unit remains in the prefill state. Changing -1 to 0 in dwf.FDwfDigitalInTriggerPrefillSet(hdwf, c_int(-1)), makes the unit to leave the prefill state, but the record is not started at the assumed trigger point. I'm not aware of the units internal design, but a level triggering can cause faulty triggering, so I changed to edge trigger, but it seems like I'm not able to have that work that way either. Some good ideas what I'm doing wrong? I would like to start a record from my triggering point. And what does prefill = -1 does? I can't find any info in the SDK manual. /Peo
  12. Hi @jpeyron, @D@n , @Mahdi I completed my block diagram design in Vivado, and I used Microblaze IP for AXI control, and PmodDA3 IP. (1st picture) But , I want to know how to assign Constraints to the JD Connector and what are source code that should be written in SDK ? I am using Arty 7. Kindly, see the attached pictures. Looking forward your help. Thanks .
  13. Hello, I tried posting this on the Xilinx forums but got no response. These forums look more active and friendly so hopefully somebody can help me. I am really stuck. I am trying to follow along with the "How To Store Your SDK Project in SPI Flash" tutorial (https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start), but I cannot get it to work. I am using an Artix-7 35T Arty FPGA Evaluation Kit. I am running Vivado v2017.2 (64-bit) and SDK v2017.2 on a Windows 10 machine. First, I created a simple "Hello World" program by following the steps in the "Arty - Getting Started With Microblaze" tutorial ( https://reference.digilentinc.com/learn/programmable-logic/tutorials/arty-getting-started-with-microblaze/start). The only deviation from the instructions that I made was that after adding the MIG to the board, I added an AXI Quad SPI, with enabled port SPI_0, and then ran "Run Connection Automation". When I ran my C program on the Arty board it worked fine, and printed "Hello World" to my PuTTY terminal. I've attached my board file as both .bd and .png. Second, I tried store this "Hello World" program to the Arty's SPI Flash using the "How To Store Your SKD Project in SPI Flash" tutorial. But, it did not work. I'll walk you through what I did because there are a few things that I am confused about. Unless otherwise noted I followed the instructions exactly. Before step 0: I don't know what the QSpi mode jumper setting is referring to, so I didn't do anything. Step 1.3: I compressed my bitstream so I left FLASH_IMAGE_BASEADDR as 0xF8000000, like I found it. Steps 2.1 and 2.2: I used my "Hello World" app that I created by following the "Arty - Getting Started with Microblaze" tutorial. I couldn't place the sections into mig_7series_0 because that wasn't an option, so instead I used mig_7series_0_memaddr. Step 4.1: I used offset 0xF8000000 because that is what I used in Step 1.3. One other thing: the test says to use Arty flash type mt25ql128-spi-x1_x2_x4 (which I do), but the image of the "Program Flash Memory" window shows them using Arty flash type n25ql128-spi-x1_x2_x4. Step 5: it doesn't work. Does anyone have any suggestions? Is the SPI Flash some sort of external hardware that I need to plug into the Arty? Thanks in advance. design_1.bd
  14. Hi, Is that possible to develop and deploy a standalone program from the SDK without installing the Adept software? Right now i have built my own program from the SDK, but without the Adept software it complains something like "'missing djgt.dll". thanks,
  15. Hi All, I am beginner in FPGA world. I am trying to learn how to work with Vivado IP Integrator. When i try to launch my firstProj on Launch on Hardware(System Debugger) I am getting a such kind of issue: make all Building file: ../main.c Invoking: MicroBlaze gcc compiler mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"main.o" -I../../firstproj_bsp/microblaze_0/include -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.c" Finished building: ../main.c Building target: firstproj.elf Invoking: MicroBlaze gcc linker mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../firstproj_bsp/microblaze_0/lib -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "firstproj.elf" ./main.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group /opt/Xilinx/SDK/2018.2/gnu/microblaze/lin/bin/../lib/gcc/microblaze-xilinx-elf/7.2.0/../../../../microblaze-xilinx-elf/bin/ld: firstproj.elf section `.heap' will not fit in region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' makefile:35: recipe for target 'firstproj.elf' failed /opt/Xilinx/SDK/2018.2/gnu/microblaze/lin/bin/../lib/gcc/microblaze-xilinx-elf/7.2.0/../../../../microblaze-xilinx-elf/bin/ld: region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' overflowed by 1168 bytes collect2: error: ld returned 1 exit status make: *** [firstproj.elf] Error 1 19:49:21 Build Finished (took 335ms) I try to search on google but cannot to find an answer. Can someone help to understand the reason? I am thiinking that this may be some tool setup issue. Thanks!
  16. I have been following this tutorial and have had no luck. I am uncertain about how to configure the QSPI IP, because the tutorial starts assuming that I have done that part successfully, so I am not even sure if this is the root of my problem. I have tried these two configurations of this IP, compiled them, and exported them to the SDK, and none of them solved the problem: I made sure JP4 is in the QSPI position. On step 3.1 in the tutorial, I can see that the FPGA is programmed successfully and I see the following output (since I chose not comment out the VERBOSE define as suggested in the tutorial): While programming the flash on step 4 I notice that my FPGA code is erased from the board (leds I had assigned to outputs turn off). Is that supposed to happen? At the end of the tutorial I get no "hello world" output on the terminal after resetting the board, though the FPGA does seem to program from the flash successfully, so that portion works, but I can't get the C-code to run from the flash. Here is the sdk_console_output.txt so you can see the steps I took in the sdk to program the board.
  17. Hello All, I am getting a make error when attempting to build the PMOD ESP32 driver in Xilinx SDK. I will attach a picture of the the error and my SDK flow. I included all the path directories for the console application folder in the C/C++ Build Directories. The problem is essentially that "XPAR_PS7_UART_0_DEVICE_ID" doesn't exist. Is it under a new name perhaps? Should I export "Main.C" to the "src" folder? Any help is appreciated! **This is the line of code that is giving me the issue** "#define HOST_UART_DEVICE_ID XPAR_PS7_UART_0_DEVICE_ID"
  18. This is a little DLL I wrote using C++ Interop in Visual Studio to pull some of the functions from the Adept SDK into C#. I'm posting it here in the hopes this is useful to someone else. It's pretty rough as I am absolutely not a Windows developer and I make no guarantees as to how well it is written and/or works (it does do what I need it to do ). Only supports basic DEPP functions as that's all I needed, other functions shouldn't be too hard to add at this point. Released under the BSD license. https://bitbucket.org/orslmontana/digilent-adept-clr-dll/
  19. I am learning to use DMA in Scatter Gather mode. So i use example code ("xaxidma_example_sg_poll.c"). Using "xil_printf" function to see value, I am done with this but it only transmit 1 BD, and i want more. I edit "SendData" function like this to transmit 2 BDs. // i edit this code to transmit more than 1 BD static int SendPacket(XAxiDma * AxiDmaInstPtr) { XAxiDma_BdRing *TxRingPtr; u8 *TxPacket; u8 Value; XAxiDma_Bd *BdPtr; int Status; int Index; TxRingPtr = XAxiDma_GetTxRing(AxiDmaInstPtr); /* Create pattern in the packet to transmit */ TxPacket = (u8 *) Packet; Value = TEST_START_VALUE; for(Index = 0; Index < 2*MAX_PKT_LEN; Index ++) { TxPacket[Index] = Value; xil_printf ("TX addr: %x and value: %x\n\r", (unsigned int)(TxPacket+Index),(unsigned int)*(TxPacket+Index)); Value = (Value + 1) & 0xFF; } /* Allocate 2 BD */ Status = XAxiDma_BdRingAlloc(TxRingPtr, 2, &BdPtr); if (Status != XST_SUCCESS) { return XST_FAILURE; } for (Index = 0; Index < 2;Index ++){ /* Set up the BD using the information of the packet to transmit */ Status = XAxiDma_BdSetBufAddr(BdPtr, (UINTPTR) Packet); if (Status != XST_SUCCESS) { xil_printf("Tx set buffer addr %x on BD %x failed %d\r\n", (UINTPTR)Packet, (UINTPTR)BdPtr, Status); return XST_FAILURE; } Status = XAxiDma_BdSetLength(BdPtr, MAX_PKT_LEN, TxRingPtr->MaxTransferLen); if (Status != XST_SUCCESS) { xil_printf("Tx set length %d on BD %x failed %d\r\n", MAX_PKT_LEN, (UINTPTR)BdPtr, Status); return XST_FAILURE; } xil_printf ("TX BD addr: %x and value: %x\n\r", BdPtr,TxPacket); /* For single packet, both SOF and EOF are to be set */ XAxiDma_BdSetCtrl(BdPtr, XAXIDMA_BD_CTRL_TXEOF_MASK | XAXIDMA_BD_CTRL_TXSOF_MASK); XAxiDma_BdSetId(BdPtr, (UINTPTR)Packet); TxPacket += MAX_PKT_LEN; BdPtr = (XAxiDma_Bd *)XAxiDma_BdRingNext(TxRingPtr, BdPtr); } /* Give the BD to DMA to kick off the transmission. */ Status = XAxiDma_BdRingToHw(TxRingPtr, 2, BdPtr); if (Status != XST_SUCCESS) { xil_printf("to hw failed %d\r\n", Status); return XST_FAILURE; } return XST_SUCCESS; } And error appear from "XAxiDma_BdRingToHw()" function . Any suggestion for me ? Thank P.S: xaxidma_example_sg_poll.c : full code file I will post my project file soon.
  20. Hello Digilent world First, before I write my questions, I would like to provide some information: - Used device: Analog Discovery 2 (revision 3) - Programming language is C++ - IDE: Visual Studio Community 2013, version 12 - Operating System: Windows 10 I am trying to control the device with the SDK but I got issues with the Digital-In-Instrument. I attached a .cpp file with my code. My aim is to configure digital pin 0 to take 1000 samples as soon as a rising edge on the same pin occurs. To generate a rising edge on this pin, I connect digital pin 0 and digital pin 1 and configure pin 1 to pulse on enabling. I checked if the pulse on pin 0 really occurs: This works fine. Furthermore, I try to read out the logged samples after the triggering and print them on the console. Now the description of my problems: - With the following code I expect the digitalIn Instrument to be armed just one time (setting of acqmodeSingle in row 27). But the print on row 76 prints "DwfStateArmed". I expect it to stay on "DwfStateDone". Do I missunderstand something here? - I totally don't understand the format of the data that I get with FDwfDigitalInStatusData(...) In the digilent examples I saw it like this: FDwfDigitalInStatusData(deviceId, Pointer to array with size of "nrOfSamples", nrOfSamples*sizeof(unsigned short)) Why is there a multiplication with the size of an unsigned short? - Could you please explain me, in which format the logged values are stored in the data-array? Is it a bitfield with the value of each pin or something different? Thank you very much in advance for the given answers. If somethings not clear, don't hesitate to ask. Kind regards Aaron example.cpp
  21. Hi I am new to the DD, and I thought this might be a good device to obtain readouts at high speed from my photon counter that outputs a 3.3v pulse every single time it receives a photon. The maximum speed it can go is at about 25ns per output. So I looked through some of the examples in the SDK (so I can automate the process, without having to save the data file each time and process it later). 1) It is not clear to me how I can extract the data from each channel using the SDK, or rather how I can specify which channel to log the data 2) I am wondering what is the maximum throughput, in the case I want to obtain data from multiple photon counters (e.g. 8 channels at 100MHz) 3) Also, if I implement a script to do a mathematical routine which will compress the amount of data (e.g. number of pulses over a period of time, or mean and std of pulses over a given time) is the script implemented on board or after it arrives in the cpu (post processed)? 4) Would I be able to get the time (or ticks) the pulse is received so that the data load is greatly reduced (since I do not necessarily need the 0s in the pulse stream). Thanks.
  22. Hello All! I have a Arty S7-50 Rev B Board. I am trying to control a mobile robot . I am also using a camera and to talk to both of them I need either I2c or serial communication. So far I created my system using microblaze with no problem. I tested leds, buttons, uart communication etc. My problem comes when I try to map pins other than buttons, leds or switch. I haven't been able to put the system to work. I Tried testing all I could think of before coming to the forums. I saved the project as another one, Created a new one from scratch etc etc and nothing so far. It have been many days if not weeks working in this part. I am pretty confidence about my design and about what I have to do with the robot. What I can't not is get signals out. So at this moment I'll give you some print screen of what I have. I could have some mistakes but it have been a lot of copy and paste and change so I got nowhere to go. I hope some of you could point me on where or how to go. I have this system with all this IP but at the beginning I was testing one by one. I need wither 2 uartlite o 1 I2c working. I know the microblaze, gpio0, timer and interrupt is working. Constraints: I had played a lot with this, this is the las I got. ## Switches set_property -dict { PACKAGE_PIN H14 IOSTANDARD LVCMOS33 } [get_ports { sw[0] }]; #IO_L20N_T3_A19_15 Sch=sw[0] set_property -dict { PACKAGE_PIN H18 IOSTANDARD LVCMOS33 } [get_ports { sw[1] }]; #IO_L21P_T3_DQS_15 Sch=sw[1] set_property -dict { PACKAGE_PIN G18 IOSTANDARD LVCMOS33 } [get_ports { sw[2] }]; #IO_L21N_T3_DQS_A18_15 Sch=sw[2] set_property -dict { PACKAGE_PIN M5 IOSTANDARD SSTL135 } [get_ports { sw[3] }]; #IO_L6N_T0_VREF_34 Sch=sw[3] ## Buttons set_property -dict { PACKAGE_PIN G15 IOSTANDARD LVCMOS33 } [get_ports { btn[0] }]; #IO_L18N_T2_A23_15 Sch=btn[0] set_property -dict { PACKAGE_PIN K16 IOSTANDARD LVCMOS33 } [get_ports { btn[1] }]; #IO_L19P_T3_A22_15 Sch=btn[1] set_property -dict { PACKAGE_PIN J16 IOSTANDARD LVCMOS33 } [get_ports { btn[2] }]; #IO_L19N_T3_A21_VREF_15 Sch=btn[2] set_property -dict { PACKAGE_PIN H13 IOSTANDARD LVCMOS33 } [get_ports { btn[3] }]; #IO_L20P_T3_A20_15 Sch=btn[3] ## Pmod Header JA #//set_property -dict { PACKAGE_PIN L17 IOSTANDARD LVCMOS33 } [get_ports { jap }]; #IO_L4P_T0_D04_14 Sch=ja_p[1] set_property -dict { PACKAGE_PIN L17 IOSTANDARD LVCMOS33 } [get_ports { led2 }]; #IO_L4P_T0_D04_14 Sch=ja_p[1] ## Pmod Header JD ##//set_property -dict { PACKAGE_PIN V15 IOSTANDARD LVCMOS33 } [get_ports { jap }]; #IO_L20N_T3_A07_D23_14 Sch=jd1/ck_io[33] set_property -dict { PACKAGE_PIN T13 IOSTANDARD LVCMOS33 } [get_ports { tx_1 }]; #IO_L21P_T3_DQS_14 Sch=jd2/ck_io[32] set_property -dict { PACKAGE_PIN R11 IOSTANDARD LVCMOS33 } [get_ports { rx_1 }]; #IO_L21N_T3_DQS_A06_D22_14 Sch=jd3/ck_io[31] set_property -dict { PACKAGE_PIN T11 IOSTANDARD LVCMOS33 } [get_ports { tx_0 }]; #IO_L23N_T3_A02_D18_14 Sch=jd9/ck_io[27] set_property -dict { PACKAGE_PIN U11 IOSTANDARD LVCMOS33 } [get_ports { rx_0 }]; #IO_L24P_T3_A01_D17_14 Sch=jd10/ck_io[26] set_property -dict { PACKAGE_PIN V15 IOSTANDARD LVCMOS33 } [get_ports { leds[0] }]; #IO_L16N_T2_A27_15 Sch=led[2] set_property -dict { PACKAGE_PIN U12 IOSTANDARD LVCMOS33 } [get_ports { leds[1] }]; #IO_L17P_T2_A26_15 Sch=led[3] set_property -dict { PACKAGE_PIN V13 IOSTANDARD LVCMOS33 } [get_ports { leds[2] }]; #IO_L17N_T2_A25_15 Sch=led[4] set_property -dict { PACKAGE_PIN T12 IOSTANDARD LVCMOS33 } [get_ports { leds[3] }]; #IO_L18P_T2_A24_15 Sch=led[5] ## USB-UART Interface set_property -dict { PACKAGE_PIN R12 IOSTANDARD LVCMOS33 } [get_ports { uart_rxd_out }]; #IO_25_14 Sch=uart_rxd_out set_property -dict { PACKAGE_PIN V12 IOSTANDARD LVCMOS33 } [get_ports { uart_txd_in }]; #IO_L24N_T3_A00_D16_14 Sch=uart_txd_in ## ChipKit I2C set_property -dict { PACKAGE_PIN J14 IOSTANDARD LVCMOS33 } [get_ports { ck_scl }]; #IO_L24N_T3_RS0_15 Sch=ck_scl set_property -dict { PACKAGE_PIN J13 IOSTANDARD LVCMOS33 } [get_ports { ck_sda }]; #IO_L24P_T3_RS1_15 Sch=ck_sda ## Configuration options, can be used for all designs set_property BITSTREAM.CONFIG.CONFIGRATE 50 [current_design] set_property CONFIG_VOLTAGE 3.3 [current_design] set_property CFGBVS VCCO [current_design] set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design] set_property CONFIG_MODE SPIx4 [current_design] ## SW3 is assigned to a pin M5 in the 1.35v bank. This pin can also be used as ## the VREF for BANK 34. To ensure that SW3 does not define the reference voltage ## and to be able to use this pin as an ordinary I/O the following property must ## be set to enable an internal VREF for BANK 34. Since a 1.35v supply is being ## used the internal reference is set to half that value (i.e. 0.675v). Note that ## this property must be set even if SW3 is not used in the design. set_property INTERNAL_VREF 0.675 [get_iobanks 34] Schematic Elaborated Design: From what I see eveything it is fine, isn't it ? I/O Pots on Schematic I/O Ports on Synthesized Design Code of Sliding LEDS using timer on LEDS: This is funny, these are some sliding leds. It does not matter where I put / map this pins on contraints, this always light the leds. I was tring to map this in pmod header JD but it just ligh the leds. Serial Test: Here the USB serial workf fine with the PC but the other 2 are sending nothing. I2C selftest. The selftest failed, I know it fails on XIic_SelfTest This board is brand new, I only have it for a few weeks. I havent connected anything to the ports. I measured pins either with a tester or with a analog discovery so not short ciruits or similar have been produced. Any help would be apreciated. Edwin
  23. hello, I practice to use vivado 2018.2 to create two AXI GPIOs like the first picture. I could use C program to pass the ON/OFF from switchs to leds;however, the XGpio_DiscreteRead() is always blocked by gets() when i want to use gets() to get cmd,and write data to leds according cmd. The following is my C code.Please introduce me to solve the problem. Thank you a lot. #include "xparameters.h" #include "xgpio.h" #include <stdio.h> #include <stdlib.h> #include "sleep.h" int main(){ XGpio output,input; /* SW &LED Instance */ int button_data=0x00; int switch_data=0; int led_value = 0; int i=0; char cmd[4]; XGpio_Initialize(&output, XPAR_AXI_GPIO_1_DEVICE_ID); XGpio_SetDataDirection(&output, 1, 0x0); XGpio_Initialize(&input, XPAR_AXI_GPIO_0_DEVICE_ID); XGpio_SetDataDirection(&input, 1, 0xF); while(1) { i++; printf("This the %d time run the while loop\n\r",i); printf("Enter Command: \n\r"); gets(cmd); switch_data = XGpio_DiscreteRead(&input, 1); printf("switch_data = %d\n\r",switch_data); led_value = switch_data+1; XGpio_DiscreteWrite(&output, 1, led_value); printf("data wrtie over"); printf("=========================================="); usleep(20000); } return 0; }
  24. Hi all, I have been working with the CMOD A7 board using vivado 2018 and sdk. I have been trying to get the microblaze soft core to respond to the interrupts generated by the peripherals. I started with the timer but have since moved simpler to the uart. I have connected my hardware as shown here. And the code that I am testing is an imported example from drivers board support package. Specifically, it is the one from the uartlite and it is the interrupt exapmle. /****************************************************************************** * * Copyright (C) 2002 - 2015 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * Use of the Software is limited solely to applications: * (a) running on a Xilinx device, or * (b) that interact with a Xilinx device through a bus or interconnect. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. * ******************************************************************************/ /******************************************************************************/ /** * * @file xuartlite_intr_example.c * * This file contains a design example using the UartLite driver (XUartLite) and * hardware device using the interrupt mode. * * @note * * The user must provide a physical loopback such that data which is * transmitted will be received. * * MODIFICATION HISTORY: * <pre> * Ver Who Date Changes * ----- ---- -------- ----------------------------------------------- * 1.00a jhl 02/13/02 First release * 1.00b rpm 10/01/03 Made XIntc declaration global * 1.00b sv 06/09/05 Minor changes to comply to Doxygen and coding guidelines * 2.00a ktn 10/20/09 Updated to use HAL Processor APIs and minor changes * for coding guidelnes. * 3.2 ms 01/23/17 Added xil_printf statement in main function to * ensure that "Successfully ran" and "Failed" strings * are available in all examples. This is a fix for * CR-965028. * </pre> ******************************************************************************/ /***************************** Include Files *********************************/ #include "xparameters.h" #include "xuartlite.h" #include "xintc.h" #include "xil_exception.h" #include "xil_printf.h" /************************** Constant Definitions *****************************/ /* * The following constants map to the XPAR parameters created in the * xparameters.h file. They are defined here such that a user can easily * change all the needed parameters in one place. */ #define UARTLITE_DEVICE_ID XPAR_UARTLITE_0_DEVICE_ID #define INTC_DEVICE_ID XPAR_INTC_0_DEVICE_ID #define UARTLITE_INT_IRQ_ID XPAR_INTC_0_UARTLITE_0_VEC_ID /* * The following constant controls the length of the buffers to be sent * and received with the UartLite device. */ #define TEST_BUFFER_SIZE 100 /**************************** Type Definitions *******************************/ /***************** Macros (Inline Functions) Definitions *********************/ /************************** Function Prototypes ******************************/ int UartLiteIntrExample(u16 DeviceId); int SetupInterruptSystem(XUartLite *UartLitePtr); void SendHandler(void *CallBackRef, unsigned int EventData); void RecvHandler(void *CallBackRef, unsigned int EventData); /************************** Variable Definitions *****************************/ XUartLite UartLite; /* The instance of the UartLite Device */ XIntc InterruptController; /* The instance of the Interrupt Controller */ /* * The following variables are shared between non-interrupt processing and * interrupt processing such that they must be global. */ /* * The following buffers are used in this example to send and receive data * with the UartLite. */ u8 SendBuffer[TEST_BUFFER_SIZE]; u8 ReceiveBuffer[TEST_BUFFER_SIZE]; /* * The following counters are used to determine when the entire buffer has * been sent and received. */ static volatile int TotalReceivedCount; static volatile int TotalSentCount; /******************************************************************************/ /** * * Main function to call the UartLite interrupt example. * * @param None * * @return XST_SUCCESS if successful, XST_FAILURE if unsuccessful * * @note None * *******************************************************************************/ int main(void) { int Status; /* * Run the UartLite Interrupt example, specify the Device ID that is * generated in xparameters.h. */ Status = UartLiteIntrExample(UARTLITE_DEVICE_ID); if (Status != XST_SUCCESS) { xil_printf("Uartlite interrupt Example Failed\r\n"); return XST_FAILURE; } xil_printf("Successfully ran Uartlite interrupt Example\r\n"); return XST_SUCCESS; } /****************************************************************************/ /** * * This function does a minimal test on the UartLite device and driver as a * design example. The purpose of this function is to illustrate * how to use the XUartLite component. * * This function sends data and expects to receive the same data through the * UartLite. The user must provide a physical loopback such that data which is * transmitted will be received. * * This function uses interrupt driver mode of the UartLite device. The calls * to the UartLite driver in the handlers should only use the non-blocking * calls. * * @param DeviceId is the Device ID of the UartLite Device and is the * XPAR_<uartlite_instance>_DEVICE_ID value from xparameters.h. * * @return XST_SUCCESS if successful, otherwise XST_FAILURE. * * @note * * This function contains an infinite loop such that if interrupts are not * working it may never return. * ****************************************************************************/ int UartLiteIntrExample(u16 DeviceId) { int Status; int Index; /* * Initialize the UartLite driver so that it's ready to use. */ Status = XUartLite_Initialize(&UartLite, DeviceId); if (Status != XST_SUCCESS) { return XST_FAILURE; } /* * Perform a self-test to ensure that the hardware was built correctly. */ Status = XUartLite_SelfTest(&UartLite); if (Status != XST_SUCCESS) { return XST_FAILURE; } /* * Connect the UartLite to the interrupt subsystem such that interrupts can * occur. This function is application specific. */ Status = SetupInterruptSystem(&UartLite); if (Status != XST_SUCCESS) { return XST_FAILURE; } /* * Setup the handlers for the UartLite that will be called from the * interrupt context when data has been sent and received, specify a * pointer to the UartLite driver instance as the callback reference so * that the handlers are able to access the instance data. */ XUartLite_SetSendHandler(&UartLite, SendHandler, &UartLite); XUartLite_SetRecvHandler(&UartLite, RecvHandler, &UartLite); /* * Enable the interrupt of the UartLite so that interrupts will occur. */ XUartLite_EnableInterrupt(&UartLite); /* * Initialize the send buffer bytes with a pattern to send and the * the receive buffer bytes to zero to allow the receive data to be * verified. */ for (Index = 0; Index < TEST_BUFFER_SIZE; Index++) { SendBuffer[Index] = Index; ReceiveBuffer[Index] = 0; } /* * Start receiving data before sending it since there is a loopback. */ XUartLite_Recv(&UartLite, ReceiveBuffer, TEST_BUFFER_SIZE); /* * Send the buffer using the UartLite. */ XUartLite_Send(&UartLite, SendBuffer, TEST_BUFFER_SIZE); /* * Wait for the entire buffer to be received, letting the interrupt * processing work in the background, this function may get locked * up in this loop if the interrupts are not working correctly. */ while ((TotalReceivedCount != TEST_BUFFER_SIZE) || (TotalSentCount != TEST_BUFFER_SIZE)) { } /* * Verify the entire receive buffer was successfully received. */ for (Index = 0; Index < TEST_BUFFER_SIZE; Index++) { if (ReceiveBuffer[Index] != SendBuffer[Index]) { return XST_FAILURE; } } return XST_SUCCESS; } /*****************************************************************************/ /** * * This function is the handler which performs processing to send data to the * UartLite. It is called from an interrupt context such that the amount of * processing performed should be minimized. It is called when the transmit * FIFO of the UartLite is empty and more data can be sent through the UartLite. * * This handler provides an example of how to handle data for the UartLite, * but is application specific. * * @param CallBackRef contains a callback reference from the driver. * In this case it is the instance pointer for the UartLite driver. * @param EventData contains the number of bytes sent or received for sent * and receive events. * * @return None. * * @note None. * ****************************************************************************/ void SendHandler(void *CallBackRef, unsigned int EventData) { TotalSentCount = EventData; } /****************************************************************************/ /** * * This function is the handler which performs processing to receive data from * the UartLite. It is called from an interrupt context such that the amount of * processing performed should be minimized. It is called data is present in * the receive FIFO of the UartLite such that the data can be retrieved from * the UartLite. The size of the data present in the FIFO is not known when * this function is called. * * This handler provides an example of how to handle data for the UartLite, * but is application specific. * * @param CallBackRef contains a callback reference from the driver, in * this case it is the instance pointer for the UartLite driver. * @param EventData contains the number of bytes sent or received for sent * and receive events. * * @return None. * * @note None. * ****************************************************************************/ void RecvHandler(void *CallBackRef, unsigned int EventData) { TotalReceivedCount = EventData; } /****************************************************************************/ /** * * This function setups the interrupt system such that interrupts can occur * for the UartLite device. This function is application specific since the * actual system may or may not have an interrupt controller. The UartLite * could be directly connected to a processor without an interrupt controller. * The user should modify this function to fit the application. * * @param UartLitePtr contains a pointer to the instance of the UartLite * component which is going to be connected to the interrupt * controller. * * @return XST_SUCCESS if successful, otherwise XST_FAILURE. * * @note None. * ****************************************************************************/ int SetupInterruptSystem(XUartLite *UartLitePtr) { int Status; /* * Initialize the interrupt controller driver so that it is ready to * use. */ Status = XIntc_Initialize(&InterruptController, INTC_DEVICE_ID); if (Status != XST_SUCCESS) { return XST_FAILURE; } /* * Connect a device driver handler that will be called when an interrupt * for the device occurs, the device driver handler performs the * specific interrupt processing for the device. */ Status = XIntc_Connect(&InterruptController, UARTLITE_INT_IRQ_ID, (XInterruptHandler)XUartLite_InterruptHandler, (void *)UartLitePtr); if (Status != XST_SUCCESS) { return XST_FAILURE; } /* * Start the interrupt controller such that interrupts are enabled for * all devices that cause interrupts, specific real mode so that * the UartLite can cause interrupts through the interrupt controller. */ Status = XIntc_Start(&InterruptController, XIN_REAL_MODE); if (Status != XST_SUCCESS) { return XST_FAILURE; } /* * Enable the interrupt for the UartLite device. */ XIntc_Enable(&InterruptController, UARTLITE_INT_IRQ_ID); /* * Initialize the exception table. */ Xil_ExceptionInit(); /* * Register the interrupt controller handler with the exception table. */ Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT, (Xil_ExceptionHandler)XIntc_InterruptHandler, &InterruptController); /* * Enable exceptions. */ Xil_ExceptionEnable(); return XST_SUCCESS; } The problem is that the code gets stuck in the while loop (as it did with the other interrupt examples) and is always waiting for the interrupt. In either case the event that triggers the interrupt has occurred and the interrupt signal goes high but the controller never acknowledges the interrupt nor runs the handler. I am needing some help as to what is going wrong here and I'm not sure if its the hardware or software. Thanks,
  25. First, I'm using Cygwin on a Windows 10 platform to compile and run a utility program that loads a bit file into the serial Flash PROM of a CmodS6 board. The SDK version is Windows v2.4.2, using lib64. The source code is not my own, but comes from -https://github.com/ZipCPU/s6soc/tree/master/sw/host and the specific program is zipload.exe Under Cygwin, all the source code compiles properly. When it is run, a call is made to DmgrEnumDevices() to enumerate any Digilent boards found. Even though the CmodS6 is connected to the PC with USB, it is not enumerated, DmgrEnumDevices() returns 0. Note: The Digilent utility djtgcfg.exe is able to enumerate the board, initialize, and also configure the Spartan 6. After the failure to enumerate, a call is made to DmgrSzFromErc() and the error code and information is printed to the screen --- Victor@Vics_PC /cygdrive/c/Users/Victor/Documents/Sky Engineering/FPGA_Project/ZipLoad $ ./zipload Top_Level.bit No CModS6 devices found ErrCode(3080): ercInternalError ErrMessage: Internal error. Segmentation fault (core dumped) Is there any particular way I have to setup the SDK, other than making sure make can find the include and library files? I will greatly appreciate any help you can give me. Vic deppi.cpp