TMC working and tested
This commit is contained in:
@@ -21,15 +21,15 @@ MAKECPP=(cd obj_dir && make -j -f VVortex.mk)
|
||||
|
||||
# -LDFLAGS '-lsystemc'
|
||||
VERILATOR:
|
||||
echo "#define VCD_OFF" > tb_debug.h
|
||||
echo "#define VCD_OFF" > simulate/tb_debug.h
|
||||
verilator $(COMP) -cc $(FILE) $(INCLUDE) $(EXE) $(LIB) $(CF)
|
||||
|
||||
VERILATORnoWarnings:
|
||||
echo "#define VCD_OFF" > tb_debug.h
|
||||
echo "#define VCD_OFF" > simulate/tb_debug.h
|
||||
verilator $(COMP) -cc $(FILE) $(INCLUDE) $(EXE) $(LIB) $(CF) $(WNO)
|
||||
|
||||
compdebug:
|
||||
echo "#define VCD_OUTPUT" > tb_debug.h
|
||||
echo "#define VCD_OUTPUT" > simulate/tb_debug.h
|
||||
verilator $(COMP) -cc $(FILE) $(INCLUDE) $(EXE) $(LIB) -CFLAGS '-std=c++11 -DVL_DEBUG' $(WNO) $(DEB)
|
||||
|
||||
RUNFILE: VERILATOR
|
||||
|
||||
@@ -30,7 +30,14 @@ wire execute_jal;
|
||||
wire[31:0] execute_jal_dest;
|
||||
|
||||
|
||||
VX_wb_inter VX_writeback_temp();
|
||||
assign VX_writeback_inter.wb = VX_writeback_temp.wb;
|
||||
assign VX_writeback_inter.rd = VX_writeback_temp.rd;
|
||||
assign VX_writeback_inter.write_data = VX_writeback_temp.write_data;
|
||||
assign VX_writeback_inter.wb_valid = VX_writeback_temp.wb_valid;
|
||||
assign VX_writeback_inter.wb_warp_num = VX_writeback_temp.wb_warp_num;
|
||||
|
||||
// assign VX_writeback_inter(VX_writeback_temp);
|
||||
|
||||
|
||||
VX_mw_wb_inter VX_mw_wb();
|
||||
@@ -59,7 +66,7 @@ VX_gpu_inst_req_inter VX_gpu_inst_req();
|
||||
VX_gpr_stage VX_gpr_stage(
|
||||
.clk (clk),
|
||||
.schedule_delay (schedule_delay),
|
||||
.VX_writeback_inter(VX_writeback_inter),
|
||||
.VX_writeback_inter(VX_writeback_temp),
|
||||
.VX_bckE_req (VX_bckE_req),
|
||||
.VX_bckE_req_out (VX_bckE_req_out),
|
||||
.VX_gpr_data (VX_gpr_data)
|
||||
@@ -108,7 +115,7 @@ VX_writeback VX_wb(
|
||||
.VX_mem_wb (VX_mem_wb),
|
||||
.VX_inst_exec_wb (VX_inst_exec_wb),
|
||||
|
||||
.VX_writeback_inter(VX_writeback_inter)
|
||||
.VX_writeback_inter(VX_writeback_temp)
|
||||
);
|
||||
|
||||
endmodule
|
||||
@@ -30,6 +30,7 @@ module VX_fetch (
|
||||
// Wspawn
|
||||
.wspawn (VX_warp_ctl.wspawn),
|
||||
.wsapwn_pc (VX_warp_ctl.wspawn_pc),
|
||||
// .wspawn_warp_num(VX_warp_ctl.warp_num),
|
||||
// CTM
|
||||
.ctm (VX_warp_ctl.change_mask),
|
||||
.ctm_mask (VX_warp_ctl.thread_mask),
|
||||
|
||||
@@ -14,12 +14,13 @@ module VX_gpgpu_inst (
|
||||
assign tmc_new_mask[curr_t] = curr_t < VX_gpu_inst_req.a_reg_data[0];
|
||||
end
|
||||
|
||||
wire valid_inst = (|VX_gpu_inst_req.valid);
|
||||
|
||||
assign VX_warp_ctl.warp_num = VX_gpu_inst_req.warp_num;
|
||||
assign VX_warp_ctl.change_mask = (VX_gpu_inst_req.is_tmc || VX_gpu_inst_req.is_split) && (|VX_gpu_inst_req.valid);
|
||||
assign VX_warp_ctl.change_mask = (VX_gpu_inst_req.is_tmc || VX_gpu_inst_req.is_split) && valid_inst;
|
||||
assign VX_warp_ctl.thread_mask = VX_gpu_inst_req.is_tmc ? tmc_new_mask : 0;
|
||||
|
||||
assign VX_warp_ctl.ebreak = (VX_gpu_inst_req.a_reg_data[0] == 0);
|
||||
assign VX_warp_ctl.ebreak = (VX_gpu_inst_req.a_reg_data[0] == 0) && valid_inst;
|
||||
|
||||
assign VX_warp_ctl.wspawn = 0;
|
||||
assign VX_warp_ctl.wspawn_pc = 0;
|
||||
|
||||
@@ -14,8 +14,8 @@ module VX_inst_multiplex (
|
||||
wire[`NT_M1:0] is_gpu_mask;
|
||||
|
||||
wire is_mem = (VX_bckE_req.mem_write != `NO_MEM_WRITE) || (VX_bckE_req.mem_read != `NO_MEM_READ);
|
||||
// wire is_gpu = (VX_bckE_req.is_wspawn || VX_bckE_req.is_tmc || VX_bckE_req.is_barrier || VX_bckE_req.is_split);
|
||||
wire is_gpu = 0;
|
||||
wire is_gpu = (VX_bckE_req.is_wspawn || VX_bckE_req.is_tmc || VX_bckE_req.is_barrier || VX_bckE_req.is_split);
|
||||
// wire is_gpu = 0;
|
||||
|
||||
genvar currT;
|
||||
for (currT = 0; currT < `NT; currT = currT + 1) begin
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
`include "VX_define.v"
|
||||
|
||||
module VX_warp_scheduler (
|
||||
@@ -40,6 +38,12 @@ module VX_warp_scheduler (
|
||||
|
||||
);
|
||||
|
||||
|
||||
wire in_wspawn = wspawn;
|
||||
wire in_ctm = ctm;
|
||||
wire in_whalt = whalt;
|
||||
wire in_wstall = wstall;
|
||||
|
||||
reg[`NW-1:0] warp_active;
|
||||
reg[`NW-1:0] warp_stalled;
|
||||
|
||||
@@ -95,6 +99,7 @@ module VX_warp_scheduler (
|
||||
// Changing thread masks
|
||||
if (ctm) begin
|
||||
thread_masks[ctm_warp_num] <= ctm_mask;
|
||||
warp_stalled[ctm_warp_num] <= 0;
|
||||
end
|
||||
|
||||
// Stalling the scheduling of warps
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Dynamic Instructions: 52683
|
||||
# of total cycles: 52699
|
||||
# of forwarding stalls: 0
|
||||
# of branch stalls: 0
|
||||
# CPI: 1.0003
|
||||
# time to simulate: 0 milliseconds
|
||||
# GRADE: Failed on test: 4294967295
|
||||
|
||||
@@ -378,21 +378,19 @@ bool Vortex::simulate(std::string file_to_simulate)
|
||||
// std::cout << "Counter: " << counter << "\n";
|
||||
// if ((this->stats_total_cycles) % 5000 == 0) std::cout << "************* Cycle: " << (this->stats_total_cycles) << "\n";
|
||||
// dstop = !dbus_driver();
|
||||
|
||||
vortex->clk = 1;
|
||||
vortex->eval();
|
||||
#ifdef VCD_OUTPUT
|
||||
m_trace->dump(2*this->stats_total_cycles);
|
||||
#endif
|
||||
vortex->clk = 1;
|
||||
vortex->eval();
|
||||
istop = ibus_driver();
|
||||
dstop = !dbus_driver();
|
||||
|
||||
|
||||
vortex->clk = 0;
|
||||
vortex->eval();
|
||||
#ifdef VCD_OUTPUT
|
||||
m_trace->dump((2*this->stats_total_cycles)+1);
|
||||
#endif
|
||||
vortex->clk = 0;
|
||||
vortex->eval();
|
||||
// stop = istop && dstop;
|
||||
stop = vortex->out_ebreak;
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#define VCD_OFF
|
||||
Reference in New Issue
Block a user