view declarations and others
Is your capability/feature request related to a problem?
For interfaces like AXI, others could be a big win with view declarations. Currently for Axi4 Write Address, one could write something like:
-- AXI Write Address Channel
type Axi4WriteAddressRecType is record
-- AXI4 Lite
Addr : std_logic_vector ;
Prot : Axi4ProtType ;
Valid : std_logic ;
Ready : std_logic ;
-- AXI4 Full
-- User Config - AXI recommended 3:0 for master, 7:0 at slave
ID : std_logic_vector ;
-- BurstLength = AxLen+1. AXI4: 7:0, AXI3: 3:0
Len : std_logic_vector(7 downto 0) ;
-- #Bytes in transfer = 2**AxSize
Size : std_logic_vector(2 downto 0) ;
-- AxBurst Binary Encoded (Fixed, Incr, Wrap, NotDefined)
Burst : std_logic_vector(1 downto 0) ;
Lock : std_logic ;
-- AxCache One-hot (Write-Allocate, Read-Allocate, Modifiable, Bufferable)
Cache : std_logic_vector(3 downto 0) ;
QOS : std_logic_vector(3 downto 0) ;
Region : std_logic_vector(3 downto 0) ;
User : std_logic_vector ; -- User Config
end record Axi4WriteAddressRecType ;
function InitAxi4WriteAddressRec (
WriteAddress : in Axi4WriteAddressRecType ;
InitVal : std_logic := 'Z'
) return Axi4WriteAddressRecType ;
view Axi4WriteAddressMasterView of Axi4WriteAddressRecType is
Addr : out ;
Prot : out ;
Valid : out ;
Ready : in ;
-- AXI4 Full
-- User Config - AXI recommended 3:0 for master, 7:0 at slave
ID : out ;
-- BurstLength = AxLen+1. AXI4: 7:0, AXI3: 3:0
Len : out ;
-- #Bytes in transfer = 2**AxSize
Size : out ;
-- AxBurst Binary Encoded (Fixed, Incr, Wrap, NotDefined)
Burst : out ;
Lock : out ;
-- AxCache One-hot (Write-Allocate, Read-Allocate, Modifiable, Bufferable)
Cache : out ;
QOS : out ;
Region : out ;
User : out ;
end view Axi4WriteAddressMasterView ;
alias Axi4WriteAddressResponderView is Axi4WriteAddressMasterView'converse ;
Describe the solution you'd like
With others, the view declaration could be:
view Axi4WriteAddressMasterView of Axi4WriteAddressRecType is
Ready : in ;
others : out ;
end view Axi4WriteAddressMasterView ;
alias Axi4WriteAddressResponderView is Axi4WriteAddressMasterView'converse ;