You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

axi_interface.sv 3.7 KiB

4 kuukautta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. interface axi_if(input bit CLK);
  2. //Declaration of Write Address Channel Signals
  3. logic ARESETn;
  4. logic [3:0] AWID;
  5. logic [31:0] AWADDR;
  6. logic [7:0] AWLEN;
  7. logic [2:0] AWSIZE;
  8. logic [1:0] AWBURST;
  9. logic AWVALID;
  10. logic AWREADY;
  11. //Declaration of Write Data Channel Signals
  12. logic [3:0] WID;
  13. logic [31:0] WDATA;
  14. logic [3:0] WSTRB;
  15. logic WLAST;
  16. logic WVALID;
  17. logic WREADY;
  18. //Declaration of Write Response Channel Signals
  19. logic [3:0] BID;
  20. logic [1:0] BRESP;
  21. logic BVALID;
  22. logic BREADY;
  23. //Declaration of Read Address Channel Signals
  24. logic [3:0] ARID;
  25. logic [31:0] ARADDR;
  26. logic [7:0] ARLEN;
  27. logic [2:0] ARSIZE;
  28. logic [1:0] ARBURST;
  29. logic ARVALID;
  30. logic ARREADY;
  31. //Declaration of Read Data Channel Signals
  32. logic [3:0] RID;
  33. logic [31:0] RDATA;
  34. logic [1:0] RRESP;
  35. logic RLAST;
  36. logic RVALID;
  37. logic RREADY;
  38. //Master Driver Clocking Block
  39. clocking mst_drv_cb@(posedge CLK);
  40. default input #1 output #1;
  41. //input signals from Write Address Channel
  42. input AWREADY;
  43. //input signals from Write Data Channel
  44. input WREADY;
  45. //input signals from Write Response Channel
  46. input BID,BRESP,BVALID;
  47. //input signals from Read Address Channel
  48. input ARREADY;
  49. //input signals from Read Data Channel
  50. input RID,RDATA,RRESP,RLAST,RVALID;
  51. //output from Write Address Channel
  52. output ARESETn, AWID,AWADDR,AWLEN,AWSIZE,AWBURST,AWVALID;
  53. //ouput from Write Data Channel
  54. output WID,WDATA,WSTRB,WLAST,WVALID;
  55. //output from Write Response Channel
  56. output BREADY;
  57. //output from Read Address Channel
  58. output ARID,ARADDR,ARLEN,ARSIZE,ARBURST,ARVALID;
  59. //output from Read Data Channel
  60. output RREADY;
  61. endclocking
  62. //Master Monitor Clocking Block
  63. clocking mst_mon_cb@(posedge CLK);
  64. default input #1 output #1;
  65. //input signals from Write Address Channel
  66. input ARESETn, AWID,AWADDR,AWLEN,AWSIZE,AWBURST,AWVALID,AWREADY;
  67. //input signals from Write Data Channel
  68. input WID,WDATA,WSTRB,WLAST,WVALID,WREADY;
  69. //input signals from Write Response Channel
  70. input BID,BRESP,BVALID,BREADY;
  71. //input signals from Read Address Channel
  72. input ARID,ARADDR,ARLEN,ARSIZE,ARBURST,ARVALID,ARREADY;
  73. //input signals from Read Data Channel
  74. input RID,RDATA,RRESP,RLAST,RVALID,RREADY;
  75. endclocking
  76. //Slave Driver Clocking Block
  77. clocking slv_drv_cb@(posedge CLK);
  78. default input #1 output #1;
  79. //input from Write Address Channel
  80. input ARESETn, AWID,AWADDR,AWLEN,AWSIZE,AWBURST,AWVALID;
  81. //ouput from Write Data Channel
  82. input WID,WDATA,WSTRB,WLAST,WVALID;
  83. //input from Write Response Channel
  84. input BREADY;
  85. //input from Read Address Channel
  86. input ARID,ARADDR,ARLEN,ARSIZE,ARBURST,ARVALID;
  87. //input from Read Data Channel
  88. input RREADY;
  89. //output signals from Write Address Channel
  90. output AWREADY;
  91. //output signals from Write Data Channel
  92. output WREADY;
  93. //output signals from Write Response Channel
  94. output BID,BRESP,BVALID;
  95. //output signals from Read Address Channel
  96. output ARREADY;
  97. //output signals from Read Data Channel
  98. output RID,RDATA,RRESP,RLAST,RVALID;
  99. endclocking
  100. //Slave Monitor Clocking Block
  101. clocking slv_mon_cb@(posedge CLK);
  102. default input #1 output #1;
  103. //input signals from Write Address Channel
  104. input ARESETn, AWID,AWADDR,AWLEN,AWSIZE,AWBURST,AWVALID,AWREADY;
  105. //input signals from Write Data Channel
  106. input WID,WDATA,WSTRB,WLAST,WVALID,WREADY;
  107. //input signals from Write Response Channel
  108. input BID,BRESP,BVALID,BREADY;
  109. //input signals from Read Address Channel
  110. input ARID,ARADDR,ARLEN,ARSIZE,ARBURST,ARVALID,ARREADY;
  111. //input signals from Read Data Channel
  112. input RID,RDATA,RRESP,RLAST,RVALID,RREADY;
  113. endclocking
  114. modport MST_DRV(clocking mst_drv_cb);
  115. modport MST_MON(clocking mst_mon_cb);
  116. modport SLV_DRV(clocking slv_drv_cb);
  117. modport SLV_MON(clocking slv_mon_cb);
  118. endinterface