Ahmed Alfadhel Posted January 2, 2019 Share Posted January 2, 2019 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 . Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 15, 2019 Author Share Posted January 15, 2019 On 1/3/2019 at 12:35 AM, jpeyron said: Hi @Ahmed Alfadhel, Looking through your previous post it appears that I gave you an incorrect generic IP core. The Pmod DA3 communicates through SPI as shown on the Pmod DA3 resource center here and not through GPIO. I have attached the correct generic SPI IP Core below. J6 is a SPI connector typically associated with the Arduino/Chipkit header and used with a shield like the MTDS. Most of the Digilent SPI Pmod IP Cores are designed to use SPI through the Pmod Ports instead of the J6 connector. thank you, Jon PmodDA3_v1_0.zip 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. Link to comment Share on other sites More sharing options...
jpeyron Posted February 25, 2019 Share Posted February 25, 2019 Hi @Ahmed Alfadhel, You can ignore these warnings. They are just saying that these IP components were made with other FPGA's. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted February 24, 2019 Author Share Posted February 24, 2019 Hello @jpeyron, When I run the implementation at Vivado IDE, I got two critical warnings related to PmodDA3 module, these critical warning as indicated in below picture. Can I just neglect them? Or I have to fix them? Thanks in advance, Link to comment Share on other sites More sharing options...
jpeyron Posted February 11, 2019 Share Posted February 11, 2019 Hi @Ahmed Alfadhel, WriteSPI = Writes the byte array to the chip via SPI. It will write the first byte into the specified register, then the next into the following register until all of the data has been sent. WriteByte = Only writes a single byte over SPI I believe you should be able to use either function It depends on how you are wanting to transfer data. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted February 9, 2019 Author Share Posted February 9, 2019 Hello @jpeyron, What is the difference between these two: void DA3_WriteByte(&myDevice, u8 cmd); void DA3_WriteSPI(&myDevice, u8 reg, u8 *wData, int nData); I want to oscilloscope a DAC signal using my Arty 7 and Pmod DA3, which function sould I use ? does it DA3_WriteByte or DA3_WriteSPI ? Link to comment Share on other sites More sharing options...
jpeyron Posted January 21, 2019 Share Posted January 21, 2019 Hi @Ahmed Alfadhel, The most current version of the xbram examples I believe are here. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 19, 2019 Author Share Posted January 19, 2019 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. Link to comment Share on other sites More sharing options...
jpeyron Posted January 17, 2019 Share Posted January 17, 2019 Hi @Ahmed Alfadhel, My understanding is that you should be able to use the brams functions on you original projects "main.c.". I had suggest to make the xilinx example to be able to look at the way they use the function so you can better use them in your project. I would suggest to try and see what happens. Neither Xilinx or I have the exact hardware project that you are working on to verify our suggestions. This might be a situation where you will need to spend some time evaluation what is going on in your hardware and c application. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 17, 2019 Author Share Posted January 17, 2019 1 hour ago, jpeyron said: Hi @Ahmed Alfadhel, Once you have looked through the xilinx example for the bram then I believe you should be using the bram code used in the testperiph.c file to help you with interacting with the bram in your main.c. thank you, Jon 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. Link to comment Share on other sites More sharing options...
jpeyron Posted January 17, 2019 Share Posted January 17, 2019 Hi @Ahmed Alfadhel, Once you have looked through the xilinx example for the bram then I believe you should be using the bram code used in the testperiph.c file to help you with interacting with the bram in your main.c. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 17, 2019 Author Share Posted January 17, 2019 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. Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 17, 2019 Author Share Posted January 17, 2019 20 hours ago, jpeyron said: Hi @Ahmed Alfadhel, With a quick search I found on page 62 of the Native High-Speed I/O Interfaces it describes U. I believe that this idea is part of their #define for U. I would also suggest to reach out the Xilinx about this. I did a search for #define U with no results so I would guess that the #define U is not publicly shared by Xilinx. thank you, Jon 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 Link to comment Share on other sites More sharing options...
jpeyron Posted January 16, 2019 Share Posted January 16, 2019 Hi @Ahmed Alfadhel, With a quick search I found on page 62 of the Native High-Speed I/O Interfaces it describes U. I believe that this idea is part of their #define for U. I would also suggest to reach out the Xilinx about this. I did a search for #define U with no results so I would guess that the #define U is not publicly shared by Xilinx. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 16, 2019 Author Share Posted January 16, 2019 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 Link to comment Share on other sites More sharing options...
jpeyron Posted January 15, 2019 Share Posted January 15, 2019 Hi @Ahmed Alfadhel, Sorry for the confusion. You should add the PmodDA3 into the vivado library in vivado library folder: vivado-library\ip\Pmods downloaded from here. Here is the Getting Started with Digilent Pmod IPs tutorial that should help explain more about the IPs. thank you, Jon Link to comment Share on other sites More sharing options...
jpeyron Posted January 15, 2019 Share Posted January 15, 2019 Hi @Ahmed Alfadhel, Please attach a screen shot of the IP repository by double clicking into settings under project manager and selecting IP and repository. I have attached a screen shot of this as well as the contents of the vivado library folder below. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 15, 2019 Author Share Posted January 15, 2019 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. Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 15, 2019 Author Share Posted January 15, 2019 Hi @jpeyron, Kindly, see the attached picture. I imported the IP as usual ! I am looking forward your reply. Thanks in advance. Link to comment Share on other sites More sharing options...
jpeyron Posted January 15, 2019 Share Posted January 15, 2019 Hi @Ahmed Alfadhel, You need to make sure the ip repository is linked to the whole Vivado Library folder which includes the if and ip folders and not just the ip folder. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 15, 2019 Author Share Posted January 15, 2019 On 1/3/2019 at 12:35 AM, jpeyron said: Hi @Ahmed Alfadhel, Looking through your previous post it appears that I gave you an incorrect generic IP core. The Pmod DA3 communicates through SPI as shown on the Pmod DA3 resource center here and not through GPIO. I have attached the correct generic SPI IP Core below. J6 is a SPI connector typically associated with the Arduino/Chipkit header and used with a shield like the MTDS. Most of the Digilent SPI Pmod IP Cores are designed to use SPI through the Pmod Ports instead of the J6 connector. thank you, Jon PmodDA3_v1_0.zip 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 Link to comment Share on other sites More sharing options...
jpeyron Posted January 9, 2019 Share Posted January 9, 2019 Hi @Ahmed Alfadhel, I believe you should be able to read the data from the multiplier and the constant in the bram and send it out through the PmodDA3. For the BRAM you should use the functions in 'xil_io.h'. Xil_out8, Xil_Out16, Xil_Out32 to write Xil_in8, Xil_in16, Xil_in32 to read then you need to find the address of your BRAM -> check xparameters.h and for the PmodDA3 you will want to do something similar to the PmodDA1 main.c here. DA1_WritePhysicalValue(&myDevice, dValue); So you will need to put the bram value in place of dValue in the above function. You will need a function similar to DA1_WritePhysicalValue in PmodDA3.c and PmodDA3.h Hopefully this gets you going in the right direction! Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 8, 2019 Author Share Posted January 8, 2019 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 Link to comment Share on other sites More sharing options...
jpeyron Posted January 7, 2019 Share Posted January 7, 2019 Hi @Ahmed Alfadhel, Here is a basic explanation of SPI communication. Here is the AXI Quad SPI v3.2 LogiCORE IP Product Guide, Here is the Pmod DA3 resource center that shows the pin out. By looking at the datasheet and the arduino code you should be able to see how the spi communication works for this specific Pmod. thank you, Jon Link to comment Share on other sites More sharing options...
Ahmed Alfadhel Posted January 6, 2019 Author Share Posted January 6, 2019 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. Link to comment Share on other sites More sharing options...
jpeyron Posted January 4, 2019 Share Posted January 4, 2019 Hi @Ahmed Alfadhel, I would suggest looking at the Pmod DA1 here as an example for the Pmod DA3 main.c PmodDA3.h and PmodDA3.c . The arduino code and datasheet linked on the Pmod DA3 resource center here will help with configuring the DA3_SPIInit(). I use a bread board to gain access to the signals going from and to the Pmod DA3 to the Pmod port. I use the logic analyzer function of our Analog Discovery 2 to see what is happening if I am having problems communicating with the PmodDA3. thank you, Jon Link to comment Share on other sites More sharing options...
Question
Ahmed Alfadhel
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 .
Link to comment
Share on other sites
29 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.