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

Subversion Repositories tv80

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

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

powered by: WebSVN 2.1.0

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