AxiMMBus.sv 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* AXI FULL SLAVE */
  2. interface AxiMMBus #(parameter AXI_DATA_WIDTH = 64);
  3. /* Global Signals */
  4. logic s_axi_aclk_i;
  5. logic s_axi_aresetn_i;
  6. /* Input AXI4 FULL Signals */
  7. logic [AXI_DATA_WIDTH-1:0] s_axi_awaddr_i; // Write Address
  8. logic [7:0] s_axi_awlen_i; // Burst Length. Exact number of transfers in a burst.
  9. logic [2:0] s_axi_awsize_i; // Burst Size. Number of bytes in each transfer.
  10. /* Burst type. FIXED: 00, INCR: 01, WRAP: 10, Reserved: 11 */
  11. /* INCR - Incrementing burst. The address increments by the data width for each transfer. */
  12. /* WRAP - Wrapping burst. The address increments by the data width for each transfer, but the address does not increment to the next address when the burst wraps. */
  13. /* FIXED - Fixed burst. The address does not increment for the burst. */
  14. logic [1:0] s_axi_awburst_i; // Burst Type. Type of burst operation and size determine how the address is incremented.
  15. logic s_axi_awvalid_i; // Write Address Valid
  16. logic [AXI_DATA_WIDTH-1:0] s_axi_wdata_i;// Write Data
  17. logic [AXI_DATA_WIDTH/8-1:0] s_axi_wstrb_i; // Write Strobe. This signal indicates which byte lanes hold valid data.
  18. logic s_axi_wlast_i; // Write Last. This signal indicates the last transfer in a burst.
  19. logic s_axi_wvalid_i; // Write Valid. This signal indicates that the write data on the bus is valid.
  20. logic s_axi_bready_i; // Write Response Ready. This signal indicates that the master is ready to accept a write response.
  21. logic [AXI_DATA_WIDTH-1:0] s_axi_araddr_i; // Read Address. This signal is the address of the first transfer in a burst.
  22. logic [7:0] s_axi_arlen_i; // Burst Length. Exact number of transfers in a burst.
  23. logic [2:0] s_axi_arsize_i;
  24. logic [1:0] s_axi_arburst_i;
  25. logic s_axi_arvalid_i;
  26. logic s_axi_rready_i;
  27. /* Output AXI4 FULL Signals */
  28. logic s_axi_awready_o;
  29. logic s_axi_wready_o;
  30. logic [1:0] s_axi_bresp_o;
  31. logic s_axi_bvalid_o;
  32. logic s_axi_arready_o;
  33. logic [AXI_DATA_WIDTH-1:0] s_axi_rdata_o;
  34. logic s_axi_rlast_o;
  35. logic [1:0] s_axi_rresp_o;
  36. logic s_axi_rvalid_o;
  37. modport master (
  38. input s_axi_aclk_i,
  39. input s_axi_aresetn_i,
  40. /* Input AXI4 FULL Signals */
  41. output s_axi_awaddr_i, // Write Address
  42. output s_axi_awlen_i, // Burst Length. Exact number of transfers in a burst.
  43. output s_axi_awsize_i, // Burst Size. Number of bytes in each transfer.
  44. output s_axi_awburst_i, // Burst Type. Type of burst operation and size determine how the address is incremented.
  45. output s_axi_awvalid_i, // Write Address Valid
  46. output s_axi_wdata_i,// Write Data
  47. output s_axi_wstrb_i, // Write Strobe. This signal indicates which byte lanes hold valid data.
  48. output s_axi_wlast_i, // Write Last. This signal indicates the last transfer in a burst.
  49. output s_axi_wvalid_i, // Write Valid. This signal indicates that the write data on the bus is valid.
  50. output s_axi_bready_i, // Write Response Ready. This signal indicates that the master is ready to accept a write response.
  51. output s_axi_araddr_i, // Read Address. This signal is the address of the first transfer in a burst.
  52. output s_axi_arlen_i, // Burst Length. Exact number of transfers in a burst.
  53. output s_axi_arsize_i,
  54. output s_axi_arburst_i,
  55. output s_axi_arvalid_i,
  56. output s_axi_rready_i,
  57. input s_axi_awready_o,
  58. input s_axi_wready_o,
  59. input s_axi_bresp_o,
  60. input s_axi_bvalid_o,
  61. input s_axi_arready_o,
  62. input s_axi_rdata_o,
  63. input s_axi_rlast_o,
  64. input s_axi_rresp_o,
  65. input s_axi_rvalid_o
  66. );
  67. modport slave (
  68. input s_axi_aclk_i,
  69. input s_axi_aresetn_i,
  70. /* Input AXI4 FULL Signals */
  71. input s_axi_awaddr_i, // Write Address
  72. input s_axi_awlen_i, // Burst Length. Exact number of transfers in a burst.
  73. input s_axi_awsize_i, // Burst Size. Number of bytes in each transfer.
  74. input s_axi_awburst_i, // Burst Type. Type of burst operation and size determine how the address is incremented.
  75. input s_axi_awvalid_i, // Write Address Valid
  76. input s_axi_wdata_i,// Write Data
  77. input s_axi_wstrb_i, // Write Strobe. This signal indicates which byte lanes hold valid data.
  78. input s_axi_wlast_i, // Write Last. This signal indicates the last transfer in a burst.
  79. input s_axi_wvalid_i, // Write Valid. This signal indicates that the write data on the bus is valid.
  80. input s_axi_bready_i, // Write Response Ready. This signal indicates that the master is ready to accept a write response.
  81. input s_axi_araddr_i, // Read Address. This signal is the address of the first transfer in a burst.
  82. input s_axi_arlen_i, // Burst Length. Exact number of transfers in a burst.
  83. input s_axi_arsize_i,
  84. input s_axi_arburst_i,
  85. input s_axi_arvalid_i,
  86. input s_axi_rready_i,
  87. output s_axi_awready_o,
  88. output s_axi_wready_o,
  89. output s_axi_bresp_o,
  90. output s_axi_bvalid_o,
  91. output s_axi_arready_o,
  92. output s_axi_rdata_o,
  93. output s_axi_rlast_o,
  94. output s_axi_rresp_o,
  95. output s_axi_rvalid_o
  96. );
  97. endinterface