OpenCores
URL https://opencores.org/ocsvn/t6507lp/t6507lp/trunk

Subversion Repositories t6507lp

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /t6507lp/trunk
    from Rev 185 to Rev 184
    Reverse comparison

Rev 185 → Rev 184

/fv/cvrg/t6507lp/3f6bfca4_00000000.model Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
fv/cvrg/t6507lp/3f6bfca4_00000000.model Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: fv/cvrg/t6507lp/alu/icc.data =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: fv/cvrg/t6507lp/alu/icc.data =================================================================== --- fv/cvrg/t6507lp/alu/icc.data (revision 185) +++ fv/cvrg/t6507lp/alu/icc.data (nonexistent)
fv/cvrg/t6507lp/alu/icc.data Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: fv/alu_input.e =================================================================== --- fv/alu_input.e (revision 185) +++ fv/alu_input.e (revision 184) @@ -12,7 +12,7 @@ alu_opcode: valid_opcodes; alu_a: byte; -// keep test_kind == RAND; + keep test_kind == RAND; when REGULAR'test_kind alu_input_s { keep soft input_kind == select { @@ -46,7 +46,7 @@ event T1_cover_event; cover T1_cover_event is { - item input_kind using no_collect=TRUE, ignore = (input_kind == ENABLED_RAND || input_kind == DISABLED_RAND); + item input_kind using no_collect=TRUE; item alu_opcode using num_of_buckets=256, radix=HEX, no_collect=TRUE; cross input_kind, alu_opcode; //item alu_a; @@ -74,7 +74,7 @@ when DISABLED_RAND'input_kind alu_input_s { keep reset_n == TRUE; // remember this is active low - keep alu_enable == FALSE; + keep alu_enable == TRUE; keep alu_a in [0..255]; keep rand_op in [0..255]; };
/fv/alu_bfm.e
28,15 → 28,13
 
if (data.test_kind == REGULAR) {
emit data.T1_cover_event;
alu_opcode$ = data.alu_opcode.as_a(byte);
alu_opcode$ = data.rand_op;
}
else {
emit data.T2_cover_event;
alu_opcode$ = data.rand_op;
};
alu_opcode$ = data.alu_opcode.as_a(byte);
};
 
 
reset_n$ = data.reset_n;
alu_enable$ = data.alu_enable;
alu_a$ = data.alu_a;
/fv/alu_chk.e
56,12 → 56,12
reg_x = 0;
reg_y = 0;
reg_status = 8'b00100010;
reg_a = 0;
reg_a = 0; // TODO: check this
reg_result = 0;
}
else {
//out ("CYCLE ", count_cycles, " COMPARE:");
//print inst;
out ("CYCLE ", count_cycles, " COMPARE:");
print inst;
 
if (count_cycles == 99999) {
out("ENOUGH!");
79,52 → 79,7
case inst.input_kind {
ENABLED_VALID: {
//out("CYCLE ", count_cycles, ": executing and comparing");
execute(inst.alu_opcode);
 
if (reg_status[3:3] == 1) {
case inst.alu_opcode {
SBC_IMM: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ZPG: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ZPX: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ABS: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ABX: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ABY: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_IDX: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_IDY: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
};
};
execute();
};
RESET: {
reg_x = 0;
136,53 → 91,7
return;
};
ENABLED_RAND: {
execute(inst.rand_op.as_a(valid_opcodes));
if (reg_status[3:3] == 1) {
case inst.rand_op.as_a(valid_opcodes) {
SBC_IMM: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ZPG: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ZPX: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ABS: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ABX: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_ABY: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_IDX: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
SBC_IDY: {
reg_a = alu_result;
reg_result = alu_result;
reg_status = alu_status;
};
};
};
 
execute();
};
default: {
};
205,8 → 114,8
};
};
 
execute(opcode : valid_opcodes) is {
case opcode {
execute() is {
case inst.alu_opcode {
ADC_IMM: { exec_sum(); }; // A,Z,C,N = A+M+C
ADC_ZPG: { exec_sum(); };
ADC_ZPX: { exec_sum(); };
348,12 → 257,12
reg_status[5:5] = 1; // this is always one
};
 
ROL_ACC: { exec_rot(TRUE, reg_a); reg_a = reg_result; };
ROL_ACC: { exec_rot(TRUE, reg_a); };
ROL_ZPG: { exec_rot(TRUE, inst.alu_a); };
ROL_ZPX: { exec_rot(TRUE, inst.alu_a); };
ROL_ABS: { exec_rot(TRUE, inst.alu_a); };
ROL_ABX: { exec_rot(TRUE, inst.alu_a); };
ROR_ACC: { exec_rot(FALSE, reg_a); reg_a = reg_result; };
ROR_ACC: { exec_rot(FALSE, reg_a); };
ROR_ZPG: { exec_rot(FALSE, inst.alu_a); };
ROR_ZPX: { exec_rot(FALSE, inst.alu_a); };
ROR_ABS: { exec_rot(FALSE, inst.alu_a); };
394,10 → 303,8
TSX_IMP: { exec_transfer(inst.alu_a, reg_x); };
TXA_IMP: { exec_transfer(reg_x, reg_a); };
TXS_IMP: { };
TYA_IMP: { exec_transfer(reg_y, reg_a); }; // A = Y
TYA_IMP: { exec_transfer(reg_y, reg_a); reg_result = reg_y; }; // A = Y
 
// note: tya and txa do not update the result register
 
default: {
// all the random generated opcodes will fall here
}
415,8 → 322,6
var op1 : int;
var op2 : int;
 
warning("EXECUTING SBC DECIMAL! IGNORING RESULT!");
 
//out("i am subtracting ", reg_a, " and ", inst.alu_a, " carry is ", reg_status[0:0]);
 
op1 = inst.alu_a[3:0];
444,7 → 349,7
};
reg_result[3:0] = op1;
reg_result[7:4] = op2;
reg_result[7:4] = op2;
}
else {
reg_result = reg_a - inst.alu_a - 1 + reg_status[0:0];
465,24 → 370,25
 
};
 
exec_rot(left : bool, arg1 : byte) is {
exec_rot(left : bool, arg1 : *byte) is {
var oldcarry : bit;
 
if (left) {
oldcarry = reg_status[0:0];
reg_status[0:0] = arg1[7:7];
reg_result = arg1 << 1;
reg_result[0:0] = oldcarry;
arg1 = arg1 << 1;
arg1[0:0] = oldcarry;
}
else {
oldcarry = reg_status[0:0];
reg_status[0:0] = arg1[0:0];
reg_result = arg1 >> 1;
reg_result[7:7] = oldcarry;
arg1 = arg1 >> 1;
arg1[7:7] = oldcarry;
};
 
update_z(reg_result);
update_n(reg_result);
reg_result = arg1;
update_z(arg1);
update_n(arg1);
};
 
exec_or() is {

powered by: WebSVN 2.1.0

© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.