# device_db.py File

`device_db.py` file contains the database of the devices and their respective interfaces within the firmware/gateware.
It is generated from JSON description file and tied with the configuration and the gateware.

## Generating the device_db.py File

In some cases you may need to regenerate `device_db.py`, like switching clock source or changing the configuration.
Also it is must-do in most cases once firmware/gateware is being updated (for example, when you add, move or remove EEM
cards).
Luckily, it is fairly easy to do. For standalone systems:

```shell
artiq_ddb_template -o device_db.py <standalone variant>.json
```

For DRTIO systems:

```shell
artiq_ddb_template -o device_db.py -s 1 <satellite1>.json -s 2 <satellite2>.json <...> -s N <satelliteN>.json <master>.json
```
