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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [env_memory.h] - Blame information for rev 93

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

Line No. Rev Author Line
1 93 ghutchis
#include "sc_env.h"
2 91 ghutchis
 
3
#ifndef ENV_MEMORY_H
4
#define ENV_MEMORY_H
5
#define AM_ASZ 16
6
#define AM_DEPTH (1<<16)
7
 
8
SC_MODULE(env_memory) {
9
 
10
  sc_in<bool > clk;
11
  sc_in<uint32_t> wr_data;
12
  sc_in<bool> mreq_n;
13
  sc_in<bool> rd_n;
14
  sc_in<bool> wr_n;
15
  sc_in<uint32_t> addr;
16
  sc_out<uint32_t> rd_data;
17
 
18
  unsigned char *memory;
19
 
20
  void event();
21 92 ghutchis
 
22
  void load_ihex (char *filename);
23 91 ghutchis
 
24
  SC_CTOR(env_memory) {
25
        memory = new unsigned char[AM_DEPTH];
26
    SC_METHOD(event);
27 92 ghutchis
    sensitive << clk.pos();
28 91 ghutchis
  }
29
};
30
 
31
#endif

powered by: WebSVN 2.1.0

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