Ahmed Alfadhel

Members
  • Content Count

    36
  • Joined

  • Last visited

About Ahmed Alfadhel

  • Rank
    Frequent Visitor

Recent Profile Visitors

98 profile views
  1. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, I just want to ensure , that I have found the right example "the xilinx ´╗┐example for the bram" . As indicated in attached picture. Kindly, I am Looking forward your reply? Thanks in advance.
  2. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, Kindly, could you give me your feedback about this answer from Xilinx Forum. https://forums.xilinx.com/t5/7-Series-FPGAs/Writing-My-own-code-in-XSDK/td-p/930640 Does it true, that I have to work in testperiph.c file only ? Thanks in advance.
  3. Ahmed Alfadhel

    Source Code in SDK

    Hello @jpeyron, I attached a copy of my design . I exported the design to XSDK. Then created a new project with Peripheral Tests Template. The question is : where I have to add my own code , does it in testperiph.c or in main.c ? Thanks for your Support Mr Jon.
  4. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, I got an answer for my question, Kindly , have a look : https://forums.xilinx.com/t5/Embedded-Development-Tools/Macros-end-by-U-in-XSDK/m-p/930465#M48062 Thanks
  5. Ahmed Alfadhel

    Source Code in SDK

    Hello @jpeyron, While I was checking IOMODULE Macros in xparameters.h file , I found many Macros ending with U , like these below: #define XPAR_IOMODULE_0_USE_GPI1 1U #define XPAR_IOMODULE_0_GPI1_SIZE 32U In fact I looked through pg111 and I knew the purpose of each these above Macros, but the "U" isn't not mentioned in the manual . For what stand the "U" ? Looking forward your explanation. Thanks in advance
  6. Ahmed Alfadhel

    Source Code in SDK

    Kindly @jpeyron, you adviced me to use this IP : https://forum.digilentinc.com/applications/core/interface/file/attachment.php?id=8967 and not that located in vivado library. Because you updated the IP core to work with SPI protocol. So, back to our point, I still need the "if" folder. Because it is missed in link above. Thank you for your active follow up Mr Jon.
  7. Ahmed Alfadhel

    Source Code in SDK

    HI @jpeyron, I checked PmodDA3_v1_0 folder , there is no "if" folder ! So , could you provide me with "if" folder that dedicated for the PmodDA3 ? Thanks in advance.
  8. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, Kindly, see the attached picture. I imported the IP as usual ! I am looking forward your reply. Thanks in advance.
  9. Ahmed Alfadhel

    Source Code in SDK

    Hello Mr @jpeyron, I clicked on validate my design button in Vivado , but a pop up message appeared , which is saying : " [BD 41-49] Could not find abstraction definition for the interface: Pmod_out " , as attached picture is showing that. Could, you tell me how to add the definition for Pmod interface (Pmod_out) , in order to suppress this critical warning? Thanks in advance
  10. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, I updated the code of main.c , I don't know how to write a code that transfer the Multiplier signal to PmodDA3 . Kindly, see the attached picture of my design. And I also pasted the main.c code. Looking forward your reply. /******************************************************************************/ /* File Description: */ /* */ /* This file defines a demonstration for the use of the PmodDA3 IP core. */ /* -------------------------------------------------------------------------- */ #include "xparameters.h" #include "xil_cache.h" #include "PmodDA3.h" void DemoInitialize(); void DemoRun(); void DemoCleanup(); void EnableCaches(); void DisableCaches(); PmodDA3 myDevice; int main(void) { //Xil_ICacheEnable(); //Xil_DCacheEnable(); DemoInitialize(); DemoRun(); DemoCleanup(); return 0; } void DemoInitialize() { EnableCaches(); DA3_begin(&myDevice, XPAR_PMODDA3_0_AXI_LITE_SPI_BASEADDR); } void DemoRun() { while(1) { // Send value from dout PIN to the DA converter // ???????????????????????????????????????????? } } void DemoCleanup() { DA3_end(&myDevice); DisableCaches(); } void EnableCaches() { #ifdef __MICROBLAZE__ #ifdef XPAR_MICROBLAZE_USE_ICACHE Xil_ICacheEnable(); #endif #ifdef XPAR_MICROBLAZE_USE_DCACHE Xil_DCacheEnable(); #endif #endif } void DisableCaches() { #ifdef __MICROBLAZE__ #ifdef XPAR_MICROBLAZE_USE_DCACHE Xil_DCacheDisable(); #endif #ifdef XPAR_MICROBLAZE_USE_ICACHE Xil_ICacheDisable(); #endif #endif } Thanks in advance
  11. Ahmed Alfadhel

    I need to use RAM

    Hello @jpeyron, Hello others, Kindly, could you check my design ? I want to know am I right or wrong ? could you tell me any suggestions in case I am wrong ? Thanks in advance.
  12. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, In case I made the required connections (taps) to test the SPI signals, how would I know they are rights or wrongs ? Is there a reference for SPI signals? Kind Regards.
  13. Ahmed Alfadhel

    Source Code in SDK

    Hi @jpeyron, I altered the main.c code in PmodDA3 IP core, that you attached. As follow : #include <stdio.h> #include "xparameters.h" #include "xil_cache.h" #include "PmodDA3.h" #include "xiomodule.h" void DemoInitialize(); void DemoRun(); // Parameters u32 data, DAC_writing; XIOModule gpo; // initialize our GPIO's data = XIOModule_Initialize(&gpo, XPAR_PMODDA3_0_DEVICE_ID); data = XIOModule_Start(&gpo); PmodDA3 myDevice; int main(void) { Xil_ICacheEnable(); Xil_DCacheEnable(); while(1) { XIOModule_DiscreteWrite(&gpo, 1, data); // Perform DAC Reading } DemoInitialize(); DemoRun(); return 0; } void DemoInitialize() { DA3_begin(&myDevice, XPAR_PMODDA3_0_AXI_LITE_GPIO_BASEADDR); } void DemoRun() { } Am I on right way ? And how to verify SPI signals on oscliioscpe ? Thank you Mr Jon.
  14. Ahmed Alfadhel

    Source Code in SDK

    Hi Mr Jon , It seems an experienced procedure. One thing is unclear for me. Which is you said I have to use an oscilloscope to verify SPI signals ! Do I need to SPI signals when using PmodDA3 module ? I am meaning that I am working with JA connector (GPIO) . Kindly, see the attached picture. And what is the procedure to verify SPI signals ? is there any reference to do that? thank u Mr Jon.
  15. Ahmed Alfadhel

    GPS Pmod

    Hi @HelplessGuy, this piece of code demonstrate how to perform UART I/O communications with your board. It test the switches , buttons , and LEDs status using Teraterm. /* Engineer : Jordan Christman @ Udemy * * * This file is a generated sample test application. * * This application is intended to test and/or illustrate some * functionality of your system. The contents of this file may * vary depending on the IP in your system and may use existing * IP driver functions. These drivers will be generated in your * SDK application project when you run the "Generate Libraries" menu item. * */ #include <stdio.h> #include <string.h> #include "xparameters.h" #include "xil_cache.h" #include "xiomodule.h" int main() { int done = 0; int byte_count = 0; int execute_cmd; char command[6]; char led_cmd[3]; char led_num[2]; u8 tmp_rx_buf; u8 rx_buf[40]; u32 button_data = 0; u32 switch_data = 0; u32 led_data = 0; u32 data; XIOModule iomodule; Xil_ICacheEnable(); Xil_DCacheEnable(); // Initialize module data = XIOModule_Initialize(&iomodule, XPAR_IOMODULE_0_DEVICE_ID); data = XIOModule_Start(&iomodule); data = XIOModule_CfgInitialize(&iomodule, NULL, 1); xil_printf("CFInitialize returned (0 = success) %d\n\r", data); print("---Enter a command---\n\r"); // While loop until user enters "finish" command while(done == 0) { execute_cmd = 0; memset(rx_buf, 0, sizeof(rx_buf)); byte_count = 0; // Build up message from UART Terminal while (execute_cmd == 0) { // Read UART data while ((data = XIOModule_Recv(&iomodule, &tmp_rx_buf, 1)) == 0); rx_buf[byte_count] = tmp_rx_buf; if (rx_buf[byte_count] == '\n') execute_cmd = 1; byte_count++; } // Build the command arrays memcpy(command, &rx_buf[0], 6); memcpy(led_cmd, &rx_buf[0], 3); memcpy(led_num, &rx_buf[4], 2); // Read the button & switch status button_data = XIOModule_DiscreteRead(&iomodule, 1); switch_data = XIOModule_DiscreteRead(&iomodule, 2); // Execute the received command if (strcmp(led_cmd, "led") == 0) { led_data = led_num[1] - 48; if ((led_num[0] - 48) == 1) led_data += 10; XIOModule_DiscreteWrite(&iomodule, 1, led_data); } else if (strcmp(command, "button") == 0) xil_printf("Button Status: %d\n\r", button_data); else if (strcmp(command, "switch") == 0) xil_printf("Switch Status: %d\n\r", switch_data); else if (strcmp(command, "finish") == 0) done = 1; else print("Command is invalid, re-enter below:\n\r"); // Debugging print outs below // print("Command: "); // print(command); // print("\n\r"); // // print("LED_cmd: "); // print(led_cmd); // print("\n\r"); // // print("LED_num: "); // print(led_num); // print("\n\r"); } print("---Exiting main---\n\r"); Xil_DCacheDisable(); Xil_ICacheDisable(); return 0; } hope will benefit from it.