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

Support for SVA Local Variables #114

Open
dh73 opened this issue Sep 8, 2020 · 1 comment
Open

Support for SVA Local Variables #114

dh73 opened this issue Sep 8, 2020 · 1 comment

Comments

@dh73
Copy link

dh73 commented Sep 8, 2020

Using local variables in properties causes a Verific error such as the following one:

  • Current result: Verific is not able to elaborate the design.
    base: ERROR: Verific SVA primitive sva_match_item_trigger (i30) is currently unsupported in this context at <source_file>.<line>

  • Expected result: The property should pass.
    The property "sva_local.ap_check_datapath" was proven in X s.

Local variables are powerful SVA constructs that helps reduce the need of helper logic (auxiliar FSMs and other supporting logic).
Consider the example property using local variables, attached in this issue for a simple PISO register:

   /* The local variables idx and data_i                                                                                                                                                                           
    * are used to store the data at the output, and reconstruct                                                                                                                                                    
    * the value in the data_i register, to check datapath value */
   property check_val;
      logic [$bits(data)-1:0] idx;
      logic [7:0] data_i;
      (load, idx = 0) |-> ##1 (!load, data_i[idx]=data_out, idx++)[*8] ##1 data_i == data;
   endproperty

Both idx and data_i local variables store certain values for late evaluation. In this specific case, the assertion assembles by itself the value to check after 8 clock cycles, instead of using explicit helper logic.

@mmicko
Copy link
Member

mmicko commented Sep 21, 2020

At least some better error message is now displayed by YosysHQ/yosys@4470510
Implementing this feature would require some major rework to support.

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