DPGEN_XNOR2(3)
π DPGEN_XNOR2(3) β the XNOR2 Macro-Generator, bestie edition π
okay so this is a page from the Alliance - genlib User's Manual, and it's all about DPGEN_XNOR2, the XNOR2 Macro-Generator. yes it's a mouthful. no we're not renaming it. let's go π¦
β¨ SYNOPSIS β¨
#include <genlib.h>
void GENLIB_MACRO (DPGEN_XNOR2, char *modelname, long flags, long N,
long drive);
that's the whole vibe. one include, one call. slay π
πΈ DESCRIPTION πΈ
okay so what this does is it generates a N bits two inputs exclusive NOR with an output power of drive, and it's named modelname. iconic behaviour, honestly.
Valid drive are : 1 or 4. that's it. those are the only two. don't get creative π
π§ TERMINAL NAMES π§
here's the roster, in order, no cap:
i1: input.i0: input.nq: output.vdd: power.vss: ground.
five terminals. two ins, one out, one power, one ground. the friend group is complete π«Ά
π₯ BEHAVIOR π₯
the whole entire personality, in one line:
nq <= not(i0 xor i1)
yes bestie that's a XNOR. it's giving "not xor". periodt.
π EXAMPLE π
here's what it actually looks like in the wild:
GENLIB_MACRO(DPGEN_XNOR2, "model_xnor2_32"
, F_BEHAV|F_PLACE
, 32
, 1
);
GENLIB_LOINS( "model_xnor2_32"
, "instance1_xnor2_32"
, "i1[31:0]"
, "i0[31:0]"
, "nq[31:0]"
, "vdd", "vss", NULL
);
first one makes the macro, second one wires it up as an instance. 32 bits of pure XNOR energy β
π SEE ALSO π
go read these next, iykyk:
π fr fr, this page came from ASIM/LIP6 and it's dated 30 July 2004. yes it's older than us. it still ate. no cap πβ¨π
π¦ where this page comes from
- nixos 26.05: alliance 5.1.1-unstable-2025-02-24
- nixpkgs unstable: alliance 5.1.1-unstable-2025-02-24
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms