• 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. PSL endpoints and ended()

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 64
  • Views 18456
  • 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

PSL endpoints and ended()

archive
archive over 18 years ago

I need to write a property that states if conditon A occurs then SeqA or SeqB must have occured.

The PSL built-in ended() is not supported in IFV 5.7-s5.  So, I can't do either of these:
always {A} |-> {ended(SeqA) | ended(SeqB)}
 
never (A & ~(ended(SeqA) | ended(SeqB))

Also, I get this error when calling SeqA and SeqB endpoints.
endpoint SeqA ...
endpoint SeqB ...

always {A} |-> {SeqA | SeqB}
                   |
"Endpoints and sequences are illegal as verilog operands."

Does anyone have another idea how this can be done?

Thanks,

Ross



Originally posted in cdnusers.org by weberrm
  • Cancel
  • archive
    archive over 18 years ago

     Perhaps

    // psl endpoint SeqA = {p; q};

    // psl endpoint SeqB = {r ;s};

    // psl assert always ({a} |-> {{SeqA} | {SeqB}});

    will work.

    Explicitly have braces to identify that the | is a sequence or operator and not a verilog or operator.  


    Originally posted in cdnusers.org by vtaylorcva
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    You can solve this problem by using "satellite" HDL-Code: define a HDL-signal which becomes active, if SeqA ends and define a HDL-signal which becomes active if SeqB ends. Then you can use these signals in your PSL-Assertion. Because I guess there is some time needed until the end of SeqA or SeqB you have to insert some "time" by using "[*]":
    always {A} |-> {[*];sig_if_SeqA_ends | sig_if_SeqB_ends}
    Hope this helps,
    Matthias


    Originally posted in cdnusers.org by Matthias Schweikart
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Thanks,

    This works:
    //psl assert always( {a} |-> {{SeqA} | {SeqB}} )@(posedge clk);

    This still gets the error:
    //psl assert never( {a} & ~({SeqA} | {SeqB}) )@(posedge clk);
                                    |
    ncvlog: *E,PSVERO (test.v,9|32): Endpoints and sequences are illegal as verilog operands.  Check sequence composition syntax.

    I guess I'll go with the always...


    Originally posted in cdnusers.org by weberrm
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    I think it would be very usefull to support enpoints (or ended() ) as a boolean in the modeling layer of PSL. That way, a PSL-sequence endpoint can trigger a VHDL/Verilog process. It would also create a "workaround" for (SV-)action-block like behavior.


    Originally posted in cdnusers.org by stijn
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    I think that the "endpoint" in PSL has been dropped from the latest IEEE standard. We have it in our parser for backwards compatibility.

    The "ended()" function from the PSL standard takes a sequence as a parameter and returns a boolean as a result. Here is the code from a sample Vunit file that I put together to observe the behavior when support for the ended() function first came out in IUS 5.7.

    vunit testended ( testit ) {
    default clock = posedge clk;
    sequence abc_seq = { a; b; c }@(posedge clk);
    p_ended: assert always { ended(abc_seq) } |=> { d };
    endpoint abc_ep = { a; b; c };
    p_endpt: assert always abc_ep -> next d;
    always @(posedge ended(abc_seq)) $display($time,,"a;b;c has ended");
    wire y;
    assign y = ended(abc_seq);
    }

    So, you can use "ended()" in a property or sequence and pass it a sequence name. You can use it to affect the HDL behavior. The rest of the discussion here seems to be around syntax issues, making sure that you use sequences where sequences are legal and booleans where they are legal. Keeping you parentheses and braces correct can be confusing, but it is necessary.


    Originally posted in cdnusers.org by TAM
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Thans for your reply, I was using ius5.6 until recently wher ended() was not supported and endpoint could not be assigend to a signal (boolean). I will retry with 5.7 and ended().


    Originally posted in cdnusers.org by stijn
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Me again.
    I tried what you proposed (but using VHDL) with IUS 5.7-p001. I doesn' t work :
    in my vunit I have :
    sequence spi_transfer_start is {fell(spi_e_csn)} ;
    signal spi_transfer_start_cycle : boolean;
    spi_transfer_start_cycle <= ended(spi_transfer_start);

    When I compile it gives :

    ncvhdl: 05.70-p001: (c) Copyright 1995-2006 Cadence Design Systems, Inc.
    spi_transfer_start_cycle <= ended(spi_transfer_start);
    |
    ncvhdl_p: *E,IDENTU (/projects/erip/eripsae/SPI_E/VHDL/spi_e.psl,689|32): identifier (ENDED) is not declared [10.3].
    make: *** [/projects/erip/eripsael/SPI_E/LIB/spi_e/entity/pc.db] Error 1
    make: Target `VHDLTOP' not remade because of errors.


    Is there no support (forseen?) for ended() in the VHDL-flavor of PSL? Or am I missing something?

    Thanks,

    Stijn


    Originally posted in cdnusers.org by stijn
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Hi,

    I guess your problem is that you wnat to assign an endpoint to a signal outside of a property. Afaik ended can only be used in the context of an assertion. Your assignment is not in this context.

    Joerg.


    Originally posted in cdnusers.org by jmueller
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Joerg,

    In TAM's example, there is an assignement outside a property which appears to work :


    wire y;
    assign y = ended(abc_seq);


    I expect ( and want to use) the same in VHDL.

    Stijn


    Originally posted in cdnusers.org by stijn
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Hmm, right, but he is using it inside a vunit. Are you using it outside of a vunit?


    Originally posted in cdnusers.org by jmueller
    • 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