/************************************************** versys eda example--**** counter.cpp ****---------- -----------------Module of counter----------------- Copyright (c) 1996-2007, by all Contributions. All rights reserved. *******************2007/11/22 by ogu, lexim,inc.***/ #include "systemc.h" #include "counter.h" void counter::onetwothree() { if (clear) { countval = 0; } else if (load) { countval = din.read(); } else { countval++; } dout = countval; }