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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [env_memory.cpp] - Diff between revs 94 and 98

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

Rev 94 Rev 98
Line 9... Line 9...
  // ignore activity during reset
  // ignore activity during reset
  if (!reset_n)
  if (!reset_n)
        return;
        return;
  if (!mreq_n && !wr_n && (addr < AM_DEPTH)) {
  if (!mreq_n && !wr_n && (addr < AM_DEPTH)) {
        ad = (int) addr;
        ad = (int) addr;
 
    assert (memory != NULL);
    memory[ad] = (unsigned char) wr_data.read();
    memory[ad] = (unsigned char) wr_data.read();
#ifdef DEBUG
#ifdef DEBUG
    //printf ("MEM WR %04x=%02x\n", ad, (int) wr_data.read());
    //printf ("MEM WR %04x=%02x\n", ad, (int) wr_data.read());
#endif
#endif
  }
  }
 
 
  // async read output
  // async read output
  if (addr < AM_DEPTH) {
  if (addr < AM_DEPTH) {
        ad = (int) addr;
        ad = (int) addr;
 
    assert (memory != NULL);
        rd_data.write ( (unsigned int) memory[ad] );
        rd_data.write ( (unsigned int) memory[ad] );
  }
  }
}
}
 
 
int inline readline(FILE *fh, char *buf)
int inline readline(FILE *fh, char *buf)

powered by: WebSVN 2.1.0

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