Line 27... |
Line 27... |
/* */
|
/* */
|
/* Author(s): */
|
/* Author(s): */
|
/* - Olivier Girard, olgirard@gmail.com */
|
/* - Olivier Girard, olgirard@gmail.com */
|
/* */
|
/* */
|
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
/* $Rev: 19 $ */
|
/* $Rev: 111 $ */
|
/* $LastChangedBy: olivier.girard $ */
|
/* $LastChangedBy: olivier.girard $ */
|
/* $LastChangedDate: 2009-08-04 23:47:15 +0200 (Tue, 04 Aug 2009) $ */
|
/* $LastChangedDate: 2011-05-20 22:39:02 +0200 (Fri, 20 May 2011) $ */
|
/*===========================================================================*/
|
/*===========================================================================*/
|
|
|
initial
|
initial
|
begin
|
begin
|
$display(" ===============================================");
|
$display(" ===============================================");
|
Line 53... |
Line 53... |
|
|
|
|
// Addressing mode: @Rn
|
// Addressing mode: @Rn
|
@(r15==16'h2000);
|
@(r15==16'h2000);
|
if (mem200 !==16'h0024) tb_error("====== SXT (@Rn mode): test 1 (result) =====");
|
if (mem200 !==16'h0024) tb_error("====== SXT (@Rn mode): test 1 (result) =====");
|
if (r4 !==16'h0200) tb_error("====== SXT (@Rn mode): test 1 (address) =====");
|
if (r4 !==(`PER_SIZE+16'h0000)) tb_error("====== SXT (@Rn mode): test 1 (address) =====");
|
if (r5 !==16'h0001) tb_error("====== SXT (@Rn mode): test 1 (C flag) =====");
|
if (r5 !==16'h0001) tb_error("====== SXT (@Rn mode): test 1 (C flag) =====");
|
|
|
if (mem202 !==16'hffb6) tb_error("====== SXT (@Rn mode): test 2 (result) =====");
|
if (mem202 !==16'hffb6) tb_error("====== SXT (@Rn mode): test 2 (result) =====");
|
if (r6 !==16'h0202) tb_error("====== SXT (@Rn mode): test 2 (address) =====");
|
if (r6 !==(`PER_SIZE+16'h0002)) tb_error("====== SXT (@Rn mode): test 2 (address) =====");
|
if (r7 !==16'h0005) tb_error("====== SXT (@Rn mode): test 2 (C flag) =====");
|
if (r7 !==16'h0005) tb_error("====== SXT (@Rn mode): test 2 (C flag) =====");
|
|
|
|
|
// Addressing mode: @Rn+
|
// Addressing mode: @Rn+
|
@(r15==16'h3000);
|
@(r15==16'h3000);
|
if (mem208 !==16'h0024) tb_error("====== SXT (@Rn+ mode): test 1 (result) =====");
|
if (mem208 !==16'h0024) tb_error("====== SXT (@Rn+ mode): test 1 (result) =====");
|
if (r4 !==16'h020A) tb_error("====== SXT (@Rn+ mode): test 1 (address) =====");
|
if (r4 !==(`PER_SIZE+16'h000A)) tb_error("====== SXT (@Rn+ mode): test 1 (address) =====");
|
if (r5 !==16'h0001) tb_error("====== SXT (@Rn+ mode): test 1 (C flag) =====");
|
if (r5 !==16'h0001) tb_error("====== SXT (@Rn+ mode): test 1 (C flag) =====");
|
|
|
if (mem20A !==16'hffb6) tb_error("====== SXT (@Rn+ mode): test 2 (result) =====");
|
if (mem20A !==16'hffb6) tb_error("====== SXT (@Rn+ mode): test 2 (result) =====");
|
if (r6 !==16'h020C) tb_error("====== SXT (@Rn+ mode): test 2 (address) =====");
|
if (r6 !==(`PER_SIZE+16'h000C)) tb_error("====== SXT (@Rn+ mode): test 2 (address) =====");
|
if (r7 !==16'h0005) tb_error("====== SXT (@Rn+ mode): test 2 (C flag) =====");
|
if (r7 !==16'h0005) tb_error("====== SXT (@Rn+ mode): test 2 (C flag) =====");
|
|
|
|
|
// Addressing mode: X(Rn)
|
// Addressing mode: X(Rn)
|
@(r15==16'h4000);
|
@(r15==16'h4000);
|