sgandhi

Members
  • Content Count

    40
  • Joined

  • Last visited

Everything posted by sgandhi

  1. sgandhi

    Webserver using Zybo Z7

    Hello @jpeyron, I was looking into some examples in the \lwip202....\examples and found one lwip webserver example that uses index.htm file present in FS! Now when I follow the readme.txt file for directions to execute the example, I see some steps as follows: ********************************************************************** Creating FAT image on Linux --------------------------- This requires root (sudo) access on the Linux host Following commands can be used on terminal to create FAT image to be used with webserver application: # create image file of 3MB dd if=/dev/zero of=example.img bs=512 count=6144 # format image with FAT /sbin/mkfs.vfat example.img # mount it mkdir /tmp/fs sudo mount -t vfat -o loop,rw example.img /tmp/fs/ # copy your webpages sudo cp -r webpages_dir/* /tmp/fs/ sudo umount /tmp/fs *************************************************************** And then it tells to run the application... I just tried to run the application w/o creating FAT image, which is obvious to give me the errors!! In order for the webserver to gain access to index.htm, the file needs to be present at the specific location. Is that why we create a FAT image on linux??? Also, the steps in readme.txt tells me to runs those commands on the terminal... How do I start with this? Is it talking about the sdk terminal? As per the directions, I added all the necessary source files and I also included the BSP settings as mentioned! Next step is to create a FAT image on linux... I am wondering how do I start with this! Thanks, Shyama.
  2. sgandhi

    Webserver using Zybo Z7

    Hi @jpeyron, So, do I just change echo.c using the file you provided? I am even suppose to change main.c when using the template of lwIP echo server in the SDK? Thanks for the reply, Shyama.
  3. 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.
  4. sgandhi

    FAT32 with Zybo Z7

    Hello @jpeyron, Don't you think for just an arbitrary data type for a 2D array in SDK, it would be a hectic task to start from HLS? It seems to me that there has to be some way to deal with it in SDK.
  5. sgandhi

    FAT32 with Zybo Z7

    Hello @D@n, @jpeyron, It worked. I got a .bin file from the MATLAB and then used Xilinx SDK to read a .bin file using 32 bit unsigned format. I am having a 2D array with 1 million rows and 4 columns. With each element represented as 32-bit unsigned number, the total size becomes ~15 MB. However, the maximum value in the array is 313,193 which can be represented with 19 bits only. However, I wish to work with multiple of 8-bits i.e., using 20 bits to represent each elements will give me 20 x 4 = 80 bits for each row instead of 19 x 4 = 76 (which is not a multiple of 8!). When I tried to generate a .bin file with each element of the array represented as 20 bits in MATLAB, the file is created successfully. For one million rows and each row of 80 bits, the total file size turns out to be 10,000,020 bytes (~9.53 MB). However, now having this file in the SD flash card, I want to change my code so that I have a 2D array declared as uint20, something like this! Now, this comes in the class of arbitrary precision data types and not the standard data types! My question is does SDK support arbitrary data types? If yes, which header file contains the definition? and how do I use them? (I am aware that HLS supports the arbitrary data types but not aware about the SDK). Thanks, Shyama.
  6. sgandhi

    FAT32 with Zybo Z7

    Hello @D@n, @jpeyron, I am able to read the 2D array from the file but there is a problem! Let's say the content in the .txt file is: 0 \tab 0 \tab 0 \tab 0 0 \tab 1 \tab 0 \tab 0 .... and so on...... (may be a million rows based on my input data file). [\tab is tabular space provided] However, when I read this file, I receive the ASCII characters in the SDK terminal window! So, I get the output as : 48 9 48 9 48 9 48 13 10 48 9 49 9 48 9 48 13 10 ..... so on...... It takes 0 as 48 (ASCII), 1 as 49 and tab as 9. It also adds 13 and 10 as carriage return and line feed ... So while reading the file as 2D array I have to declare array using number of rows present but columns as 9!!! Now let's say if the number at some place in the file is "13" so I get the output printed as 49 51 (ASCII values of 1 and 3!!!!). So, in this case the second dimension of the array as 9 is not sufficient!! I have such a text file to be read from the SD card with approx a million rows and 4 columns. Every entry is a number starting from 0 and maximum possibility of 33000. How do I deal with this problem?
  7. sgandhi

    FAT32 with Zybo Z7

    Hello @jpeyronand @D@n, I figured out that there was a problem in the block design parameter for MIO configuration. The voltage needed is 1.8V and not 3.3V. Presence of level shifter is suppose to take care of 3.3V from 1.8V. Also, I made a mistake is enabling the pull up for pin 47 (card detect). The pull up was to be disabled. I was having a 2D array in the text file and now the processor is able to access this data. However, now I want that PS reads the data from the SD card and stores it in the DDR memory. I think I am half the way and need to figure out how to put this data starting from a specific location of DDR from 0x100000 to 0x3FF00000. There is direct interface from the Zynq PS IP to the DDR however some customization needs to be done in the block design for DDR parameters! What parameters are to be taken care of ? What exactly do I add to SDK code so PS stores the data to DDR? Do I only need to write the 2D buffer data specifying an address of DDR or some sort of initialization is to be done? Regards, Shyama.
  8. sgandhi

    FAT32 with Zybo Z7

    Yes I did try but it doesn't work.!
  9. sgandhi

    FAT32 with Zybo Z7

    Hello, I have been working on reading a .txt file from the micro sd card on the Zybo Z7 board from the PS side. The version of Vivado I use is 2018.1 and the sd card belongs to Kingston (8 GB). I have created a block design in Vivado that just contains the Zynq PS block. I have attached the file below for the reference. In the customization, I select SD0 (40-45 pin) and the pin 47. I also select UART. Reset of the parameters are left unchanged. After exporting the design to the sdk, I create hello world project and modify the main.c with the code for the sd card. I have attached the main.c below for the reference. I also enabled the xilffs in the BSP for Generic fat32 file system. However, when I run the code it seems that f_mount works correctly. But, the f_open, f_read and f_close give errors as following: Connected to COM6 at 115200 Starting the read from SD card... Mounting done successfully : 0 Opening Failure : 3 Reading Failure : 9 1118696 Closing Failure : 9 The mounting operation returns the value 0 means FR_OK is 0 (succeeded). Whereas, f_open returns (3) i.e. FR_NOT_READY and f_read and f_close returns (9) means FR_INVALID_OBJECT. It does appear that the f_open failure causes the read and close functions to fail.! Also, I am storing the read data in a buffer which prints some garbage value I suppose! As a starting step, I have a test1.txt in the SD card which has 1 byte data : 5. That's all... Can anyone help me with this? Regards, Shyama.
  10. I am not able to open this page Data Logging using SD Cards . I am trying to get the same stuff working. That is having a .txt file transferred from sd card to DDR and then having PL to read it.
  11. Hi @jpeyron, I see that the PS has direct connection to the DDR so when I made the block design in the Vivado, I added the SD_0 enabling the pins 40-45 and 47. After the generation of the bit stream, I imported the hardware design in the SDK and further created a new application project (Empty Application Project). Next, I used the examples provided in the SDK/2016.4/embeddedsw folder named "xilffs_polled_example.c". I also modified the BSP settings to include "xilffs" library. I am also able to program the FPGA now. But how do I create a .bin in sd card and what care is to be taken when creating a file in sd card? I just want to read a .txt file which is present in the sd card. I am using ZYBO Z7 board from the digilent. The file which I want to read from the sd card is attached below for your reference. Also, I am just reading a file from the SD card. I am not booting from the SD card so the jumper is suppose to be in JTAG mode. Right? There is a link which you shared above. But isn't that for creating a boot image? How will that help me in my requirements? Thanks for the help, Shyama. occ_matrix.txt
  12. Hi @jpeyron, I went through the forum but I see the discussion is based on the QSPI flash memory. No doubt there is a discussion on booting from the SD card but I am not able to figure it out how! I also read the xsdps.h file to see how is the SD card code being written. However, I have to first create a block design in Vivado Design Suite and the export it to the SDK! Is there any tutorial or any reference that will help me get started with this? Best regards, Shyama
  13. Hi @jpeyron, I figured out that the entire procedure was correct however there was a missing Board Support Package for the Zynq-7000 in the board files folder while installing the Vivado. Thanks a lot, Shyama
  14. Hello, I have a file containing pre-computed decimal values in SD card and I want ZYNQ PS to read this file and store it in the DRAM on ZYBO board. I do know that the processing_system IP has an SD0 interface present. But, how do I start with this? What exactly will be in my block design when working in Vivado Design Suite? What changes needs to be done when exporting the hardware into SDK? The text file that will be present in the SD card is attached for the reference. I read some of the forum discussions on Xilinx but didn't figure out the exact procedure on how to get this working. Any help will be greatly appreciated. Thank you, Shyama. occ_matrix.txt
  15. Hello, I have been following the digilent tutorial to get the echo server working on the ZYBO board. My end goal is to set up a web server that will be running on the ZYNQ PS. I am using Tera Term or Putty but it always denies the connection to the Serial COM port! My laptop has only one USB port and no Ethernet port. So, I am using a USB hub with Gigabit Ethernet which allows Ethernet interface as well as, the USB ports will help me in programming the FPGA using JTAG connection. However, I am able to program the FPGA using the SDK thereafter which using the SDK terminal itself, I am able to "Launch the System as Hardware Debugger" but the question is how do I test if the echo serving is working? I am not able to send anything so that the server will echo it back! As mentioned earlier, I am not even able to use serial terminal such as tera term/putty/hyper terminal for the serial port! I doubt this is because of any other software that might already have an access to the serial port before and is still using it! But, how do I even troubleshoot this problem? It seems everything works fine right from customizing the IP to exporting it in the SDK, modifying the BSP settings and programming the FPGA. However, the problem lies in the serial port connection. The tutorial which I have been following to set up an echo server is: https://reference.digilentinc.com/learn/programmable-logic/tutorials/zybo-getting-started-with-zynq-server/start Any help or solution to this problem is greatly appreciated. Thank you, Shyama
  16. sgandhi

    Nexys 4 DDR

    What would be the maximum amplitude of the signal that can be given to microphone present on nexys 4 ddr board ?
  17. sgandhi

    Audio processing

    @D@n Ok let me see than... !!!!
  18. sgandhi

    Audio processing

    @D@n Oh, yes! Data from mic is being heard from the audio jack on nexys 4 board, i.e real time application........ Thanks.....
  19. sgandhi

    Audio processing

    @D@n Oh yes I understood what you are exactly trying to say... But passing whole of my pdm data ( as audio is infinitely large) directly from the filter would be a good idea ?
  20. sgandhi

    Audio processing

    @D@n The output of mic has 16 bit pdm data at 48 kHz , now audio being non - stationary signal, I cannot let the whole data pass through FIR bandpass filter so instead of windowing it, can I use BRAM IP (Block Memory Generator) with depth of 1024 and than pass it through the FIR ? Thanks.........
  21. sgandhi

    Audio processing

    @D@n I need your help sir... I want to use triangle or a square wave and want to pass it through the three/four band pass filters so I could analyze the harmonics...!! Now if I am working in digital domain so I may go for FIR Compiler IP but from where can I get triangle/square wave in digital domain as I don't want to use the microphone and suppose if I get it how will I define them as input of x no of bits when customizing FIR IP ?? Please help me with this or suggest some other idea.. My work is on halt currently.. Thank you..
  22. sgandhi

    Audio processing

    Another doubt is my input is 16 bits and coefficient width is 8/16 bits but I require output as 16 bits !!! Would it be feasible to truncate the output ( option provided during customizing the IP) ??? @D@n
  23. sgandhi

    Audio processing

    @D@n Sorry I am not able to exactly figure out the meaning of your last sentences.................
  24. sgandhi

    Audio processing

    @D@n Thanks for reply sir...... The data output from mic is the serial data so FIR compiler accepts serial or parallel data and the output of FIR is serial/parallel ???
  25. sgandhi

    Audio processing

    @D@n Thanks sir and I want this IP to be used in my behavioral code so how can I do that?