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.

44 lines
729 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. signal ch : character;
  19. begin
  20. process (clk) is
  21. begin
  22. if rising_edge(clk) then
  23. if (index < seq'high) then
  24. index <= index + 1;
  25. end if;
  26. end if;
  27. end process;
  28. ch <= seq(index);
  29. data <= to_bit(ch);
  30. end architecture rtl;