URL
https://opencores.org/ocsvn/t6507lp/t6507lp/trunk
[/] [t6507lp/] [trunk/] [rtl/] [verilog/] [t6507lp_alu_tb.v] - Diff between revs 156 and 158
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 156 |
Rev 158 |
Line 466... |
Line 466... |
alu_status_expected[V] = alu_a[6];
|
alu_status_expected[V] = alu_a[6];
|
alu_status_expected[N] = alu_a[7];
|
alu_status_expected[N] = alu_a[7];
|
check();
|
check();
|
end
|
end
|
|
|
|
// PHA
|
|
alu_opcode = PHA_IMP;
|
|
@(negedge clk);
|
|
//$display("i = %d alu_opcode = %h alu_enable = %d", i, alu_opcode, alu_enable);
|
|
//$display("DUT.A = %h DUT.X = %h DUT.Y = %h", DUT.A, DUT.X, DUT.Y);
|
|
//$display("op1 = %d op2 = %d c = %d d = %d n = %d v = %d result = %d", alu_a, DUT.A, alu_status[C], alu_status[D], alu_status[N], alu_status[V], alu_result);
|
|
alu_result_expected = DUT.A;
|
|
check();
|
|
|
|
// PHP
|
|
alu_opcode = PHP_IMP;
|
|
@(negedge clk);
|
|
//$display("i = %d alu_opcode = %h alu_enable = %d", i, alu_opcode, alu_enable);
|
|
//$display("DUT.A = %h DUT.X = %h DUT.Y = %h", DUT.A, DUT.X, DUT.Y);
|
|
//$display("op1 = %d op2 = %d c = %d d = %d n = %d v = %d result = %d", alu_a, DUT.A, alu_status[C], alu_status[D], alu_status[N], alu_status[V], alu_result);
|
|
alu_status_expected = DUT.STATUS;
|
|
check();
|
|
|
|
// BRK
|
|
alu_opcode = BRK_IMP;
|
|
@(negedge clk);
|
|
alu_status_expected[B] = 1;
|
|
check();
|
|
|
// SEC
|
// SEC
|
alu_opcode = SEC_IMP;
|
alu_opcode = SEC_IMP;
|
@(negedge clk);
|
@(negedge clk);
|
alu_status_expected[C] = 1;
|
alu_status_expected[C] = 1;
|
check();
|
check();
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.