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.

48 lines
920 B

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_sere is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_sere;
  9. architecture psl of psl_sere is
  10. signal a, b : std_logic;
  11. begin
  12. -- 012345
  13. SEQ_A : sequencer generic map ("--____") port map (clk, a);
  14. SEQ_B : sequencer generic map ("_-____") port map (clk, b);
  15. -- All is sensitive to rising edge of clk
  16. default clock is rising_edge(clk);
  17. -- This assertion holds
  18. SERE_0_a : assert {a};
  19. -- This assertion holds
  20. SERE_1_a : assert {a; a};
  21. -- This assertion holds
  22. SERE_2_a : assert {a; a and b};
  23. -- This assertion doesn't hold at cycle 2
  24. SERE_3_a : assert always {a; a};
  25. -- Stop simulation after longest running sequencer is finished
  26. -- Simulation only code by using pragmas
  27. -- synthesis translate_off
  28. stop_sim(clk, 6);
  29. -- synthesis translate_on
  30. end architecture psl;