Skip to content

Commit 2880a0c

Browse files
committed
Add Avalon-MM and Avalon-ST Minimal interface packages
1 parent 5df447d commit 2880a0c

10 files changed

+227
-76
lines changed

Avalon/v1/AvalonMM.vhdl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,4 @@ package AvalonMM is
8282
end view;
8383
alias AvalonMM_SlaveView is AvalonMM_MasterView'converse;
8484

85-
-- Simplified interface without optional signals
86-
type AvalonMM_Simple_Interface is record
87-
-- Master signals
88-
Address : Address_Type;
89-
Read : std_ulogic;
90-
Write : std_ulogic;
91-
WriteData : Data_Type;
92-
ByteEnable : ByteEnable_Type;
93-
94-
-- Slave signals
95-
ReadData : Data_Type;
96-
WaitRequest : std_ulogic;
97-
end record;
98-
type AvalonMM_Simple_Interface_Vector is array(natural range <>) of AvalonMM_Simple_Interface;
99-
100-
view AvalonMM_Simple_MasterView of AvalonMM_Simple_Interface is
101-
-- Master outputs
102-
Address : out;
103-
Read : out;
104-
Write : out;
105-
WriteData : out;
106-
ByteEnable : out;
107-
108-
-- Master inputs
109-
ReadData : in;
110-
WaitRequest : in;
111-
end view;
112-
alias AvalonMM_Simple_SlaveView is AvalonMM_Simple_MasterView'converse;
113-
11485
end package;

Avalon/v1/AvalonMM_Generic.vhdl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,4 @@ package AvalonMM_Generic is
5353
BurstCount(BURSTCOUNT_BITS - 1 downto 0)
5454
);
5555

56-
-- Simplified Avalon-MM interface
57-
subtype AvalonMM_Simple_SizedInterface is AvalonMM_Simple_Interface(
58-
Address(ADDRESS_BITS - 1 downto 0),
59-
WriteData(DATA_BITS - 1 downto 0),
60-
ReadData(DATA_BITS - 1 downto 0),
61-
ByteEnable(BYTEENABLE_BITS - 1 downto 0)
62-
);
63-
64-
subtype AvalonMM_Simple_SizedInterface_Vector is AvalonMM_Simple_Interface_Vector(open)(
65-
Address(ADDRESS_BITS - 1 downto 0),
66-
WriteData(DATA_BITS - 1 downto 0),
67-
ReadData(DATA_BITS - 1 downto 0),
68-
ByteEnable(BYTEENABLE_BITS - 1 downto 0)
69-
);
70-
7156
end package;

Avalon/v1/AvalonMM_Minimal.vhdl

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
-- =============================================================================
2+
-- Authors:
3+
-- Parham Soltani
4+
--
5+
-- Package:
6+
-- Minimal Avalon Memory-Mapped interface
7+
--
8+
-- Description:
9+
-- Simplified Avalon MM interface without optional signals for basic use cases
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_Minimal is
35+
-- Minimal Avalon MM interface (only essential signals)
36+
type AvalonMM_Minimal_Interface is record
37+
-- Master signals
38+
Address : Address_Type;
39+
Read : std_ulogic;
40+
Write : std_ulogic;
41+
WriteData : Data_Type;
42+
ByteEnable : ByteEnable_Type;
43+
44+
-- Slave signals
45+
ReadData : Data_Type;
46+
WaitRequest : std_ulogic;
47+
end record;
48+
type AvalonMM_Minimal_Interface_Vector is array(natural range <>) of AvalonMM_Minimal_Interface;
49+
50+
-- Master view
51+
view AvalonMM_Minimal_MasterView of AvalonMM_Minimal_Interface is
52+
-- Master outputs
53+
Address : out;
54+
Read : out;
55+
Write : out;
56+
WriteData : out;
57+
ByteEnable : out;
58+
59+
-- Master inputs (slave outputs)
60+
ReadData : in;
61+
WaitRequest : in;
62+
end view;
63+
alias AvalonMM_Minimal_SlaveView is AvalonMM_Minimal_MasterView'converse;
64+
65+
end package;
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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;

Avalon/v1/AvalonST.vhdl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,4 @@ package AvalonST is
7070
end view;
7171
alias AvalonST_SinkView is AvalonST_SourceView'converse;
7272

73-
-- Simplified interface without optional signals
74-
type AvalonST_Simple_Interface is record
75-
-- Handshake signals
76-
Valid : std_ulogic;
77-
Ready : std_ulogic;
78-
79-
-- Payload signal
80-
Data : Data_Type;
81-
end record;
82-
type AvalonST_Simple_Interface_Vector is array(natural range <>) of AvalonST_Simple_Interface;
83-
84-
view AvalonST_Simple_SourceView of AvalonST_Simple_Interface is
85-
-- Source outputs
86-
Valid : out;
87-
Data : out;
88-
89-
-- Source inputs
90-
Ready : in;
91-
end view;
92-
alias AvalonST_Simple_SinkView is AvalonST_Simple_SourceView'converse;
93-
9473
end package;

