# Bus Demux (`busDemux`)

> Splits a bus into its elements, one scalar signal per output.

![busDemux](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/busDemux.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/control/busDemux/)

**Group:** Control · **Kind:** `{"block":"busDemux","kind":"control"}`

## When to use it

Use it where the elements of a bus go separate ways, for example to give each inverter leg its own gate signal from a gate bus, or to feed a block that does not work element by element.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `in` | signal | The bus to split; its width must be n. |
| `out1` | signal | First element. |
| `out2` | signal | Second element. |
| `out3` | signal | Third element (when n is 3 or more). |
| `out4` | signal | Fourth element (when n is 4 or more). |
| `out5` | signal | Fifth element (when n is 5 or more). |
| `out6` | signal | Sixth element (when n is 6 or more). |
| `out7` | signal | Seventh element (when n is 7 or more). |
| `out8` | signal | Eighth element (when n is 8). |

## Common parameters

- `n`: Number of elements the bus on `in` splits into, 2 to 8 (out1 … out8); it must be the bus's width (Default: 2)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `n` | — | 2 |  | Number of elements the bus on `in` splits into, 2 to 8 (out1 … out8); it must be the bus's width |

_Parameter descriptions are in English in both languages._

## Model

Each output is the same net as its element of the bus, so the block adds nothing to the simulation; the net keeps the output's name.

## Common mistakes

- `n` must equal the width of the bus on `in`; a different count is an error that names both. An input that is not a bus is an error too.
- The outputs keep the names you give their nets, and a bus element nobody names is called after the bus (`g_1`, `g_2`). Probe and plot those names after a run; the bus itself is not recorded.

## Datasheet and sources

There is no datasheet. Set `n` to the width of the bus, 2 to 8.

## Example

Open the example with the command `file.openExample` and the name `demo:busDemux`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
