Forum Discussion

amildm's avatar
amildm
Icon for Contributor rankContributor
3 years ago

SDC directives in HDL

Hi All,

Is it possible to add the SDC directives (e.g. set_false_path) directly in HDL?

Thank you!

10 Replies

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Hello,

    a simple example. You have a synchronizer register in a VHDL entity and want a set_false_path statement added for each instance in the design automatically. As SDC uses hierarchical object names, the entity name must be unique.

    ARCHITECTURE rtl OF ce_sync IS
       SIGNAL ce_toggle  : STD_LOGIC := '0';
    
    attribute altera_attribute : string;
    attribute altera_attribute of rtl : architecture is 
       "-name SDC_STATEMENT ""set_false_path -from [get_registers *ce_sync:*|ce_toggle]""";
    

    Multiple SDC statements can be placed in the attribute statement by string concatenation.

    Regards

    Frank

    • amildm's avatar
      amildm
      Icon for Contributor rankContributor

      Could the same be done for Verilog as well? What's the syntax?

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Guess you should follow the instructions in Quartus manual "Apply altera_attribute to an Entity". Example:

    (* altera_attribute = "-name AUTO_SHIFT_REGISTER_RECOGNITION OFF" 
    *) module my_entity(…) ;
    • amildm's avatar
      amildm
      Icon for Contributor rankContributor

      should I add it BEFORE the module declaration, not INSIDE of the module?

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    There's different syntax for Verilog-1995 and Verilog-2001/SystemVerilog. The latter places the attribute before the module declaration. Please review the user manual.

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    In addition, I found a copy of an old Altera Solution that's no longer available.

    • amildm's avatar
      amildm
      Icon for Contributor rankContributor

      I would suppose that the scope of the altera_attribute is the hierarchy/module where it appears, it cannot go through hierarchies ....

  • Nurina's avatar
    Nurina
    Icon for Regular Contributor rankRegular Contributor

    Hello,


    Yes that is correct. I believe it's because the altera_attribute option is added to the project by Quartus during synthesis, meaning that it's added the same time the hierarchy is formed and compiled.


    Do you have anymore questions?


    Regards,

    Nurina


  • Nurina's avatar
    Nurina
    Icon for Regular Contributor rankRegular Contributor

    Hello,


    We do not receive any response from you on the previous reply provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


    p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution, give Kudos and rate 10/10 survey


    Regards,

    Nurina