URL
https://opencores.org/ocsvn/tv80/tv80/trunk
Subversion Repositories tv80
[/] [tv80/] [trunk/] [sc_env/] [env_memory.cpp] - Rev 91
Go to most recent revision | Compare with Previous | Blame | View Log
#include "env_memory.h" void env_memory::event() { int lcl_cs; int ad; if (!mreq_n && !wr_n && (addr < AM_DEPTH)) { ad = (int) addr; memory[ad] = (unsigned char) wr_data.read(); #ifdef DEBUG printf ("Wrote %x to address %x\n", (int) wr_data.read(), ad); #endif } else if (!mreq_n && !rd_n && (addr < AM_DEPTH)) { ad = (int) addr; rd_data.write ( (unsigned int) memory[ad] ); #ifdef DEBUG printf ("Read %x from address %x\n", memory[ad], ad); #endif } }
Go to most recent revision | Compare with Previous | Blame | View Log