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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [tv_responder.h] - Diff between revs 93 and 94

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

Rev 93 Rev 94
Line 3... Line 3...
 
 
#include "sc_env.h"
#include "sc_env.h"
 
 
SC_MODULE(tv_responder)
SC_MODULE(tv_responder)
{
{
 
  private:
 
        char    str_buf [256];
 
        int     buf_ptr;
 
 
 
        int     timeout_ctl;
 
        int     cur_timeout;
 
        int     max_timeout;
 
 
 
        int     int_countdown;
 
        int     nmi_countdown;
 
        uint8_t checksum;
 
        int     ior_value;  // increment-on-read value
 
        int     nmi_trigger; // trigger nmi when IR = this value
 
 
 
        int     reset_time;
 
        bool    last_iowrite;
 
 
 
  public:
        sc_in<bool>   clk;
        sc_in<bool>   clk;
 
 
        sc_out<bool>    reset_n;
        sc_out<bool>    reset_n;
        sc_out<bool>    wait_n;
        sc_out<bool>    wait_n;
        sc_out<bool>    int_n;
        sc_out<bool>    int_n;
Line 24... Line 42...
        sc_in<uint32_t> addr;
        sc_in<uint32_t> addr;
 
 
        void event();
        void event();
 
 
        SC_CTOR(tv_responder) {
        SC_CTOR(tv_responder) {
                SC_THREAD(event);
                SC_METHOD(event);
                sensitive << clk.pos();
                sensitive << clk.pos();
 
 
 
                buf_ptr = 0;
 
                cur_timeout = 0;
 
                max_timeout = 10000;
 
                timeout_ctl = 1;
 
                int_countdown = 0;
 
                nmi_countdown = 0;
 
                nmi_trigger = 0;
 
                reset_time = 16;
 
                last_iowrite = false;
        }
        }
};
};
 
 
#endif /*TV_RESPONDER_H_*/
#endif /*TV_RESPONDER_H_*/
 
 
 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.