Skip to content

Commit

Permalink
axi_pkg: Remove size function for better compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
thommythomaso committed May 8, 2023
1 parent 4b20954 commit 7b0db8e
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions src/axi_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@
//! AXI Package
/// Contains all necessary type definitions, constants, and generally useful functions.
package axi_pkg;
/// AXI Transaction Burst Width.
parameter int unsigned BurstWidth = 32'd2;
/// AXI Transaction Response Width.
parameter int unsigned RespWidth = 32'd2;
/// AXI Transaction Cacheability Width.
parameter int unsigned CacheWidth = 32'd4;
/// AXI Transaction Protection Width.
parameter int unsigned ProtWidth = 32'd3;
/// AXI Transaction Quality of Service Width.
parameter int unsigned QosWidth = 32'd4;
/// AXI Transaction Region Width.
parameter int unsigned RegionWidth = 32'd4;
/// AXI Transaction Length Width.
parameter int unsigned LenWidth = 32'd8;
/// AXI Transaction Size Width.
parameter int unsigned SizeWidth = 32'd3;
/// AXI Lock Width.
parameter int unsigned LockWidth = 32'd1;
/// AXI5 Atomic Operation Width.
parameter int unsigned AtopWidth = 32'd6;
/// AXI5 Non-Secure Address Identifier.
parameter int unsigned NsaidWidth = 32'd4;

/// AXI Transaction Burst Width.
typedef logic [1:0] burst_t;
Expand All @@ -41,29 +63,6 @@ package axi_pkg;
/// AXI5 Non-Secure Address Identifier.
typedef logic [3:0] nsaid_t;

/// AXI Transaction Burst Width.
parameter int unsigned BurstWidth = $size(burst_t);
/// AXI Transaction Response Width.
parameter int unsigned RespWidth = $size(resp_t);
/// AXI Transaction Cacheability Width.
parameter int unsigned CacheWidth = $size(cache_t);
/// AXI Transaction Protection Width.
parameter int unsigned ProtWidth = $size(prot_t);
/// AXI Transaction Quality of Service Width.
parameter int unsigned QosWidth = $size(qos_t);
/// AXI Transaction Region Width.
parameter int unsigned RegionWidth = $size(region_t);
/// AXI Transaction Length Width.
parameter int unsigned LenWidth = $size(len_t);
/// AXI Transaction Size Width.
parameter int unsigned SizeWidth = $size(size_t);
/// AXI Lock Width.
parameter int unsigned LockWidth = 32'd1;
/// AXI5 Atomic Operation Width.
parameter int unsigned AtopWidth = $size(atop_t);
/// AXI5 Non-Secure Address Identifier.
parameter int unsigned NsaidWidth = $size(nsaid_t);

/// In a fixed burst:
/// - The address is the same for every transfer in the burst.
/// - The byte lanes that are valid are constant for all beats in the burst. However, within
Expand Down

0 comments on commit 7b0db8e

Please sign in to comment.