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.

45 lines
1.0 KiB

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_endpoint is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_endpoint;
  9. architecture psl of psl_endpoint is
  10. signal a, b : std_logic;
  11. signal c, d : std_logic;
  12. begin
  13. -- 01234567890123
  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. SEQ_D : sequencer generic map ("____________-_") port map (clk, d);
  18. -- All is sensitive to rising edge of clk
  19. default clock is rising_edge(clk);
  20. -- only endpoint in psl comment works
  21. -- psl endpoint ENDPOINT_1_e is {a; b[*3]; c};
  22. -- This assertion holds
  23. ASSERT_a : assert always (ENDPOINT_1_e <-> d);
  24. -- Stop simulation after longest running sequencer is finished
  25. -- Simulation only code by using pragmas
  26. -- synthesis translate_off
  27. stop_sim(clk, 14);
  28. -- synthesis translate_on
  29. end architecture psl;