Hi Adzim,
Thank you for your suggestions. I have resent the counter.v to you via e-mail.
I doubt that I could not express my question well in my last message. Now, I have a narrow downed version of my problem regarding the Platform Designer System, as listed below.
As I am working to modify the PCIe DMA transfer example design given by Terasic. I would like to summarize the entire process and I would like to know anything I did introduced compilation error.
1) Copied the Terasic PCIe DMA transfer example design to a working directory PCIe_DDR4 (DE5a-Net DDR4 Edition CD-ROM/Demonstrations/PCIe_DDR4 (https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=228&No=1108&PartNo=4#contents)
2) Used DE5A_NET.qpf as my quartus project file and opened it in Quartus Prime Pro. Then launched Platform Designer System and opened the ep_g3x8_avmm256_integrated.qsys. Added Avalon FIFO IP and custom generated IP for the counter (of which verilog file file sent to you). Followed steps like System Sync Info, Validate System Integrity and generating HDL. When I turn on the simulation option in the Generate HDL GUI (turn on means selecting VHDL/Verilog option. Turned off means selecting none for the simulation option and keeping just ) I gets some error (attached error_simulation.PNG). But when just Synthesis option= Verilog and simulation= none, no error. I am aware that this is something related to counter code which is synthesis-able only. Do you have any suggestion regarding how to make a custom IP out-of counter.v code that is compatible for both synthesis and simulation?
Schematic view of the modified ep_g3x8_avmm256_integrated (pls see file block_symbol_file.pdf ) is attached to see how the new components are added to the existing ep_g3x8_avmm256_integrated
3) I assume the Generate HDL option instantiates IP's and verilog code for individual design components?. Also in PCIe/DDR4/ep_g3x8_avmm256_integrated/synthesis we gets an updated verilog file with all components of the design ep_g3x8_avmm256_integrated.v (I have e-mailed this file) .
4) Then I came back quartus project DE5A_NET.qpf and added counter.v to the project. We can see ep_g3x8_avmm256_integrated.v is listed under ep_g3x8_avmm256_integrated.qsys in the quartus project (please see Image1.PNG and Image2.PNG).
5) The pin assignment is not needed as my modified design does not have any additional external interface that should be assigned (just kept whatever assigned by default). This project compiles fine (keeping DE5A_NET.v as a top-level entity) and it takes ~30 mins to finish. Using the DE5A_NET.sof file created in PCIe_DDR4/output_files, I have programmed the FPGA board. But when trying to access the data from the host PC using DMA Read API, I am getting same result (Capture2.PNG) as I mentioned in my message on dated 04-17-2023. Please note that even-though I have modified my counter code, I am getting something similar to what I got earlier.
6) On this ground, I am bit confused that any modification that I have to do explicitly in the DE5A_NET.v (which is taken as my top-level design entity)?. I would like to know whether the changes I made in Platform Designer System (here modified ep_g3x8_avmm256_integrated.qsys) will get into DE5A_NET.v?. If so could you explain how that happens?
{Or I have to use ep_g3x8_avmm256_integrated/sysnth/ep_g3x8_avmm256_integrated.v as top-level entity?. I would like to report that, when I try set as "top-level entity entity" option on this in Platform Designer ->Project Navigator->Files, the top-level entity label is visible on ep_g3x8_avmm256_integrated.qsys instead of ep_g3x8_avmm256_integrated/sysnth/ep_g3x8_avmm256_integrated.v. (I am curious that its due to ep_g3x8_avmm256_integrated/sysnth/ep_g3x8_avmm256_integrated.v has some dependency to ep_g3x8_avmm256_integrated.qsys in Platform Designer ->Project Navigator->Files?). Also from your last reply, I understood that I cannot use ep_g3x8_avmm256_integrated.qsys as my top-level entity.
I tried adding ep_g3x8_avmm256_integrated.v directly to the project (not like as a component under ep_g3x8_avmm256_integrated.qsys by default. For this I just copied the file to the project directory and set it as top-level entity and compiled). All these gives error Capture3.PNG.}
Please let me know if anything is missing or I did something that I am not suppose to do to get a modified design (Counter + FIFO + PCIe DMA transfer example design) working. I have emailed you the files DE5A_NET.v , ep_g3x8_avmm256_integrated.qsys , counter.v ,ep_g3x8_avmm256_integrated.v, hoping these may be helpful for you to address my questions.Thank you very much.