Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCL Poke commands in init_ddr() simulation function #458

Closed
rick-heig opened this issue Apr 17, 2019 · 2 comments
Closed

OCL Poke commands in init_ddr() simulation function #458

rick-heig opened this issue Apr 17, 2019 · 2 comments

Comments

@rick-heig
Copy link

There seem to be artefacts from the DRAM DMA example in the init_ddr() function in the file
/hdk/common/verif/include/sh_dpi_tasks.svh

Lines 211 to 216

      //de-select the ATG hardware

      poke_ocl(.addr(64'h130), .data(0));
      poke_ocl(.addr(64'h230), .data(0));
      poke_ocl(.addr(64'h330), .data(0));
      poke_ocl(.addr(64'h430), .data(0));

This seems unrelated to initializing the DDR, I came accross this while trying to simulate a project that made use of the DDR but did not use the OCL bus.

I could run my project by removing those lines.

If they are only related to the DRAM DMA example it could be better to remove them and add call them from the DRAM DMA code instead of the init_ddr() function. Or I could be mistaken and every project/design should have the ATG for the DDR modules ?

In my previous designs with the DDR I manually called the following lines during simulation

      power_up(.clk_recipe_a(ClockRecipe::A1),
                  .clk_recipe_b(ClockRecipe::B0),
                  .clk_recipe_c(ClockRecipe::C0));

      nsec_delay(1000);
      poke_stat(.addr(8'h0c), .ddr_idx(0), .data(32'h0000_0000));
      poke_stat(.addr(8'h0c), .ddr_idx(1), .data(32'h0000_0000));
      poke_stat(.addr(8'h0c), .ddr_idx(2), .data(32'h0000_0000));

But since there is a init_ddr() function in a common file for verification, it would be nice if it was be generic and initialize the DDR without doing OCL bus accesses. This way people could simply call init_ddr(). Also if people use the OCL bus in their design for other purposes these accesses could do unintended things.

Regards

@deeppat
Copy link
Contributor

deeppat commented Apr 17, 2019

Hello! Thanks for providing feedback and we'll incorporate this change in our next major release.

AWSaalluri added a commit that referenced this issue May 13, 2019
* New functionality:
    * Improved AFI load times for pipelined accelerator designs. For more details please see [Amazon FPGA image (AFI) pre-fetch and caching features](./hdk/docs/load_times.md).

 * Ease of Use features:
    * [Improved SDK Error messaging](./sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c)
    * [Improved documentation](./hdk/docs/IPI_GUI_Vivado_Setup.md#switching-between-hdk-and-hlx-flows) to help with transition from [HLX to HDK command line flows](https://forums.aws.amazon.com/thread.jspa?threadID=302718&tstart=0) and vice versa
    * Incorporates feedback from [aws-fpga Issue 458](#458) by making the ```init_ddr``` function, used in design simulations to initialize DDR, more generic by moving out ATG deselection logic to a new ```deselect_atg_hw``` task

 * Bug Fixes:
    * Fixed Shell simulation model (sh_bfm) issue on PCIM AXI read data channel back pressure which was described in HDK 1.4.8 Errata.
    * Fixed HDK simulation example which [demonstrates DMA and PCIM traffic in parallel](./hdk/cl/examples/cl_dram_dma/verif/tests/test_dma_pcim_concurrent.sv).
deeppat pushed a commit that referenced this issue May 14, 2019
* New functionality:
    * Improved AFI load times for pipelined accelerator designs. For more details please see [Amazon FPGA image (AFI) pre-fetch and caching features](./hdk/docs/load_times.md).

 * Ease of Use features:
    * [Improved SDK Error messaging](./sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c)
    * [Improved documentation](./hdk/docs/IPI_GUI_Vivado_Setup.md#switching-between-hdk-and-hlx-flows) to help with transition from [HLX to HDK command line flows](https://forums.aws.amazon.com/thread.jspa?threadID=302718&tstart=0) and vice versa
    * Incorporates feedback from [aws-fpga Issue 458](#458) by making the ```init_ddr``` function, used in design simulations to initialize DDR, more generic by moving out ATG deselection logic to a new ```deselect_atg_hw``` task

 * Bug Fixes:
    * Fixed Shell simulation model (sh_bfm) issue on PCIM AXI read data channel back pressure which was described in HDK 1.4.8 Errata.
    * Fixed HDK simulation example which [demonstrates DMA and PCIM traffic in parallel](./hdk/cl/examples/cl_dram_dma/verif/tests/test_dma_pcim_concurrent.sv).
@deeppat
Copy link
Contributor

deeppat commented May 16, 2019

Hi @rick-heig We've added a deselect_atg_hw task to make this step easier for you.

Thank you for providing feedback here! I'm closing this issue for now, but feel free to reach out to us for any other issues/suggestions you may have!

-Deep

@deeppat deeppat closed this as completed May 16, 2019
AWSaalluri added a commit that referenced this issue Jul 30, 2019
* New functionality:
    * Improved AFI load times for pipelined accelerator designs. For more details please see [Amazon FPGA image (AFI) pre-fetch and caching features](./hdk/docs/load_times.md).

 * Ease of Use features:
    * [Improved SDK Error messaging](./sdk/userspace/fpga_libs/fpga_mgmt/fpga_mgmt.c)
    * [Improved documentation](./hdk/docs/IPI_GUI_Vivado_Setup.md#switching-between-hdk-and-hlx-flows) to help with transition from [HLX to HDK command line flows](https://forums.aws.amazon.com/thread.jspa?threadID=302718&tstart=0) and vice versa
    * Incorporates feedback from [aws-fpga Issue 458](#458) by making the ```init_ddr``` function, used in design simulations to initialize DDR, more generic by moving out ATG deselection logic to a new ```deselect_atg_hw``` task

 * Bug Fixes:
    * Fixed Shell simulation model (sh_bfm) issue on PCIM AXI read data channel back pressure which was described in HDK 1.4.8 Errata.
    * Fixed HDK simulation example which [demonstrates DMA and PCIM traffic in parallel](./hdk/cl/examples/cl_dram_dma/verif/tests/test_dma_pcim_concurrent.sv).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants