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.

40 lines
919 B

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_next_event_4 is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_next_event_4;
  9. architecture psl of psl_next_event_4 is
  10. signal a, b, c : std_logic;
  11. signal d, e, f : std_logic;
  12. begin
  13. -- 0123456789012345
  14. SEQ_A : sequencer generic map ("_-_____-________") port map (clk, a);
  15. SEQ_B : sequencer generic map ("__----___--__-_-") port map (clk, b);
  16. SEQ_C : sequencer generic map ("_____-_________-") port map (clk, c);
  17. -- All is sensitive to rising edge of clk
  18. default clock is rising_edge(clk);
  19. -- This assertion holds
  20. NEXT_EVENT_0_a : assert always (a -> next_event(b)[4](c));
  21. -- Stop simulation after longest running sequencer is finished
  22. -- Simulation only code by using pragmas
  23. -- synthesis translate_off
  24. stop_sim(clk, 16);
  25. -- synthesis translate_on
  26. end architecture psl;