此处是指CPU内核部分的模块
一般来说包含:
- 流水线,ALU等核心部件
- AXI控制器
- 差分测试相关DPI
一般来说不包含:
- 仿真/综合/调试/chiplab等可能用到的各种RAM
- 各种AXI桥和AXI Slave
Chiplab要求的模块端口,接口均写死在Chiplab,如果要更改需要修改Chiplab的配置或源码
例外:双发射Chiplab有提供支持,参考最下面
module cpu_top(
input aclk,
input aresetn,
input [ 7:0] intrpt,
//AXI interface
//read reqest
output [ 3:0] arid,
output [31:0] araddr,
output [ 7:0] arlen,
output [ 2:0] arsize,
output [ 1:0] arburst,
output [ 1:0] arlock,
output [ 3:0] arcache,
output [ 2:0] arprot,
output arvalid,
input arready,
//read back
input [ 3:0] rid,
input [31:0] rdata,
input [ 1:0] rresp,
input rlast,
input rvalid,
output rready,
//write request
output [ 3:0] awid,
output [31:0] awaddr,
output [ 7:0] awlen,
output [ 2:0] awsize,
output [ 1:0] awburst,
output [ 1:0] awlock,
output [ 3:0] awcache,
output [ 2:0] awprot,
output awvalid,
input awready,
//write data
output [ 3:0] wid,
output [31:0] wdata,
output [ 3:0] wstrb,
output wlast,
output wvalid,
input wready,
//write back
input [ 3:0] bid,
input [ 1:0] bresp,
input bvalid,
output bready,
//debug info
output [31:0] debug0_wb_pc,
output [ 3:0] debug0_wb_rf_wen,
output [ 4:0] debug0_wb_rf_wnum,
output [31:0] debug0_wb_rf_wdata
#ifdef CPU_2CMT
,
output [31:0] debug1_wb_pc,
output [ 3:0] debug1_wb_rf_wen,
output [ 4:0] debug1_wb_rf_wnum,
output [31:0] debug1_wb_rf_wdata
#endif
);