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

Bug in PCIM interface model? #589

Open
nmoroze opened this issue Nov 29, 2022 · 3 comments
Open

Bug in PCIM interface model? #589

nmoroze opened this issue Nov 29, 2022 · 3 comments

Comments

@nmoroze
Copy link

nmoroze commented Nov 29, 2022

Hi, I think I may have found a bug in the PCIM interface model in sh_bfm.sv. The problematic logic (with lines omitted for clarity) is the following:

      if (sh_cl_rd_data.size() != 0) begin
         // ...
         sh_cl_pcim_rvalid <= !sh_cl_pcim_rvalid ? 1'b1 :
                                 !cl_sh_pcim_rready ? 1'b1 :
                                 !sh_cl_pcim_rlast  ? 1'b1 : 1'b0;
         // ...
         beat = {512{1'b1}};

       if (cl_sh_pcim_rready) begin
         // set beat ... 
         sh_cl_pcim_rdata <= beat;
       end //if(cl_sh_pcim_rready)
      end

When a new read request is received from the CL, the SH model sets sh_cl_pcim_rvalid to 1 on the next cycle. However, it doesn't actually put data into sh_cl_pcim_rdata unless cl_sh_pcim_rready is asserted. If the CL has already set rready high before the read request goes through, then this logic works fine. However, if rready is asserted after rvalid goes high, then the data becomes valid a cycle late. I believe this violates the AXI handshake protocol, since the data needs to be valid on the positive edge that rvalid and rready are high.

Does that sound right to you?

Thanks!

@AWSjoeluc
Copy link

Hi Noah,

Thanks for reaching out to AWS on this issue. Can you please provide a response to the following questions?

  1. Did you observe any unexpected behavior in your simulations with this sh_bfm.sv?
  2. If so, were you using a CL provided by AWS or your own CL design?

Thanks!
-Joe

@AWSjoeluc
Copy link

Hi Noah,

We were able to reproduce the issue you described above. We're currently working on a fix and will let you know when it's released!

Thank you so much!
-Joe

@nmoroze
Copy link
Author

nmoroze commented Dec 14, 2022

Thank you very much! In case the replies to your previous queries are still useful: yes, I did observe unexpected behavior and I was using my own CL design.

Let me know if there's any other information I can provide that would be useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants