|
| 1 | +-- ============================================================================= |
| 2 | +-- Authors: |
| 3 | +-- Parham Soltani |
| 4 | +-- |
| 5 | +-- Package: |
| 6 | +-- VHDL-2019 Avalon Memory-Mapped (Avalon-MM) interface descriptions |
| 7 | +-- |
| 8 | +-- Description: |
| 9 | +-- Signal names match Avalon specification (address, writedata, readdata, etc.) |
| 10 | +-- |
| 11 | +-- License: |
| 12 | +-- ============================================================================= |
| 13 | +-- Copyright 2025-2025 Open Source VHDL Group |
| 14 | +-- |
| 15 | +-- Licensed under the Apache License, Version 2.0 (the "License"); |
| 16 | +-- you may not use this file except in compliance with the License. |
| 17 | +-- You may obtain a copy of the License at |
| 18 | +-- |
| 19 | +-- http://www.apache.org/licenses/LICENSE-2.0 |
| 20 | +-- |
| 21 | +-- Unless required by applicable law or agreed to in writing, software |
| 22 | +-- distributed under the License is distributed on an "AS IS" BASIS, |
| 23 | +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 24 | +-- See the License for the specific language governing permissions and |
| 25 | +-- limitations under the License. |
| 26 | +-- ============================================================================= |
| 27 | + |
| 28 | +library IEEE; |
| 29 | +use IEEE.std_logic_1164.all; |
| 30 | +use IEEE.numeric_std.all; |
| 31 | + |
| 32 | +use work.AvalonCommon.all; |
| 33 | + |
| 34 | +package AvalonMM is |
| 35 | + -- Avalon Memory-Mapped Interface (matching spec signal names) |
| 36 | + type AvalonMM_Interface is record |
| 37 | + -- Master signals |
| 38 | + Address : Address_Type; -- Address |
| 39 | + Read : std_ulogic; -- Read request |
| 40 | + Write : std_ulogic; -- Write request |
| 41 | + WriteData : Data_Type; -- Write data |
| 42 | + ByteEnable : ByteEnable_Type; -- Byte enable |
| 43 | + |
| 44 | + -- Slave signals |
| 45 | + ReadData : Data_Type; -- Read data |
| 46 | + ReadDataValid : std_ulogic; -- Read data valid |
| 47 | + WaitRequest : std_ulogic; -- Wait request |
| 48 | + Response : Response_Type; -- Response |
| 49 | + |
| 50 | + -- Optional burst signals |
| 51 | + BurstCount : BurstCount_Type; -- Burst count |
| 52 | + |
| 53 | + -- Optional pipelining signals |
| 54 | + WriteResponseValid : std_ulogic; -- Write response valid |
| 55 | + |
| 56 | + -- Optional lock signal |
| 57 | + Lock : std_ulogic; -- Lock |
| 58 | + |
| 59 | + -- Optional debug signals |
| 60 | + DebugAccess : std_ulogic; -- Debug access |
| 61 | + end record; |
| 62 | + type AvalonMM_Interface_Vector is array(natural range <>) of AvalonMM_Interface; |
| 63 | + |
| 64 | + -- Master view (from master's perspective) |
| 65 | + view AvalonMM_MasterView of AvalonMM_Interface is |
| 66 | + -- Master outputs |
| 67 | + Address : out; |
| 68 | + Read : out; |
| 69 | + Write : out; |
| 70 | + WriteData : out; |
| 71 | + ByteEnable : out; |
| 72 | + BurstCount : out; |
| 73 | + Lock : out; |
| 74 | + DebugAccess : out; |
| 75 | + |
| 76 | + -- Master inputs |
| 77 | + ReadData : in; |
| 78 | + ReadDataValid : in; |
| 79 | + WaitRequest : in; |
| 80 | + Response : in; |
| 81 | + WriteResponseValid : in; |
| 82 | + end view; |
| 83 | + alias AvalonMM_SlaveView is AvalonMM_MasterView'converse; |
| 84 | + |
| 85 | +end package; |
0 commit comments