Tom Ball wrote:
Because an important aspect of good OO design is to keep classes asI would normally agree. This is a bit more complicated.
loosely coupled as possible. Having two classes directly reference each
other like you described indicates a potential refactoring may be
needed.
I'm converting a verilog behaviorial module to C++ using CynLib and Cyn++
(www.ForteDS.com, an open source hardware modeling class library)
and possible SystemC later. Cyn++ has some nice, predefined classes and macros
to make the job easier.
But after the conversion I noticed that it referenced the parent module, which is OK in verilog,
but caused C++ to choke. Adding the parent reference gave me a way to get to the upper level,
but then this class reference through me.
Once the whole thing is done, and working with minimum changes I cna start refactoring
the modules. But the current objective is to quickly and easily convert the verilog to C++
to see if it's a feasible solution. I need to write a script to do the conversion, so the verilog
developed buy the circuit designers cna be converted to C++ for the test group ( me :) ).
If I can get it working, then I can try to get the verilog guys to write the code in a better manner.
-Thomas
--
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list