Avalon/v1/AvalonST_Generic.vhdl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,4 @@ package AvalonST_Generic is
5050
Channel(CHANNEL_BITS - 1 downto 0)
5151
);
5252

53-
-- Simplified Avalon-ST interface
54-
subtype AvalonST_Simple_SizedInterface is AvalonST_Simple_Interface(
55-
Data(DATA_BITS - 1 downto 0)
56-
);
57-
58-
subtype AvalonST_Simple_SizedInterface_Vector is AvalonST_Simple_Interface_Vector(open)(
59-
Data(DATA_BITS - 1 downto 0)
60-
);
61-
6253
end package;

Avalon/v1/AvalonST_Minimal.vhdl

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
-- =============================================================================
2+
-- Authors:
3+
-- Parham Soltani
4+
--
5+
-- Package:
6+
-- Minimal Avalon Streaming interface
7+
--
8+
-- Description:
9+
-- Simplified Avalon ST interface without optional signals for basic streaming
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 AvalonST_Minimal is
35+
-- Minimal Avalon ST interface (only essential signals)
36+
type AvalonST_Minimal_Interface is record
37+
-- Source signals
38+
Data : Data_Type;
39+
Valid : std_ulogic;
40+
41+
-- Sink signals
42+
Ready : std_ulogic;
43+
end record;
44+
type AvalonST_Minimal_Interface_Vector is array(natural range <>) of AvalonST_Minimal_Interface;
45+
46+
-- Source view
47+
view AvalonST_Minimal_SourceView of AvalonST_Minimal_Interface is
48+
-- Source outputs
49+
Data : out;
50+
Valid : out;
51+
52+
-- Source inputs (sink outputs)
53+
Ready : in;
54+
end view;
55+
alias AvalonST_Minimal_SinkView is AvalonST_Minimal_SourceView'converse;
56+
57+
end package;
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
-- =============================================================================
2+
-- Authors:
3+
-- Parham Soltani
4+
--
5+
-- Package:
6+
-- Generic minimal Avalon Streaming interface for pre-constraining widths
7+
--
8+
-- Description:
9+
-- Provides sized versions of the minimal Avalon ST 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.AvalonST_Minimal.all;
29+
30+
package AvalonST_Minimal_Generic is
31+
generic (
32+
constant DATA_BITS : positive
33+
);
34+
35+
-- Sized minimal interface
36+
subtype AvalonST_Minimal_SizedInterface is AvalonST_Minimal_Interface(
37+
Data(DATA_BITS - 1 downto 0)
38+
);
39+
40+
subtype AvalonST_Minimal_SizedInterface_Vector is AvalonST_Minimal_Interface_Vector(open)(
41+
Data(DATA_BITS - 1 downto 0)
42+
);
43+
44+
end package;

build.pro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,9 @@ analyze PoC/CSE.vhdl
5757
analyze Avalon/v1/AvalonCommon.vhdl
5858
analyze Avalon/v1/AvalonMM.vhdl
5959
analyze Avalon/v1/AvalonMM_Generic.vhdl
60+
analyze Avalon/v1/AvalonMM_Minimal.vhdl
61+
analyze Avalon/v1/AvalonMM_Minimal_Generic.vhdl
6062
analyze Avalon/v1/AvalonST.vhdl
6163
analyze Avalon/v1/AvalonST_Generic.vhdl
64+
analyze Avalon/v1/AvalonST_Minimal.vhdl
65+
analyze Avalon/v1/AvalonST_Minimal_Generic.vhdl

compileorder.list

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ MIPI/M-PHY.vhdl
5151
# Miscellaneous interfaces
5252
PoC/CSE.vhdl
5353

54-
5554
# Avalon Memory-Mapped Interfaces
5655
Avalon/v1/AvalonCommon.vhdl
5756
Avalon/v1/AvalonMM.vhdl
5857
Avalon/v1/AvalonMM_Generic.vhdl
58+
Avalon/v1/AvalonMM_Minimal.vhdl
59+
Avalon/v1/AvalonMM_Minimal_Generic.vhdl
5960
Avalon/v1/AvalonST.vhdl
6061
Avalon/v1/AvalonST_Generic.vhdl
61-
62+
Avalon/v1/AvalonST_Minimal.vhdl
63+
Avalon/v1/AvalonST_Minimal_Generic.vhdl

0 commit comments

Comments
 (0)