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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [nmi.v] - Diff between revs 134 and 192

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

Rev 134 Rev 192
Line 65... Line 65...
      #(6000);
      #(6000);
      if (inst_cnt !==16'h0000)  tb_error("====== NMI rising edge: CPU is not sleeping =====");
      if (inst_cnt !==16'h0000)  tb_error("====== NMI rising edge: CPU is not sleeping =====");
 
 
      wkup[0]   = 1'b1;
      wkup[0]   = 1'b1;
      @(negedge mclk)
      @(negedge mclk)
      irq[0]    = 1'b1;
      irq[`IRQ_NR-16]    = 1'b1;
      @(negedge irq_acc[0])
      @(negedge irq_acc[`IRQ_NR-16])
      wkup[0]   = 1'b0;
      wkup[0]   = 1'b0;
      irq[0]    = 1'b0;
      irq[`IRQ_NR-16]    = 1'b0;
 
 
      @(r15==16'h1002);
      @(r15==16'h1002);
      nmi       = 1'b0;
      nmi       = 1'b0;
 
 
      if (r6    !==16'h0000)  tb_error("====== NMI disabled: NMI irq was taken       =====");
      if (r6    !==16'h0000)  tb_error("====== NMI disabled: NMI irq was taken       =====");
Line 181... Line 181...
      inst_cnt = 0;
      inst_cnt = 0;
      #(2000);
      #(2000);
      if (inst_cnt !==16'h0000)  tb_error("====== NMI nested: CPU is not sleeping =====");
      if (inst_cnt !==16'h0000)  tb_error("====== NMI nested: CPU is not sleeping =====");
      #(2000);
      #(2000);
      wkup[0]   = 1'b1;
      wkup[0]   = 1'b1;
      irq[0]    = 1'b1;
      irq[`IRQ_NR-16]    = 1'b1;
      @(negedge irq_acc[0])
      @(negedge irq_acc[`IRQ_NR-16])
      wkup[0]   = 1'b0;
      wkup[0]   = 1'b0;
      irq[0]    = 1'b0;
      irq[`IRQ_NR-16]    = 1'b0;
      nmi       = 1'b1;
      nmi       = 1'b1;
 
 
      @(r15==16'h4002);
      @(r15==16'h4002);
      if (r6       !==16'h0001)  tb_error("====== NMI nested: NMI irq was not taken =====");
      if (r6       !==16'h0001)  tb_error("====== NMI nested: NMI irq was not taken =====");
      if (inst_cnt ===16'h0000)  tb_error("====== NMI nested: CPU did not woke up   =====");
      if (inst_cnt ===16'h0000)  tb_error("====== NMI nested: CPU did not woke up   =====");

powered by: WebSVN 2.1.0

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