|
| 1 | +-- ============================================================================= |
| 2 | +-- Authors: |
| 3 | +-- Rob Gaddi |
| 4 | +-- Patrick Lehmann |
| 5 | +-- |
| 6 | +-- Package: |
| 7 | +-- VHDL-2019 Axi4 interface descriptions |
| 8 | +-- |
| 9 | +-- Description: |
| 10 | +-- Undocumented |
| 11 | +-- |
| 12 | +-- License: |
| 13 | +-- ============================================================================= |
| 14 | +-- Copyright 2016-2025 Open Source VHDL Group |
| 15 | +-- |
| 16 | +-- Licensed under the Apache License, Version 2.0 (the "License"); |
| 17 | +-- you may not use this file except in compliance with the License. |
| 18 | +-- You may obtain a copy of the License at |
| 19 | +-- |
| 20 | +-- http://www.apache.org/licenses/LICENSE-2.0 |
| 21 | +-- |
| 22 | +-- Unless required by applicable law or agreed to in writing, software |
| 23 | +-- distributed under the License is distributed on an "AS IS" BASIS, |
| 24 | +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 25 | +-- See the License for the specific language governing permissions and |
| 26 | +-- limitations under the License. |
| 27 | +-- ============================================================================= |
| 28 | + |
| 29 | +library IEEE; |
| 30 | +use IEEE.std_logic_1164.all; |
| 31 | +use IEEE.numeric_std.all; |
| 32 | + |
| 33 | +use work.Axi4Common.all; |
| 34 | + |
| 35 | + |
| 36 | +package Axi4 is |
| 37 | + type Axi4_Address_Interface is record |
| 38 | + -- Handshake signals |
| 39 | + Valid : std_ulogic; |
| 40 | + Ready : std_ulogic; |
| 41 | + |
| 42 | + -- Payload signals |
| 43 | + ID : ID_Type; |
| 44 | + Address : Address_Type; |
| 45 | + Length : Length_Type; |
| 46 | + Size : Size_Type; |
| 47 | + Burst : Burst_Type; |
| 48 | + Lock : Lock_Type; |
| 49 | + QoS : QoS_Type; |
| 50 | + Region : Region_Type; |
| 51 | + Cache : Cache_Type; |
| 52 | + Protect : Protect_Type; |
| 53 | + |
| 54 | + User : User_Type; |
| 55 | + end record; |
| 56 | + type Axi4_Address_Interface_Vector is array(natural range <>) of Axi4_Address_Interface; |
| 57 | + |
| 58 | + |
| 59 | + type Axi4_WriteData_Interface is record |
| 60 | + -- Handshake signals |
| 61 | + Valid : std_ulogic; |
| 62 | + Ready : std_ulogic; |
| 63 | + |
| 64 | + -- Payload signals |
| 65 | + Data : Data_Type; |
| 66 | + Strobe : Strobe_Type; |
| 67 | + Last : std_ulogic; |
| 68 | + |
| 69 | + User : User_Type; |
| 70 | + end record; |
| 71 | + type Axi4_WriteData_Interface_Vector is array(natural range <>) of Axi4_WriteData_Interface; |
| 72 | + |
| 73 | + type Axi4_WriteResponse_Interface is record |
| 74 | + -- Handshake signals |
| 75 | + Valid : std_ulogic; |
| 76 | + Ready : std_ulogic; |
| 77 | + |
| 78 | + -- Payload signals |
| 79 | + ID : ID_Type; |
| 80 | + Response : Response_Type; |
| 81 | + |
| 82 | + User : User_Type; |
| 83 | + end record; |
| 84 | + type Axi4_WriteResponse_Interface_Vector is array(natural range <>) of Axi4_WriteResponse_Interface; |
| 85 | + |
| 86 | + type Axi4_ReadData_Interface is record |
| 87 | + -- Handshake signals |
| 88 | + Valid : std_ulogic; |
| 89 | + Ready : std_ulogic; |
| 90 | + |
| 91 | + -- Payload signals |
| 92 | + ID : ID_Type; |
| 93 | + Response : Response_Type; |
| 94 | + |
| 95 | + Data : Data_Type; |
| 96 | + Last : std_ulogic; |
| 97 | + |
| 98 | + User : User_Type; |
| 99 | + end record; |
| 100 | + type Axi4_ReadData_Interface_Vector is array(natural range <>) of Axi4_ReadData_Interface; |
| 101 | + |
| 102 | + type Axi4_Interface is record |
| 103 | + WriteAddress : Axi4_Address_Interface; |
| 104 | + WriteData : Axi4_WriteData_Interface; |
| 105 | + WriteResponse : Axi4_WriteResponse_Interface; |
| 106 | + ReadAddress : Axi4_Address_Interface; |
| 107 | + ReadData : Axi4_ReadData_Interface; |
| 108 | + end record; |
| 109 | + type Axi4_Interface_Vector is array(natural range <>) of Axi4_Interface; |
| 110 | + |
| 111 | + -- All lower-level views are defined from the driver's point of view. |
| 112 | + view Axi4_Address_ManagerView of Axi4_Address_Interface is |
| 113 | + -- Handshake signals |
| 114 | + Valid : out; |
| 115 | + Ready : in; |
| 116 | + |
| 117 | + -- Payload signals |
| 118 | + ID : out; |
| 119 | + Address : out; |
| 120 | + Length : out; |
| 121 | + Size : out; |
| 122 | + Burst : out; |
| 123 | + Lock : out; |
| 124 | + QoS : out; |
| 125 | + Region : out; |
| 126 | + Cache : out; |
| 127 | + Protect : out; |
| 128 | + User : out; |
| 129 | + end view; |
| 130 | + alias Axi4_Address_SubordinateView is Axi4_Address_ManagerView'converse; |
| 131 | + |
| 132 | + view Axi4_WriteData_ManagerView of Axi4_WriteData_Interface is |
| 133 | + -- Handshake signals |
| 134 | + Valid : out; |
| 135 | + Ready : in; |
| 136 | + |
| 137 | + -- Payload signals |
| 138 | + Data : out; |
| 139 | + Strobe : out; |
| 140 | + Last : out; |
| 141 | + User : out; |
| 142 | + end view; |
| 143 | + alias Axi4_WriteData_SubordinateView is Axi4_WriteData_ManagerView'converse; |
| 144 | + |
| 145 | + view Axi4_WriteResponse_ManagerView of Axi4_WriteResponse_Interface is |
| 146 | + -- Handshake signals |
| 147 | + Valid : in; |
| 148 | + Ready : out; |
| 149 | + |
| 150 | + -- Payload signals |
| 151 | + ID : in; |
| 152 | + Response : in; |
| 153 | + User : in; |
| 154 | + end view; |
| 155 | + alias Axi4_WriteResponse_SubordinateView is Axi4_WriteResponse_ManagerView'converse; |
| 156 | + |
| 157 | + view Axi4_ReadData_ManagerView of Axi4_ReadData_Interface is |
| 158 | + -- Handshake signals |
| 159 | + Valid : in; |
| 160 | + Ready : out; |
| 161 | + |
| 162 | + -- Payload signals |
| 163 | + ID : in; |
| 164 | + Response : in; |
| 165 | + Data : in; |
| 166 | + Last : in; |
| 167 | + User : in; |
| 168 | + end view; |
| 169 | + alias Axi4_ReadData_SubordinateView is Axi4_ReadData_ManagerView'converse; |
| 170 | + |
| 171 | + view Axi4_ManagerView of Axi4_Interface is |
| 172 | + WriteAddress : view Axi4_Address_ManagerView; |
| 173 | + WriteData : view Axi4_WriteData_ManagerView; |
| 174 | + WriteResponse : view Axi4_WriteResponse_ManagerView; |
| 175 | + ReadAddress : view Axi4_Address_ManagerView; |
| 176 | + ReadData : view Axi4_ReadData_ManagerView; |
| 177 | + end view; |
| 178 | + alias Axi4_SubordinateView is Axi4_ManagerView'converse; |
| 179 | + |
| 180 | +end package; |
0 commit comments