.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "DPGEN_XNOR2MASK" "3" "30 July 2004" "ASIM/LIP6" "Alliance - genlib User's Manual"
.SH NAME
DPGEN_XNOR2MASK \- Programmable Mask Macro-Generator
.SH SYNOPSIS
.sp
\fB#include
.sp
void GENLIB_MACRO (DPGEN_XNOR2MASK, char *\fImodelname\fB, long \fIflags\fB, long \fIN\fB, char *\fIconstVal\fB);
\fR
.SH "DESCRIPTION"
.PP
Generate a \fIN\fR bits conditionnal XNOR mask named \fImodelname\fR\&.
.PP
How it works :
.TP 0.2i
\(bu
if the cmd signal is set to \&'0', the mask is NOT
applied, so the whole operator behave like an inverter.
.TP 0.2i
\(bu
if the cmd signal is set to \&'1', the mask IS
applied, the output is the \fBcomplemented\fR
result of the input value \fBXORed\fR with the mask
(suplied by \fIconstVal\fR).
.PP
The constant \fIconstVal\fR is given to the macro-generator
call, therefore the value cannot be changed afterward : it's
hard wired in the operator.
.PP
A common error is to give a real C constant for the
\fIconstVal\fR argument. Be aware that it is a character string.
.SS "TERMINAL NAMES"
.TP 3
1.
cmd : mask control (1 bit).
.TP 3
2.
i0 : input (\fIN\fR bits).
.TP 3
3.
q : output (\fIN\fR bits).
.TP 3
4.
vdd : power.
.TP 3
5.
vss : ground.
.SS "BEHAVIOR"
.nf
nq <= WITH cmd SELECT not(i0) WHEN '0',
not(i0 xor X"0000FFFF") WHEN '1';
.fi
.SH "EXAMPLE"
.PP
.nf
GENLIB_MACRO(DPGEN_XNOR2MASK, "model_xnor2mask_0000FFFF_32"
, F_BEHAV|F_PLACE
, 32
, "0x0000FFFF" /* A string! */
);
GENLIB_LOINS( "model_xnor2mask_0000FFFF_32"
, "instance1_xnor2mask_32"
, "cmd"
, "i0[31:0]"
, "q[31:0]"
, "vdd", "vss", NULL
);
.fi
.SH "SEE ALSO"
.PP
\fBGENLIB_MACRO\fR(3),
\fBgenlib\fR(1)