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.

55 lines
1.3 KiB

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_next_3 is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_next_3;
  9. architecture psl of psl_next_3 is
  10. signal a, b : std_logic;
  11. signal c, d : std_logic;
  12. signal e, f : std_logic;
  13. begin
  14. -- 01234567890
  15. SEQ_A : sequencer generic map ("__-_-______") port map (clk, a);
  16. SEQ_B : sequencer generic map ("_____-_-___") port map (clk, b);
  17. -- 01234567890
  18. SEQ_C : sequencer generic map ("__-_-______") port map (clk, c);
  19. SEQ_D : sequencer generic map ("_____-_____") port map (clk, d);
  20. -- 01234567890
  21. SEQ_E : sequencer generic map ("__-_-______") port map (clk, e);
  22. SEQ_F : sequencer generic map ("_____-----_") port map (clk, f);
  23. -- All is sensitive to rising edge of clk
  24. default clock is rising_edge(clk);
  25. -- This assertion holds
  26. NEXT_0_a : assert always (a -> next[3] (b));
  27. -- This assertion doesn't hold at cycle 7
  28. NEXT_1_a : assert always (c -> next[3] (d));
  29. -- This assertion holds
  30. NEXT_2_a : assert always (e -> next[3] (f));
  31. -- Stop simulation after longest running sequencer is finished
  32. -- Simulation only code by using pragmas
  33. -- synthesis translate_off
  34. stop_sim(clk, 11);
  35. -- synthesis translate_on
  36. end architecture psl;