Skip to content

AXI4.vhdl record Names do not match AXI4 interface names #34

@JimLewis

Description

@JimLewis

I understand disliking some of the AXI4 naming methods - especially the AW, W, B, AR, R - however the record field names should match the suffix of the AXI interface - such as Addr and Prot.

By using aliases in the VC (or design), we can create short names almost identical to the actual AXI interface names:

process
  . . . 
  alias    AW    : AxiBus.WriteAddress'subtype is AxiBus.WriteAddress ;
 begin
  ... 
  AW.Addr <= ...
  AW.Prot <= ...

While today the AW and AR interfaces have the exact same fields, will it always be that way? Hint, although they are the same, they are specified separately in the AXI specification. This could be future proofed by doing:
type Axi4_Address_Interface is record
....
end record ;

subtype Axi4_Read_Address_Interface is Axi4_Address_Interface ;
subtype Axi4_Write_Address_Interface is Axi4_Address_Interface ;

That way designs that use Read_Address and Write_Address types are only minimally impacted if these were to change.


While the correct types for an interface implementation is std_ulogic and std_ulogic_vector, to support records of these without mode views requires the usage of std_logic_vector. For VC (or designs) that need to support both 2019 interfaces and older implementations, we either need two to separate the 2008 and 2019 implementations or separate the mode views from the record declarations and use std_logic and std_logic_vector - in either case to support both, two packages are needed - maybe three since synthesis needs to separate in and out record elements.

OSVVM is supporting both 2019 and 2008 implementations by keeping the 2019 implementations in the src directory and the 2008 implementations in a directory named src/deprecated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions