• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Bind SVA to VHDL Enumerated Type

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 65
  • Views 14316
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bind SVA to VHDL Enumerated Type

rlanier
rlanier over 11 years ago
Hi,

I’m writing SystemVerilog assertions to check a VHDL state machine, and I need to bind the assertions to the VHDL component. What is unclear is how should I write the module port list? For example, the assertion should looks something like this:
 
property p_state_chk;

  @(posedge clk)

    state == ST2 |-> $past(state,1) == ST1;

endproperty
 

The signal state is defined as an enumerated state in the VHDL source, similar to the following:
 

type state_type is (ST1, ST2, ST3);

  -- signal declarations

  signal state   : state_type;
 I've declared a port in the assertion module similar to the following: package enum_pkg;
  typedef enum {ST1,ST2,ST3} smpl_st_t;
endpackage module comp_chk (clk,state);  input clk;
  input enum_pkg::smpl_st_t state;endmodule The binding is accomplished like this: bind comp comp_chk u_comp_chk (.clk(clk),.state(state));

However, I continue to get elaboration errors (E,CFMPTC). How can I bind the above assertion to the VHDL enumerated type? Is the enumerated type in the assertion module defined as a string, and bound to the VHDL component? Is using $nc_mirror an option?

Thanks,

Tony
  • Cancel
  • Tudor Timi
    Tudor Timi over 11 years ago

    The manual mentions declaring enumerations that will be bound to VHDL as 'enum integer'. Try changing to

    typedef enum integer {ST1, ST2, ST3} smpl_st_t;

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information