GenLib User's Manual
<<< Previous |  | Next >>>

# DPGEN_MUX2

## Name

DPGEN_MUX2 -- Multiplexer Macro-Generator

## Synopsis

    #include  <genlib.h>

``void `GENLIB_MACRO``(DPGEN_MUX2, char *`modelname`, long `flags`, long `N`, long `drive`);`

## Description

Generate a N bits two inputs multiplexer with named modelname.

Valid drive are : 1, 2 or 4.

### Terminal Names

1. `cmd` : select (1 bit).

2. `i1` : input (N bits).

3. `i0` : input (N bits).

4. `q` : output (N bits).

5. `vdd` : power.

6. `vss` : ground.

### Behavior

    q <= WITH cmd SELECT i0 WHEN '0',
                         i1 WHEN '1';

## Example

    GENLIB_MACRO(DPGEN_MUX2, "model_mux2_32"
                           , F_BEHAV|F_PLACE
                           , 32
                           , 1
                           );

    GENLIB_LOINS( "model_mux2_32"
                , "instance1_mux2_32"
                , "cmd"
                , "i1[31:0]"
                , "i0[31:0]"
                ,  "q[31:0]"
                , "vdd", "vss", NULL
                );

## See Also

GENLIB_MACRO(3), genlib(1)

<<< Previous | Home | Next >>>
DPGEN_NMUX2 | Up | DPGEN_NBUSE