|
| 1 | +-- ============================================================================= |
| 2 | +-- Authors: |
| 3 | +-- Parham Soltani |
| 4 | +-- |
| 5 | +-- Package: |
| 6 | +-- Generic minimal Avalon Memory-Mapped interface for pre-constraining widths |
| 7 | +-- |
| 8 | +-- Description: |
| 9 | +-- Provides sized versions of the minimal Avalon MM interface |
| 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 | +use work.AvalonMM_Minimal.all; |
| 29 | + |
| 30 | +package AvalonMM_Minimal_Generic is |
| 31 | + generic ( |
| 32 | + constant ADDRESS_BITS : positive; |
| 33 | + constant DATA_BITS : positive |
| 34 | + ); |
| 35 | + |
| 36 | + constant BYTEENABLE_BITS : positive := DATA_BITS / 8; |
| 37 | + |
| 38 | + -- Sized minimal interface |
| 39 | + subtype AvalonMM_Minimal_SizedInterface is AvalonMM_Minimal_Interface( |
| 40 | + Address(ADDRESS_BITS - 1 downto 0), |
| 41 | + WriteData(DATA_BITS - 1 downto 0), |
| 42 | + ReadData(DATA_BITS - 1 downto 0), |
| 43 | + ByteEnable(BYTEENABLE_BITS - 1 downto 0) |
| 44 | + ); |
| 45 | + |
| 46 | + subtype AvalonMM_Minimal_SizedInterface_Vector is AvalonMM_Minimal_Interface_Vector(open)( |
| 47 | + Address(ADDRESS_BITS - 1 downto 0), |
| 48 | + WriteData(DATA_BITS - 1 downto 0), |
| 49 | + ReadData(DATA_BITS - 1 downto 0), |
| 50 | + ByteEnable(BYTEENABLE_BITS - 1 downto 0) |
| 51 | + ); |
| 52 | + |
| 53 | +end package; |
0 commit comments