在仿真电路时,Run 一定time后,添加要观察的信号后,无论如何都没波形数据,出现No Data,原来是顺序问题(我的是这么回事):
or1200仿真TB文件:
`timescale 1ns/100ps
module or1200_tb();
reg CLOCK_50;
reg rst;
initial begin
CLOCK_50 = 1'b0;//时钟20ns一个周期,所以时钟频率是50MHZ
forever #10 CLOCK_50 = ~CLOCK_50;
end
initial begin
rst = 1'b1;//复位信号
#200 rst = 1'b0;//在200ns处复位结束
#1000 $stop;//仿真过程持续1000ns
end
or1200_top or1200_top_inst //openrisc最小系统,除了时钟、复位信号外,其余全部设置位0
(
// System
.clk_i(CLOCK_50), .rst_i(rst), .pic_ints_i(20'b0), .clmode_i(2'b00),
// Instruction WISHBONE INTERFACE
.iwb_clk_i(CLOCK_50), .iwb_rst_i(rst), .iwb_ack_i(1'b0), .iwb_err_i(1'b0), .iwb_rty_i(1'b0), .iwb_dat_i(32'b0),
.iwb_cyc_o(), .iwb_adr_o(), .iwb_stb_o(), .iwb_we_o(), .iwb_sel_o(), .iwb_dat_o(),
`ifdef OR1200_WB_CAB
.iwb_cab_o(),
`endif
`ifdef OR1200_WB_B3
.iwb_cti_o(), .iwb_bte_o(),
`endif
// Data WISHBONE INTERFACE
.dwb_clk_i(CLOCK_50), .dwb_rst_i(rst), .dwb_ack_i(1'b0), .dwb_err_i(1'b0), .dwb_rty_i(1'b0), .dwb_dat_i(32'b0),
.dwb_cyc_o(), .dwb_adr_o(), .dwb_stb_o(), .dwb_we_o(), .dwb_sel_o(), .dwb_dat_o(),
`ifdef OR1200_WB_CAB
.dwb_cab_o(),
`endif
`ifdef OR1200_WB_B3
.dwb_cti_o(), .dwb_bte_o(),
`endif
// External Debug Interface
.dbg_stall_i(1'b0), .dbg_ewt_i(1'b0), .dbg_lss_o(), .dbg_is_o(), .dbg_wp_o(), .dbg_bp_o(),
.dbg_stb_i(1'b0), .dbg_we_i(1'b0), .dbg_adr_i(0), .dbg_dat_i(0), .dbg_dat_o(), .dbg_ack_o(),
`ifdef OR1200_BIST
// RAM BIST
.mbist_si_i(1'b0), .mbist_so_o(), .mbist_ctrl_i(0),
`endif
// Power Management
.pm_cpustall_i(1'b0),
.pm_clksd_o(), .pm_dc_gate_o(), .pm_ic_gate_o(), .pm_dmmu_gate_o(),
.pm_immu_gate_o(), .pm_tt_gate_o(), .pm_cpu_gate_o(), .pm_wakeup_o(), .pm_lvolt_o(),
.sig_tick()
);
endmodule
指令内存数据:
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
a4000000
e020004d
e040004d
9c21000a
e0420800
15000001
00000000
指令共有6条
仿真结果:
继续看书~~~~~~