Forum Discussion
Altera_Forum
Honored Contributor
8 years agoWhy my self-defined QSys component does not have the same speed as on-chip memory ?
I am having a PCIe project based on QSys that have on-chip memory component and my self-defined component and a PCIe IP core connected on Avalon bus. I just want to check out what speed between PC pr...
Altera_Forum
Honored Contributor
8 years agoThank you very much for you reply.
That code is not the final version, it is used only for checking out the maximum speed can this ip reach, the register "bc" must have problem, but I think it should be OK for testing now. Actually I don't really need burst, what I want is to make my ip can be fast as on-chip memory ip, and the counter is only for test too, I just want to PC program can receive some data to verify the ip is working. Following is the code, can you help me to modify it to make it fast? Thank you. reg [31:0] mydata; reg [7:0] bc, bc1, bc2, bc3, bc4; always @(posedge clock) begin if (!resetn) begin mydata <= 0; avalon_readdatavalid <= 1'b0; end else begin if (avalon_read) begin bc <= avalon_burstcount; end else begin //avalon_readdatavalid <= 1'b0; end if (bc > 32'h0) begin mydata <= mydata + 1; avalon_readdatavalid <= 1'b1; bc <= bc - 1; end else avalon_readdatavalid <= 1'b0; end end