Examples of using PSL for functional and formal verification of VHDL with GHDL (and SymbiYosys)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_sere_non_len_matching_and is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_sere_non_len_matching_and;
  9. architecture psl of psl_sere_non_len_matching_and is
  10. signal req, done0, done1, done2, ack : std_logic;
  11. begin
  12. -- 01234567890
  13. SEQ_REQ : sequencer generic map ("_-_________") port map (clk, req);
  14. SEQ_DONE0 : sequencer generic map ("______-____") port map (clk, done0);
  15. SEQ_DONE1 : sequencer generic map ("________-__") port map (clk, done1);
  16. SEQ_DONE2 : sequencer generic map ("____-______") port map (clk, done2);
  17. SEQ_ACK : sequencer generic map ("_________-_") port map (clk, ack);
  18. -- All is sensitive to rising edge of clk
  19. default clock is rising_edge(clk);
  20. -- Non length matching AND three SERE
  21. -- Each of done0, done1 & done2 has to hold a cycle after
  22. -- req holded. Transfer is ended by ack holding one cycle
  23. -- after last done holded
  24. -- This assertion holds
  25. SERE_0_a : assert always {req} |=> {{done0[->] & done1[->] & done2[->]}; ack};
  26. -- Stop simulation after longest running sequencer is finished
  27. -- Simulation only code by using pragmas
  28. -- synthesis translate_off
  29. stop_sim(clk, 11);
  30. -- synthesis translate_on
  31. end architecture psl;