Embarcadero likes mentioning Altimum Designer when asked about high-class large-scale successful commercial systems made with Delphi. The project has about 15 000 000 codelines. Altium Designer is a CAD system for electronic products, including 3D modeling. Today we’ll discuss the technical side of the system as far as such a system allows to be highlighted from inside. My interest is purely technical, I worked as a scientific developer of some CAD system (not connected with electronics).
I’m talking with a developer of Altimum Designer and we’re going to discuss the system as developed with Delphi. But at the beginning let’s define the scale of the system. CAD can be different from “smart drawer” to “big AI-based system with pluggable simulators”. What can Alitum Designer do?
Very-very generaly speaking, an engineer has or is given a device specification and conditions, where the device is supposed to works, and sometimes a subset of elements to be used in it. Today very often one starts from microprocessor, when the starting point is chip type and the followings are designed to support its operability. Then one forms a library of elements/components in use, makes logical/principal schematics in corresponding editors. In addition one can set constraints or specifications, which can, for example, influence on pcb. Then, step-by-step, the pcb is being developed: setting a number of layers, locating components, making tracks, giving supply etc. The development process achieves the physical level. Further one follows a routine: documentations, blueprints, list of components for assembling etc.
Altium Designer gives a unified environment for all the mentioned functions and more. The main functional modules of the system are:
– schematics editor;
– component library manager;
– pcb editor;
– core of 3D mode;
– signal integrity analyzer;
– output file generator;
– export/import module – from 3D models to external simulators.
Are these functional modules isolated? Are they dll-plug-ins to some core? Are they executables, somehow exchanging data? What mechanisms are used for data interchange?
As many similar large systems, Altium Designer has modular architecture. There is a platform to provide the base environment and infrastructure (documents, settings, messaging subsystem etc) and modules to implement some functionality. In last versions every module is an isolated dll, exposing a set of interfaces. These interfaces are not COM-compatible, but are interoperable. There are a number of products, built on this framework, but the largest is Altium Designer.
A couple of words about how the modules are communicating. Is there some internal API? How different teams, responsible for different modules, are building the APIs? Kind of protocol? Network communications?
Sure, we have internal API. The base is interfaces with some limitations in type used. We quite extensively use a system of commands/messages.
Aside Altium Designer we have a whole stack of products, including supplementary ones starting from license server and ending with eco-system infrastructure support Altium.Live, so we do a lot of network communications. We intensively use web-services. Internal products use SOAP protocol. External communications implies REST.
How source codes for projects are stored?
Very simple. There are some SVN-repositories for every module: platform, product core, extensions, web-projects. We also use Assembla, Google Docs.
There are some additional services like “crash-reporting”, “building server”, “on-farm-testing” etc.
When we talk about large-scale system, some stupid, but interesting questions appear to measure “the giant”. How many menu items are there in the main form? How many forms are in the application? For example, Golden Gate Bridge has about 1.2 m rivets. Can you say something in this format?
Truly speaking, not many people have time for this “interesting research”. But some of my colleagues, who manage documentation, have to support all these numerous forms/windows/menu items 🙂
I can present some data. Dfm-file search result gives ~500 for the platform and ~1 800 for the main product. The number of menu items is hard to calculate, it depends on a document, which is currently open, current mode etc. But they are plenty!
The basic configuration includes 150-200 dll-s, the base repositories have about 500 dpr-projects, the full built of the system takes 40 minutes.
Can you please show the main screen?
You’re welcome! Basically all works are done with logical schematics (first picture) and then physical model (second picture). There are some others, but these are the most common. Second picture shows 3D model of rigid-flexible panel, while design is done in 2D mode.
Do you use standard Delphi visual components or 3-rd parties?
In addition to standard components we use DevExpress and DreamControls, as well as many self-made controls.
What do you use for drawing? TCanvas? Some GPU-based library (OpenGL, DirectX)?
At the moment we use GDI/GDI+ for schematics and DirectX for pcb.
How open is your system? Can I use custom plug-ins?
It has been open for a long time, there are many integral extensions. Last versions give more options, we have the whole SDK for Delphi, C++ and C#. In the nearest future we expect DeveloperEdition, which will make the development of extensions more easily.
Does your system provide some mechanism for custom automation? Some scripts, macros, internal programming language?
Yes, we support Delphi/Basic/Java-script. They are used for creating both extensions, and everyday routines like complex filters on objects.
Let’s talk about the product history. What was the beginning?
The company, as well as the product itself, started in 1985, when PCs became available and PCB development task was ready to be solved by CAD. The company was just the first to create ECAD for Windows, then it was not so obvious step. Then some business reorganizations like IPO on Australian stock market, then merge-acquisitions… then a number of great products, which are now in a technological stack of tools for electronic device development.
What was the first Delphi version and what is current one? Of course, such a giant project is hard to migrate to every appearing versions (especially, in the last year). Were there successful attempts? Or you’re somewhere in Delphi 7 ages?
I can be slightly wrong, but the first versions of the product were built with TurboPacal, then Delphi starting from 3. Currently, we use Delphi 2010. When planning the migration, we always rely on pure pragmatics, namely new capabilities and bugs fixed in a new release. Even slight change in system classes could make us think in terms of manpower, taking into account 3rd parties. At the moment the critical mass of new features is not enough for us from the viewpoint of XE5.
We also use other technologies, some modules are implemented with C++ and C#. We use Morfik for web-services.
What is the architecture of main modules? “Form->Control->Event->Procedure”? Or some separation of model and view (let’s say in a simple way – GUI and algorithm)?
In such a massive project there are many approaches. The key one is the separation of command description and executing codes. Toolbars and menus are described in external configuration files, document subsystem do have more or less clear separation for model and view, while secondary isolated dialogs are often made according to classic form-even approach.
Is the main GUI static or dynamic based on some ad-hoc GUI generation mechanism depending on external configuration?
A part of GUI depends on what type of document is loaded (for PCB and BOM the set of commands exposed is rather different), on what functionality is available according to active license. I.e. there is a combination of some static basic set of functionality and something, defined by the mode and logic.
What kind of complicated algorithms are implemented in the system?
PCB generation and simulation are the most complicated parts. Track-making is kind of. Tracks can be not only spatially allocated (modern boards are multi-layered and a track can change the layer), but plethora of constraints must be observed, which can be set by a user: minimum distance between tracks, track impedance, “noise ability” at high frequencies etc. And there is still room for development and inclusion of new algorithms.
Can optimization be done, for example, in overall sizes of boards and elements? Multi-parametric optimization? Dynamic setting of constraints?
Optimization in size is not common. Mainly sizes are already predefined by a mechanical model, dimensions of the processor used, jack or interface plug etc.
Very often a project is started from setting constraints, so called “constraint driven design”. An engineer defines constraints, sometimes very complicated, and the product helps to follow them or prevents from breaking them. For example, one of the simplest checks: the width of a track between some specific components… or permissible angles while arranging HF-canals.
What are capabilities in connecting of manufacturing equipment or machine tools to your software system? Can it be so, when a task is set to a computer, and finally one gets a ready device?
Not so easy for enterprise-level manufacturing equipment. This is a close area, but not the same as we are focused on. We help in design and development. System for controlling and monitoring of some assembling robot, which melt solder, locate components, “bake” a board according to some technological requirements is a process in itself and has no intersections with design and calculation. We support production by preparing data for export according to standards. Meanwhile, the system can be connected to Nanoboard, which is a FPGA tool.
Have you ever think about making some mobile front-end? Many even serious CAD-systems have mobile versions… at least, to view models anywhere. It is not indisputable useful, but may be you see some profits?
We don’t have near plans for that. You’ve just said, no indisputable usefulness as CAD elements. The company has a department for mobile solutions, but it’s not connected with Altium Designer.
I can suppose, your object-oriented structure is extremely vast (class hierarchy etc.) Do you use some graphical notations for communication among developers? Or do you treat the code as sufficient and ultimate source of information on the system?
We don’t use some special graphical notations or diagrams. In our case we do follow the politics of easy communications and keep high professionalism of developers. It’s a guarantee, everybody will be heard, and everybody will be understood.
The system is very complicated, so is testing process, especially, regression one. Please, tell some words about your way.
We, of course, use automatic testing to cover key areas, manual regression testing, beta-testing and other “testing-s”. And the future tasks are everybody has for kind of systems: early involvement of QA engineers into development.
What about your R&D team? Can somebody join your company?
The company is more than open. We always search high-level developers and won’t miss them for Kiev and Shanghais offices. Funny fact, a big part of our Australian R&D department is Russian-speaking developers and engineers.
Do you involve beginners?
We try to support high-level of professionalism, which means excellent skills in programming or some unique competence. We have very high speed, pace, tempo etc., no time for learning or adaptation.
Aside from Delphi, what should one know else? Electronics? CAD theory? Math?
Electronics or math is not necessary. This is a big advantage, but for some areas, while the range of tasks is so wide… any good Delphi developer can find his way to us.
What are the priorities in product evolution? Some close areas like mechanical CAD?
We first enhance our market share as ECAD system. We can think of integration or becoming closer to mechanical systems, but not to become mechanical. We have 3D for boards and this is where we will go further.
But if someone is a beginner and wants to join your R&D team?
The answer is universal: master one’s Delphi knowledge, try to solve complicated tasks, develop theoretical background. There are some open ECAD projects, and participation in them can be very useful.