Library of reusable VHDL components
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.

92 lines
2.8 KiB

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. entity WishBoneCheckerE is
  5. port (
  6. --+ wishbone system if
  7. WbRst_i : in std_logic;
  8. WbClk_i : in std_logic;
  9. --+ wishbone outputs
  10. WbMCyc_i : in std_logic;
  11. WbMStb_i : in std_logic;
  12. WbMWe_i : in std_logic;
  13. WbMAdr_i : in std_logic_vector;
  14. WbMDat_i : in std_logic_vector;
  15. --+ wishbone inputs
  16. WbSDat_i : in std_logic_vector;
  17. WbSAck_i : in std_logic;
  18. WbSErr_i : in std_logic;
  19. WbRty_i : in std_logic
  20. );
  21. end entity WishBoneCheckerE;
  22. architecture check of WishBoneCheckerE is
  23. begin
  24. -- psl default clock is rising_edge(WbClk_i);
  25. --
  26. -- Wishbone protocol checks
  27. --
  28. -- psl property initialize_interface (boolean init_state) is
  29. -- always ({WbRst_i} |=> {init_state[+] && {WbRst_i[*]; not(WbRst_i)}});
  30. --
  31. -- psl RULE_3_00 : assert initialize_interface (not(WbMCyc_i) and not(WbMStb_i) and not(WbMWe_i))
  32. -- report "Wishbone rule 3.00 violated";
  33. --
  34. -- psl property reset_signal is
  35. -- always {not(WbRst_i); WbRst_i} |=> {(WbRst_i and not(WbClk_i))[*]; WbRst_i and WbClk_i};
  36. --
  37. -- psl RULE_3_05 : assert reset_signal
  38. -- report "Wishbone rule 3.05 violated";
  39. --
  40. -- psl property CYC_O_signal is
  41. -- always {not(WbMStb_i); WbMStb_i} |-> {(WbMCyc_i and WbMStb_i)[+]; not(WbMStb_i)};
  42. --
  43. -- psl RULE_3_25 : assert CYC_O_signal
  44. -- report "Wishbone rule 3.25 violated";
  45. --
  46. -- psl property slave_no_response is
  47. -- always not(WbMCyc_i) -> not(WbSAck_i) and not(WbSErr_i);
  48. --
  49. -- psl property slave_response_to_master is
  50. -- always {not(WbMStb_i); WbMStb_i} |->
  51. -- {{(WbMStb_i and not(WbSAck_i))[*];
  52. -- WbMStb_i and WbSAck_i;
  53. -- not(WbMStb_i)} |
  54. -- {(WbMStb_i and not(WbSErr_i))[*];
  55. -- WbMStb_i and WbSErr_i;
  56. -- not(WbMStb_i)} |
  57. -- {(WbMStb_i and not(WbRty_i))[*];
  58. -- WbMStb_i and WbRty_i;
  59. -- not(WbMStb_i)}
  60. -- };
  61. --
  62. -- psl RULE_3_30_0 : assert slave_no_response
  63. -- report "Wishbone rule 3.30_0 violated";
  64. --
  65. -- psl RULE_3_30_1 : assert slave_response_to_master
  66. -- report "Wishbone rule 3.30_0 violated";
  67. --
  68. -- psl property slave_response is
  69. -- always {not(WbMStb_i); WbMCyc_i and WbMStb_i} |->
  70. -- {not(WbSAck_i or WbSErr_i or WbRty_i)[*]; WbSAck_i or WbSErr_i or WbRty_i};
  71. --
  72. -- psl RULE_3_35 : assert slave_response
  73. -- report "Wishbone rule 3.35 violated";
  74. --
  75. -- psl property response_signals is
  76. -- never ((WbSErr_i and WbRty_i) or (WbSErr_i and WbSAck_i) or (WbSAck_i and WbRty_i));
  77. --
  78. -- psl RULE_3_45 : assert response_signals
  79. -- report "Wishbone rule 3.45 violated";
  80. --
  81. -- -- psl property slave_negated_response is
  82. end architecture check;