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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [env_memory.cpp] - Blame information for rev 91

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

Line No. Rev Author Line
1 91 ghutchis
#include "env_memory.h"
2
 
3
void env_memory::event()
4
{
5
  int lcl_cs;
6
  int ad;
7
 
8
  if (!mreq_n && !wr_n && (addr < AM_DEPTH)) {
9
        ad = (int) addr;
10
    memory[ad] = (unsigned char) wr_data.read();
11
#ifdef DEBUG
12
    printf ("Wrote %x to address %x\n", (int) wr_data.read(), ad);
13
#endif
14
  } else if (!mreq_n && !rd_n && (addr < AM_DEPTH)) {
15
        ad = (int) addr;
16
        rd_data.write ( (unsigned int) memory[ad] );
17
#ifdef DEBUG
18
    printf ("Read %x from address %x\n", memory[ad], ad);
19
#endif
20
  }
21
}

powered by: WebSVN 2.1.0

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