This guide shows you how to structure your ICD CSV files and run them through DBSimGenerator to produce high-performance C++ simulation and interface code.

1. Understand What DBSimGenerator Does

DBSimGenerator automatically generates high-performance C++ code for simulation and interface directly from ICD (Interface Control Document) CSV files. Each CSV defines one block, containing fields and metadata describing how data is structured, scaled, and interpreted.

2. Organize Your CSV Directory

Arrange your ICD CSV files in a project → LRU → block structure:

project_name/
├── LRU_name/
│   ├── Block_name.csv
│   └── Enums.csv

3. (Optional) Share Blocks Between LRUs with Inheritance

If several LRUs need the same block, define it once and have the others inherit it instead of copying the CSV. Add an lrus.json file beside the LRU folders (not inside any of them):

project_name/
├── lrus.json
├── LRUBase/
│   └── SharedBlock.csv
└── LRUDerived/
    └── OwnBlock.csv
{
  "LRUs": [
    { "name": "LRUDerived", "dependency": "LRUBase" }
  ]
}

LRUDerived now has both SharedBlock (inherited) and its own OwnBlock — see LRU Inheritance in the full reference for how this is laid out in memory.

4. (Optional) Pull In a Shared ICD Package with Addons

To reuse a whole external ICD package (its own LRUs, blocks, and enums) across multiple projects instead of copying its files into each one, list its folder in an lrus-addon.json file beside lrus.json:

project_name/
├── lrus.json
├── lrus-addon.json
└── LRU_name/
    └── Block_name.csv
[
    "c:/dev/simD/CoreEng/CoreEngICDAddons/FlightModel_Advance/"
]

DBSimGenerator loads every LRU from each listed addon folder, shows them alongside your project's own LRUs, and generates their code into the same coredb/ output folder — see ICD Addons in the full reference for details.

5. Write the ICD CSV

Each row of a block CSV describes one field. A minimal example:

BlockName, FieldName, Type, Size, Description
Telemetry, Altitude, float, 4, Aircraft altitude (m)
Telemetry, Speed, float, 4, Airspeed (m/s)

A full ICD block definition includes these columns:

# BytesNameData TypeArray SizeBitsBits SizeEnumValue / UnitsEng TypeScaleDefaultDescription
4AltitudeR41---mfloat1.00Aircraft altitude
4SpeedR41---m/sfloat1.00Aircraft speed

6. Choose the Correct Data Type Codes

Use these short type codes when specifying a field's Data Type:

ShortTypeSize (Bytes)MinMaxResolution
U1Unsigned Char102551
I1Signed Char1-1281271
X1Bitfield1n/an/an/a
U2Unsigned Short20655351
I2Signed Short2-32768327671
X2Bitfield2n/an/an/a
U4Unsigned Long404,294,967,2951
I4Signed Long4-2,147,483,6482,147,483,6471
X4Bitfield4n/an/an/a
R4IEEE 754 Single Precision4-1×21272127≈2⁻²⁴
R8IEEE 754 Double Precision8-1×2102321023≈2⁻⁵³
X8Bitfield8–––

7. Define Enums

List named values in an Enums.csv file alongside your block CSVs:

NameValue
Mode_Manual0
Mode_Auto1
Error_None0x00
Error_Sensor0x01

8. Run the Generator Workflow

  1. Prepare ICD CSV files and Enums for your blocks.
  2. Organize CSVs in the project → LRU → block structure.
  3. Run DBSimGenerator so it reads the CSVs and generates high-performance code.
  4. Integrate the generated code with your simulation frameworks and hardware drivers.

9. Take Advantage of Key Features

With DBSimGenerator, you can focus on building your technology while the platform handles roughly 80% of the integration and boilerplate code automatically.