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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [z80_decoder.h] - Blame information for rev 102

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

Line No. Rev Author Line
1 96 ghutchis
#ifndef Z80_DECODER_H_
2
#define Z80_DECODER_H_
3
 
4 98 ghutchis
#include <stdint.h>
5 96 ghutchis
#include "systemc.h"
6
 
7
typedef enum { UNPRE, PRE_CB, PRE_DD, PRE_ED, PRE_FD, DISP, IMM1, IMM2, IMM2B } dec_state;
8
 
9
SC_MODULE(z80_decoder)
10
{
11
private:
12
        dec_state state;
13
        sc_uint<8> opcode;
14
        char *op_name;
15
        char op_buf[80];
16
        uint16_t imm, op_addr;
17
 
18
        void decode_unpre();
19
        void op_print();
20
 
21
public:
22
        sc_in<bool>   clk;
23
        sc_in<uint32_t> addr;
24
        sc_in<bool>   m1_n;
25
        sc_in<bool>   mreq_n;
26
        sc_in<bool>   rd_n;
27
        sc_in<bool>   wait_n;
28
        sc_in<uint32_t> di;
29
        sc_in<bool>   reset_n;
30
        bool en_decode;
31
 
32
        void event();
33
 
34
        SC_CTOR(z80_decoder) {
35
                SC_METHOD (event);
36
                sensitive << clk.pos();
37
                en_decode = false;
38
        }
39
};
40
 
41
#endif /*Z80_DECODER_H_*/

powered by: WebSVN 2.1.0

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