Line 81... |
Line 81... |
|
|
`ifdef USE_DEBUG_0
|
`ifdef USE_DEBUG_0
|
output [255:0] debug_0,
|
output [255:0] debug_0,
|
`endif
|
`endif
|
|
|
|
`ifdef USE_EXT_JTAG
|
|
input jtag_tck_i,
|
|
input jtag_tms_i,
|
|
input jtag_tdo_i,
|
|
output jtag_tdi_o,
|
|
`endif
|
|
|
input sys_clk,
|
input sys_clk,
|
input sys_rst
|
input sys_rst
|
);
|
);
|
|
|
|
|
Line 94... |
Line 101... |
parameter dw = `OR1200_OPERAND_WIDTH;
|
parameter dw = `OR1200_OPERAND_WIDTH;
|
parameter aw = `OR1200_OPERAND_WIDTH;
|
parameter aw = `OR1200_OPERAND_WIDTH;
|
|
|
|
|
// System
|
// System
|
|
wire cpu0_rst_o;
|
wire clk_i = sys_clk;
|
wire clk_i = sys_clk;
|
|
// wire rst_i = sys_rst | cpu0_rst_o;
|
wire rst_i = sys_rst;
|
wire rst_i = sys_rst;
|
|
|
//---------------------------------------------------
|
//---------------------------------------------------
|
// Instruction WISHBONE interface
|
// Instruction WISHBONE interface
|
wire iwb_clk_i = sys_clk;
|
wire iwb_clk_i = sys_clk;
|
Line 128... |
Line 137... |
wire dwb_stb_o;
|
wire dwb_stb_o;
|
wire dwb_we_o;
|
wire dwb_we_o;
|
wire [3:0] dwb_sel_o;
|
wire [3:0] dwb_sel_o;
|
wire [dw-1:0] dwb_dat_o;
|
wire [dw-1:0] dwb_dat_o;
|
wire dwb_cab_o;
|
wire dwb_cab_o;
|
|
//---------------------------------------------------
|
|
// External Debug Interface
|
|
wire dbg_stall_i;
|
|
wire [3:0] dbg_lss_o; // External Load/Store Unit Status
|
|
wire [1:0] dbg_is_o; // External Insn Fetch Status
|
|
wire [10:0] dbg_wp_o; // Watchpoints Outputs
|
|
wire dbg_bp_o; // Breakpoint Output
|
|
wire dbg_stb_i; // External Address/Data Strobe
|
|
wire dbg_we_i; // External Write Enable
|
|
wire [aw-1:0] dbg_adr_i; // External Address Input
|
|
wire [dw-1:0] dbg_dat_i; // External Data Input
|
|
wire [dw-1:0] dbg_dat_o; // External Data Output
|
|
wire dbg_ack_o; // External Data Acknowledge (not WB compatible)
|
|
|
or1200_top i_or1200_top(
|
or1200_top i_or1200_top(
|
//---------------------------------------------------
|
//---------------------------------------------------
|
// Instruction WISHBONE interface
|
// Instruction WISHBONE interface
|
.iwb_clk_i(iwb_clk_i), // clock input
|
.iwb_clk_i(iwb_clk_i), // clock input
|
Line 176... |
Line 198... |
.dwb_bte_o(dwb_bte_o), // burst type extension
|
.dwb_bte_o(dwb_bte_o), // burst type extension
|
`endif
|
`endif
|
|
|
//---------------------------------------------------
|
//---------------------------------------------------
|
// External Debug Interface
|
// External Debug Interface
|
.dbg_stall_i(1'b0), // External Stall Input
|
.dbg_stall_i(dbg_stall_i), // External Stall Input
|
// .dbg_ewt_i(dbg_ewt_i), // External Watchpoint Trigger Input
|
.dbg_ewt_i(1'b0), // External Watchpoint Trigger Input
|
// .dbg_lss_o(dbg_lss_o), // External Load/Store Unit Status
|
// .dbg_lss_o(dbg_lss_o), // External Load/Store Unit Status
|
// .dbg_is_o(dbg_is_o), // External Insn Fetch Status
|
// .dbg_is_o(dbg_is_o), // External Insn Fetch Status
|
// .dbg_wp_o(dbg_wp_o), // Watchpoints Outputs
|
// .dbg_wp_o(dbg_wp_o), // Watchpoints Outputs
|
// .dbg_bp_o(dbg_bp_o), // Breakpoint Output
|
.dbg_bp_o(dbg_bp_o), // Breakpoint Output
|
// .dbg_stb_i(dbg_stb_i), // External Address/Data Strobe
|
.dbg_stb_i(dbg_stb_i), // External Address/Data Strobe
|
// .dbg_we_i(dbg_we_i), // External Write Enable
|
.dbg_we_i(dbg_we_i), // External Write Enable
|
// .dbg_adr_i(dbg_adr_i), // External Address Input
|
.dbg_adr_i(dbg_adr_i), // External Address Input
|
// .dbg_dat_i(dbg_dat_i), // External Data Input
|
.dbg_dat_i(dbg_dat_i), // External Data Input
|
// .dbg_dat_o(dbg_dat_o), // External Data Output
|
.dbg_dat_o(dbg_dat_o), // External Data Output
|
// .dbg_ack_o(dbg_ack_o), // External Data Acknowledge (not WB compatible)
|
.dbg_ack_o(dbg_ack_o), // External Data Acknowledge (not WB compatible)
|
|
|
|
|
//---------------------------------------------------
|
//---------------------------------------------------
|
// RAM BIST
|
// RAM BIST
|
`ifdef OR1200_BIST
|
`ifdef OR1200_BIST
|
Line 219... |
Line 241... |
// .pic_ints_i(pic_ints_i),
|
// .pic_ints_i(pic_ints_i),
|
.clk_i(clk_i),
|
.clk_i(clk_i),
|
.rst_i(rst_i)
|
.rst_i(rst_i)
|
);
|
);
|
|
|
|
|
|
//---------------------------------------------------
|
|
// adbg_top
|
|
wire [31:0] adbg_wb_adr_o;
|
|
wire [31:0] adbg_wb_dat_o;
|
|
wire [31:0] adbg_wb_dat_i;
|
|
wire adbg_wb_cyc_o;
|
|
wire adbg_wb_stb_o;
|
|
wire [3:0] adbg_wb_sel_o;
|
|
wire adbg_wb_we_o;
|
|
wire adbg_wb_ack_i;
|
|
wire adbg_wb_cab_o;
|
|
wire adbg_wb_err_i;
|
|
wire [2:0] adbg_wb_cti_o;
|
|
wire [1:0] adbg_wb_bte_o;
|
|
|
|
`ifdef USE_ADV_DEBUG_SYS
|
|
soc_adv_dbg
|
|
i_soc_adv_dbg(
|
|
`ifdef USE_EXT_JTAG
|
|
.jtag_tck_i(jtag_tck_i),
|
|
.jtag_tms_i(jtag_tms_i),
|
|
.jtag_tdo_i(jtag_tdo_i),
|
|
.jtag_tdi_o(jtag_tdi_o),
|
|
`endif
|
|
.wb_clk_i(dwb_clk_i), // WISHBONE common signals
|
|
.wb_adr_o(adbg_wb_adr_o), // WISHBONE master interface
|
|
.wb_dat_o(adbg_wb_dat_o),
|
|
.wb_dat_i(adbg_wb_dat_i),
|
|
.wb_cyc_o(adbg_wb_cyc_o),
|
|
.wb_stb_o(adbg_wb_stb_o),
|
|
.wb_sel_o(adbg_wb_sel_o),
|
|
.wb_we_o(adbg_wb_we_o),
|
|
.wb_ack_i(adbg_wb_ack_i),
|
|
.wb_cab_o(adbg_wb_cab_o),
|
|
.wb_err_i(adbg_wb_err_i),
|
|
.wb_cti_o(adbg_wb_cti_o),
|
|
.wb_bte_o(adbg_wb_bte_o),
|
|
.cpu0_clk_i(dwb_clk_i), // CPU signals
|
|
.cpu0_addr_o(dbg_adr_i),
|
|
.cpu0_data_i(dbg_dat_o),
|
|
.cpu0_data_o(dbg_dat_i),
|
|
.cpu0_bp_i(dbg_bp_o),
|
|
.cpu0_stall_o(dbg_stall_i),
|
|
.cpu0_stb_o(dbg_stb_i),
|
|
.cpu0_we_o(dbg_we_i),
|
|
.cpu0_ack_i(dbg_ack_o),
|
|
.cpu0_rst_o(cpu0_rst_o)
|
|
);
|
|
`else
|
|
assign dbg_stall_i = 1'b0;
|
|
assign adbg_wb_dat_o = 32'h0000_0000;
|
|
assign adbg_wb_adr_o = 32'h0000_0000;
|
|
assign adbg_wb_sel_o = 4'h0;
|
|
assign adbg_wb_we_o = 1'b0;
|
|
assign adbg_wb_cyc_o = 1'b0;
|
|
assign adbg_wb_stb_o = 1'b0;
|
|
`endif
|
|
|
|
|
//---------------------------------------------------
|
//---------------------------------------------------
|
// remap mux
|
// remap mux
|
wire [1:0] boot_remap;
|
wire [1:0] boot_remap;
|
|
|
// instruction wb remap mux
|
// instruction wb remap mux
|
Line 359... |
Line 441... |
i_wb_conmax_top(
|
i_wb_conmax_top(
|
// Master 0 Interface
|
// Master 0 Interface
|
.m0_data_i(iwb_dat_o),
|
.m0_data_i(iwb_dat_o),
|
.m0_data_o(iwb_dat_i),
|
.m0_data_o(iwb_dat_i),
|
.m0_addr_i( iwb_remap_adr_o ),
|
.m0_addr_i( iwb_remap_adr_o ),
|
// .m0_addr_i( iwb_adr_o ),
|
|
.m0_sel_i(iwb_sel_o),
|
.m0_sel_i(iwb_sel_o),
|
.m0_we_i(iwb_we_o),
|
.m0_we_i(iwb_we_o),
|
.m0_cyc_i(iwb_cyc_o),
|
.m0_cyc_i(iwb_cyc_o),
|
.m0_stb_i(iwb_stb_o),
|
.m0_stb_i(iwb_stb_o),
|
.m0_ack_o(iwb_ack_i),
|
.m0_ack_o(iwb_ack_i),
|
Line 371... |
Line 452... |
.m0_rty_o(iwb_rty_i),
|
.m0_rty_o(iwb_rty_i),
|
// Master 1 Interface
|
// Master 1 Interface
|
.m1_data_i(dwb_dat_o),
|
.m1_data_i(dwb_dat_o),
|
.m1_data_o(dwb_dat_i),
|
.m1_data_o(dwb_dat_i),
|
.m1_addr_i(dwb_remap_adr_o),
|
.m1_addr_i(dwb_remap_adr_o),
|
// .m1_addr_i(dwb_adr_o),
|
|
.m1_sel_i(dwb_sel_o),
|
.m1_sel_i(dwb_sel_o),
|
.m1_we_i(dwb_we_o),
|
.m1_we_i(dwb_we_o),
|
.m1_cyc_i(dwb_cyc_o),
|
.m1_cyc_i(dwb_cyc_o),
|
.m1_stb_i(dwb_stb_o),
|
.m1_stb_i(dwb_stb_o),
|
.m1_ack_o(dwb_ack_i),
|
.m1_ack_o(dwb_ack_i),
|
.m1_err_o(dwb_err_i),
|
.m1_err_o(dwb_err_i),
|
.m1_rty_o(dwb_rty_i),
|
.m1_rty_o(dwb_rty_i),
|
// Master 2 Interface
|
// Master 2 Interface
|
.m2_data_i(32'h0000_0000),
|
.m2_data_i(adbg_wb_dat_o),
|
.m2_addr_i(32'h0000_0000),
|
.m2_data_o(adbg_wb_dat_i),
|
.m2_sel_i(4'h0),
|
.m2_addr_i(adbg_wb_adr_o),
|
.m2_we_i(1'b0),
|
.m2_sel_i(adbg_wb_sel_o),
|
.m2_cyc_i(1'b0),
|
.m2_we_i(adbg_wb_we_o),
|
.m2_stb_i(1'b0),
|
.m2_cyc_i(adbg_wb_cyc_o),
|
|
.m2_stb_i(adbg_wb_stb_o),
|
|
.m2_ack_o(adbg_wb_ack_i),
|
|
.m2_err_o(adbg_wb_err_i),
|
|
.m2_rty_o(),
|
// Master 3 Interface
|
// Master 3 Interface
|
.m3_data_i(32'h0000_0000),
|
.m3_data_i(32'h0000_0000),
|
.m3_addr_i(32'h0000_0000),
|
.m3_addr_i(32'h0000_0000),
|
.m3_sel_i(4'h0),
|
.m3_sel_i(4'h0),
|
.m3_we_i(1'b0),
|
.m3_we_i(1'b0),
|