WatchDog::WatchDog(sc_module_name name): Module(name) { rw_port(*this); // bind the target port debug() <<"WatchDog constructor" <<endl; load = 0; control = 0; value = 0; raw_it_status = 0; masked_it_status = 0; lock = 0; }
static int rw_memory(int rw, unsigned minor, char * buf, int count, off_t * pos) { switch(minor) { case 0: return rw_ram(rw,buf,count,pos); case 1: return rw_mem(rw,buf,count,pos); case 2: return rw_kmem(rw,buf,count,pos); case 3: return (rw==READ)?0:count; /* rw_null */ case 4: return rw_port(rw,buf,count,pos); default: return -EIO; } }