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

Subversion Repositories tv80

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

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 94 ghutchis
  sc_in<bool> reset_n;
18 91 ghutchis
 
19
  unsigned char *memory;
20
 
21
  void event();
22 92 ghutchis
 
23
  void load_ihex (char *filename);
24 91 ghutchis
 
25
  SC_CTOR(env_memory) {
26 98 ghutchis
    memory = new unsigned char[AM_DEPTH];
27 91 ghutchis
    SC_METHOD(event);
28 94 ghutchis
    sensitive << clk.pos() << addr;
29 91 ghutchis
  }
30
};
31
 
32
#endif

powered by: WebSVN 2.1.0

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