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.

41 lines
688 B

  1. -- Simple sequencer to generate waveforms for 1 bit std_logic signals
  2. -- Inspired by SymbioticEDA's sva-demos seq module
  3. -- https://github.com/SymbioticEDA/sva-demos/blob/master/seq.sv
  4. library ieee;
  5. use ieee.std_logic_1164.all;
  6. use work.pkg.all;
  7. entity sequencer is
  8. generic (
  9. seq : string
  10. );
  11. port (
  12. clk : in std_logic;
  13. data : out std_logic
  14. );
  15. end entity sequencer;
  16. architecture rtl of sequencer is
  17. signal index : natural := seq'low;
  18. begin
  19. process (clk) is
  20. begin
  21. if rising_edge(clk) then
  22. if (index < seq'high) then
  23. index <= index + 1;
  24. end if;
  25. end if;
  26. end process;
  27. data <= to_bit(seq(index));
  28. end architecture rtl;