ЛР5. Исправление формата сообщений в тб

This commit is contained in:
Andrei Solodovnikov
2023-10-11 14:27:05 +03:00
committed by GitHub
parent 892387e0f4
commit 3ddc89235b

View File

@@ -245,7 +245,6 @@ module tb_decoder_riscv();
instr[6:0] = {SYSTEM_OPCODE,2'b11};
instr[31:7] = 25'h604000;
#delay;
$stop();
for (X=0; X<2**5-1; X=X+1) begin
for (V=0; V<cycle; V=V+1) begin
instr[1:0] = 2'b11;
@@ -276,27 +275,27 @@ module tb_decoder_riscv();
if (~illegal_miss) begin
if(!illegal_instr) begin
if (a_sel_miss)begin
$display ("Output 'a_sel_o ' is incorrect( %b instead of %b ), instruction: %s %s, time: %t",a_sel, grm.a_sel_o, instr_type, opcode_type, $time);
$display ("Output 'a_sel_o' is incorrect( %02b instead of %02b), instruction: %s %s, time: %t",a_sel, grm.a_sel_o, instr_type, opcode_type, $time);
error = error + 1'b1;
end
if (b_sel_miss)begin
$display ("Output 'b_sel_o ' is incorrect( %b instead of %b ), instruction: %s %s, time: %t",b_sel, grm.b_sel_o, instr_type, opcode_type, $time);
$display ("Output 'b_sel_o' is incorrect( %03b instead of %b), instruction: %s %s, time: %t",b_sel, grm.b_sel_o, instr_type, opcode_type, $time);
error = error + 1'b1;
end
if (alu_op_miss)begin
$display ("Output 'alu_op_o ' is incorrect(%b instead of %b), instruction: %s %s, time: %t",alu_op, grm.alu_op_o, instr_type, opcode_type, $time);
$display ("Output 'alu_op_o' is incorrect(%05b instead of %05b), instruction: %s %s, time: %t",alu_op, grm.alu_op_o, instr_type, opcode_type, $time);
error = error + 1'b1;
end
if (csr_op_miss) begin
$display ("Output 'csr_op_o ' is incorrect( %b instead of %b ), instruction: %s %s, time: %t",csr_op, grm.csr_op_o, instr_type, opcode_type, $time);
$display ("Output 'csr_op_o' is incorrect( %03b instead of %03b), instruction: %s %s, time: %t",csr_op, grm.csr_op_o, instr_type, opcode_type, $time);
error = error + 1'b1;
end
if (mem_size_miss)begin
$display ("Output 'mem_size_o ' is incorrect( %b instead of %b ), instruction: %s %s, time: %t",mem_size, grm.mem_size_o, instr_type, opcode_type, $time);
$display ("Output 'mem_size_o' is incorrect( %03b instead of %03b), instruction: %s %s, time: %t",mem_size, grm.mem_size_o, instr_type, opcode_type, $time);
error = error + 1'b1;
end
if (wb_sel_miss)begin
$display ("Output 'wb_sel_o ' is incorrect( %b instead of %b ), instruction: %s %s, time: %t",wb_sel, grm.wb_sel_o, instr_type, opcode_type, $time);
$display ("Output 'wb_sel_o' is incorrect( %02b instead of %02b), instruction: %s %s, time: %t",wb_sel, grm.wb_sel_o, instr_type, opcode_type, $time);
error = error + 1'b1;
end
end