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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [sing-op_reti.v] - Diff between revs 111 and 134

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 111 Rev 134
Line 27... Line 27...
/*                                                                           */
/*                                                                           */
/* Author(s):                                                                */
/* Author(s):                                                                */
/*             - Olivier Girard,    olgirard@gmail.com                       */
/*             - Olivier Girard,    olgirard@gmail.com                       */
/*                                                                           */
/*                                                                           */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* $Rev: 111 $                                                                */
/* $Rev: 134 $                                                                */
/* $LastChangedBy: olivier.girard $                                          */
/* $LastChangedBy: olivier.girard $                                          */
/* $LastChangedDate: 2011-05-20 22:39:02 +0200 (Fri, 20 May 2011) $          */
/* $LastChangedDate: 2012-03-22 21:31:06 +0100 (Thu, 22 Mar 2012) $          */
/*===========================================================================*/
/*===========================================================================*/
 
 
integer    i;
integer    i;
reg [15:0] temp_val;
reg [15:0] temp_val;
 
 
Line 64... Line 64...
 
 
      // RETI Instruction test
      // RETI Instruction test
      //--------------------------
      //--------------------------
      @(r15==16'h2000);
      @(r15==16'h2000);
      if (r1    !==(`PER_SIZE+16'h0052)) tb_error("====== RETI: SP value      =====");
      if (r1    !==(`PER_SIZE+16'h0052)) tb_error("====== RETI: SP value      =====");
      if (r2    !==16'h0145)             tb_error("====== RETI: SR value      =====");
      if (r2    !==16'h010f)             tb_error("====== RETI: SR value      =====");
      if (r5    !==16'h1234)             tb_error("====== RETI: R5 value      =====");
      if (r5    !==16'h1234)             tb_error("====== RETI: R5 value      =====");
 
 
 
 
      // Test interruption 0
      // Test interruption 0
      //--------------------------
      //--------------------------
Line 294... Line 294...
      if (r8    !==(`PER_SIZE+16'h004e)) tb_error("====== IRQ 13: R8 value      =====");
      if (r8    !==(`PER_SIZE+16'h004e)) tb_error("====== IRQ 13: R8 value      =====");
 
 
 
 
      // Test interruption NMI:  rising edge
      // Test interruption NMI:  rising edge
      //--------------------------------------
      //--------------------------------------
 
  `ifdef NMI
      @(r15==16'hf200);
      @(r15==16'hf200);
      repeat(2) @(negedge mclk);
      repeat(2) @(negedge mclk);
      nmi       = 1'b1;
      nmi       = 1'b1;
      @(posedge nmi_detect);
      @(posedge nmi_detect);
      irq[13:0] = {14{1'b1}};
      irq[13:0] = {14{1'b1}};
Line 313... Line 314...
      if (r7    !==16'h0000)             tb_error("====== NMI: R7 value      =====");
      if (r7    !==16'h0000)             tb_error("====== NMI: R7 value      =====");
      if (r8    !==(`PER_SIZE+16'h004e)) tb_error("====== NMI: R8 value      =====");
      if (r8    !==(`PER_SIZE+16'h004e)) tb_error("====== NMI: R8 value      =====");
 
 
      if (r9    !==16'h0000)             tb_error("====== NMI: NMIE   value  =====");
      if (r9    !==16'h0000)             tb_error("====== NMI: NMIE   value  =====");
      if (r10   !==16'h0010)             tb_error("====== NMI: NMIIFG value  =====");
      if (r10   !==16'h0010)             tb_error("====== NMI: NMIIFG value  =====");
 
   `endif
 
 
      stimulus_done = 1;
      stimulus_done = 1;
   end
   end
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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