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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [app_localcfg/] [it_cfg_monitor.cpp] - Blame information for rev 104

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 104 ghutchis
/*
2
 * it_cfg_monitor.cpp
3
 *
4
 *  Created on: Feb 15, 2011
5
 *      Author: hutch
6
 */
7
 
8
#include "it_cfg_monitor.h"
9
 
10
void it_cfg_monitor::event()
11
{
12
  if (reset_n == 0) {
13
    cfgo_trdy = 0;
14
    cfgo_rd_data = 0;
15
  } else {
16
    if (cfgo_irdy) {
17
      if (delay_cnt == -1)
18
        delay_cnt = rand() % 10 + 1;
19
      else delay_cnt--;
20
 
21
      if (delay_cnt == 0) {
22
        cfgo_trdy = 1;
23
        if (cfgo_write) {
24
          cfgo_rd_data = rand();
25
          printf ("itmon: read value %x\n", cfgo_rd_data.read());
26
        } else {
27
          printf ("itmon: wrote value %x\n", cfgo_wr_data.read());
28
        }
29
      } else
30
        cfgo_trdy = 0;
31
    }
32
  }
33
}

powered by: WebSVN 2.1.0

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