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
869 B

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_eventually is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_eventually;
  9. architecture psl of psl_eventually is
  10. signal a, b : std_logic;
  11. begin
  12. -- 0123456789012345
  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. -- This assertion leads to a GHDL synthesis crash with bug report
  19. EVENTUALLY_a : assert always (a -> eventually! b);
  20. -- Stop simulation after longest running sequencer is finished
  21. -- Simulation only code by using pragmas
  22. -- synthesis translate_off
  23. stop_sim(clk, 16);
  24. -- synthesis translate_on
  25. end architecture psl;