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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [sc_mem_ch.cpp] - Rev 10

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

// sc_mem_ch.cpp: implementation of the sc_mem_ch class.
//
//////////////////////////////////////////////////////////////////////
 
#include "sc_mem_ch.h"
 
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
bool sc_mem_ch::write_mem(uint32_t addr,uint32_t data)
{
    nRW=1;
    A=addr;
	D=data;
 return true;
 
}
uint32_t sc_mem_ch::read_mem(uint32_t addr)
{
 
    nRW=0;
	cout<<"read & mem"<<endl;
    A=addr;
	cout<<"return data"<<endl;
	return data;
 
}
sc_mem_ch::sc_mem_ch(sc_module_name name_):sc_module(name_)
{
 
         SC_SLAVE(read,D);
 
}
 
sc_mem_ch::~sc_mem_ch()
{
 
}
 
 
 
void sc_mem_ch::read()
{
	cout<<"data deliver"<<endl;
       data=D;
}
 

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

powered by: WebSVN 2.1.0

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