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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [tv_responder.h] - Blame information for rev 104

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 92 ghutchis
#ifndef TV_RESPONDER_H_
2
#define TV_RESPONDER_H_
3
 
4 93 ghutchis
#include "sc_env.h"
5 92 ghutchis
 
6
SC_MODULE(tv_responder)
7
{
8 94 ghutchis
  private:
9
        char    str_buf [256];
10
        int     buf_ptr;
11
 
12
        int     timeout_ctl;
13
        int     cur_timeout;
14
        int     max_timeout;
15
 
16
        int     int_countdown;
17
        int     nmi_countdown;
18
        uint8_t checksum;
19
        int     ior_value;  // increment-on-read value
20
        int     nmi_trigger; // trigger nmi when IR = this value
21
 
22
        int     reset_time;
23
        bool    last_iowrite;
24
 
25
  public:
26 92 ghutchis
        sc_in<bool>   clk;
27
 
28
        sc_out<bool>    reset_n;
29
        sc_out<bool>    wait_n;
30
        sc_out<bool>    int_n;
31
        sc_out<bool>    nmi_n;
32
        sc_out<bool>    busrq_n;
33
        sc_in<bool>     m1_n;
34
        sc_in<bool>     mreq_n;
35
        sc_in<bool>     iorq_n;
36
        sc_in<bool>     rd_n;
37
        sc_in<bool>     wr_n;
38
        sc_in<bool>     halt_n;
39
        sc_in<bool>     busak_n;
40
        sc_out<uint32_t>        di_resp;
41
        sc_in<uint32_t> dout;
42
        sc_in<uint32_t> addr;
43
 
44
        void event();
45
 
46
        SC_CTOR(tv_responder) {
47 94 ghutchis
                SC_METHOD(event);
48 92 ghutchis
                sensitive << clk.pos();
49 94 ghutchis
 
50
                buf_ptr = 0;
51
                cur_timeout = 0;
52
                max_timeout = 10000;
53
                timeout_ctl = 1;
54
                int_countdown = 0;
55
                nmi_countdown = 0;
56
                nmi_trigger = 0;
57
                reset_time = 16;
58
                last_iowrite = false;
59 92 ghutchis
        }
60
};
61
 
62
#endif /*TV_RESPONDER_H_*/

powered by: WebSVN 2.1.0

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