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.

61 lines
2.7 KiB

  1. [![tests](https://github.com/tmeissner/psl_with_ghdl/workflows/tests/badge.svg?branch=master)](https://github.com/tmeissner/psl_with_ghdl/actions?query=workflow%3Atests)
  2. # psl_with_ghdl
  3. A collection of examples of using PSL for functional and formal verification of VHDL with GHDL (and SymbiYosys).
  4. This is a project with the purpose to get a current state of PSL implementation in GHDL. It probably will find unsupported PSL features, incorrect implemented features or simple bugs like GHDL crashs.
  5. It is also intended for experiments with PSL when learning the language. You can play around with the examples, as they are pretty simple. You can comment out failing assertions if you want to have a successful proof or simulation if you want. You can change them to see what happens.
  6. It is recommended to use an up-to-date version of GHDL as potential bugs are fixed very quickly. Especially the synthesis feature of GHDL is very new and still beta. You can build GHDL from source or use one of the Docker images which contain also the SymbiYosys toolchain. For example the `ghdl/synth:formal` image from Docker Hub. Beware, the Docker images aren't build every day, so it is possible that tests are failing until the image is updated.
  7. You can use my [Dockerfiles for SymbiYosys & GHDL(-synth)](https://github.com/tmeissner/Dockerfiles) to build the docker image on your own machine. Then you have a Docker image with the latest tool versions.
  8. Have fun!
  9. The next lists will grow during further development
  10. ## PSL features supported by GHDL:
  11. ### Directives
  12. * assert directive
  13. * cover directive
  14. * assume directive (synthesis)
  15. * restrict directive (synthesis)
  16. ### Temporal operators (LTL style)
  17. * always operator
  18. * never operator
  19. * logical implication operator (->)
  20. * next operator
  21. * next[n] operator
  22. * next_a[i to j] operator
  23. * next_e[i to j] operator
  24. * next_event operator
  25. * next_event[n] operator
  26. * next_event_e[i to j] operator
  27. * until operator
  28. * until_ operator
  29. * before operator (GHDL crash with a specific property, see psl_before.vhd)
  30. * eventually! operator (simulation, synthesis produces a GHDL crash, see psl_eventually.vhd)
  31. ### Sequential Extended Regular Expressions (SERE style)
  32. * Simple SERE
  33. * Overlapping suffix implication operator (|->)
  34. * Non overlapping suffix implication operator (|=>)
  35. * Consecutive repetition operator ([*], [+], [*n], [*i to j])
  36. ## PSL features not yet supported by GHDL:
  37. * forall statement
  38. * Synthesis of strong operator versions
  39. ## PSL features supported by GHDL but with wrong behaviour
  40. * before_ operator (Seems that LHS & RHS of operator have to be active at same cycle, see psl_before.vhd)
  41. * next_event_a[i to j] operator (Behaviour currently under investigation)