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.

46 lines
1.3 KiB

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use work.pkg.all;
  4. entity psl_sere_fusion is
  5. port (
  6. clk : in std_logic
  7. );
  8. end entity psl_sere_fusion;
  9. architecture psl of psl_sere_fusion is
  10. signal req, avalid, busy, adone, data, ddone : std_logic;
  11. begin
  12. -- 0123456789012
  13. SEQ_REQ : sequencer generic map ("_-___________") port map (clk, req);
  14. SEQ_AVALID : sequencer generic map ("__-__________") port map (clk, avalid);
  15. SEQ_BUSY : sequencer generic map ("___-_--______") port map (clk, busy);
  16. SEQ_ADONE : sequencer generic map ("_______-_____") port map (clk, adone);
  17. SEQ_DATA : sequencer generic map ("_______---___") port map (clk, data);
  18. SEQ_DDONE : sequencer generic map ("__________-__") port map (clk, ddone);
  19. -- All is sensitive to rising edge of clk
  20. default clock is rising_edge(clk);
  21. -- SERE fusion operator
  22. -- SERE fusion is like concatenation (;) but starts at
  23. -- the same cycle that the LHS ends
  24. -- This assertion holds
  25. SERE_0_a : assert always {req} |=> {{avalid; busy[->3]; adone} : {data[->3]; ddone}};
  26. -- Stop simulation after longest running sequencer is finished
  27. -- Simulation only code by using pragmas
  28. -- synthesis translate_off
  29. stop_sim(clk, 13);
  30. -- synthesis translate_on
  31. end architecture psl;