When you want to understand how your entire city functions – for example, how traffic flows or how services connect – it would be challenging to analyze each pre-built design as a single, complex block. This is where the concept of 'flattening' comes into play. Flattening simply means breaking down these pre-built designs or 'sub-circuits' into their individual, smaller, basic parts. So, instead of seeing a 'small house', the simulator (or planner) sees each individual brick and every wire connecting them.
In the realm of digital circuits, 'sub-circuits' are complex logic blocks like a Full Adder or a Register, which are themselves composed of simpler logic gates (AND, OR, NOT). When a simulation program like «Boolflow» prepares a circuit, it 'flattens' it. This means it takes each complex block and replaces it with its internal details of basic logic gates and wires. The result is one massive 'flat' circuit, consisting only of the simplest components that the simulator can understand and process easily and efficiently.
To keep track of every single part, even when sub-circuits are nested (a block inside another block) or when the same sub-circuit is used multiple times, 'Path IDs' are employed. Imagine you name the floors in the first house 'house_1/first_floor' and in the second house 'house_2/first_floor'. This ensures that every element within the flattened circuit has a unique name, making it easier for the simulator to track its state and behavior. This approach allows engineers to design complex circuits systematically using reusable components, while the simulator remains capable of understanding and analyzing the circuit at a lower, more detailed level. This significantly simplifies the simulation process and makes it much more effective.