Hardware Verification with C++: A Practitioner's Handbook

That's right! shouted Vroomfondel. We demand rigidly defined areas of doubt and uncertainty!
The Hitchhiker s Guide to the Galaxy , by Douglas Adams
What is design? How do you go about designing with objects? As far as a CPU is concerned, you don t need objects. You might as well put all the code into one big function but that code would be really, really hard to understand. So we break up a single huge solution into a number of smaller, understandable, and rigidly defined pieces. This is the essence of design, regardless of the language.
When we design with OOP, this breaking up is really just the construction of a network of classes. However, before we dive into making classes, we need to understand the OOP design bias. OOP designs tend to focus on roles and responsibilities. These roles and responsibilities get broken down further into smaller networks of classes. Ultimately, we wiggle wires to communicate with the chip.
In this chapter we introduce some basic guidelines for design. We also talk a bit about some common design mistakes and how to avoid them.
Design is so intertwined with coding that it s artificial to separate the two. Academic textbooks explain that first you architect, then you design, and then you code. In the real world, however, these steps all get jumbled together. We tend to do all three at once, having a general idea of what we want to do, then refining and changing our idea as we...