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.

125 lines
3.6 KiB

  1. -- Copyright (c) 2014 - 2022 by Torsten Meissner
  2. --
  3. -- Licensed under the Apache License, Version 2.0 (the "License");
  4. -- you may not use this file except in compliance with the License.
  5. -- You may obtain a copy of the License at
  6. --
  7. -- https://www.apache.org/licenses/LICENSE-2.0
  8. --
  9. -- Unless required by applicable law or agreed to in writing, software
  10. -- distributed under the License is distributed on an "AS IS" BASIS,
  11. -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. -- See the License for the specific language governing permissions and
  13. -- limitations under the License.
  14. library ieee;
  15. use ieee.std_logic_1164.all;
  16. package WishBoneP is
  17. component WishBoneMasterE is
  18. generic (
  19. Coverage : boolean := false;
  20. Formal : boolean := false;
  21. Simulation : boolean := false;
  22. AddressWidth : natural := 8;
  23. DataWidth : natural := 8
  24. );
  25. port (
  26. --+ wishbone system if
  27. WbRst_i : in std_logic;
  28. WbClk_i : in std_logic;
  29. --+ wishbone outputs
  30. WbCyc_o : out std_logic;
  31. WbStb_o : out std_logic;
  32. WbWe_o : out std_logic;
  33. WbAdr_o : out std_logic_vector;
  34. WbDat_o : out std_logic_vector;
  35. --+ wishbone inputs
  36. WbDat_i : in std_logic_vector;
  37. WbAck_i : in std_logic;
  38. WbErr_i : in std_logic;
  39. --+ local register if
  40. LocalWen_i : in std_logic;
  41. LocalRen_i : in std_logic;
  42. LocalAdress_i : in std_logic_vector;
  43. LocalData_i : in std_logic_vector;
  44. LocalData_o : out std_logic_vector;
  45. LocalAck_o : out std_logic;
  46. LocalError_o : out std_logic
  47. );
  48. end component WishBoneMasterE;
  49. component WishBoneSlaveE is
  50. generic (
  51. Formal : boolean := false;
  52. Simulation : boolean := false;
  53. AddressWidth : natural := 32;
  54. DataWidth : natural := 32
  55. );
  56. port (
  57. --+ wishbone system if
  58. WbRst_i : in std_logic;
  59. WbClk_i : in std_logic;
  60. --+ wishbone inputs
  61. WbCyc_i : in std_logic;
  62. WbStb_i : in std_logic;
  63. WbWe_i : in std_logic;
  64. WbAdr_i : in std_logic_vector;
  65. WbDat_i : in std_logic_vector;
  66. --* wishbone outputs
  67. WbDat_o : out std_logic_vector;
  68. WbAck_o : out std_logic;
  69. WbErr_o : out std_logic;
  70. --+ local register if
  71. LocalWen_o : out std_logic;
  72. LocalRen_o : out std_logic;
  73. LocalAdress_o : out std_logic_vector;
  74. LocalData_o : out std_logic_vector;
  75. LocalData_i : in std_logic_vector
  76. );
  77. end component WishBoneSlaveE;
  78. component WishBoneCheckerE is
  79. port (
  80. --+ wishbone system if
  81. WbRst_i : in std_logic;
  82. WbClk_i : in std_logic;
  83. --+ wishbone outputs
  84. WbMCyc_i : in std_logic;
  85. WbMStb_i : in std_logic;
  86. WbMWe_i : in std_logic;
  87. WbMAdr_i : in std_logic_vector;
  88. WbMDat_i : in std_logic_vector;
  89. --+ wishbone inputs
  90. WbSDat_i : in std_logic_vector;
  91. WbSAck_i : in std_logic;
  92. WbSErr_i : in std_logic;
  93. WbRty_i : in std_logic
  94. );
  95. end component WishBoneCheckerE;
  96. type t_wishbone_if is record
  97. --+ wishbone outputs
  98. Cyc : std_logic;
  99. Stb : std_logic;
  100. We : std_logic;
  101. Adr : std_logic_vector;
  102. WDat : std_logic_vector;
  103. --+ wishbone inputs
  104. RDat : std_logic_vector;
  105. Ack : std_logic;
  106. Err : std_logic;
  107. end record t_wishbone_if;
  108. end package WishBoneP;