GENLIB_MACRO(3)

πŸ“¦ version 5.1.1-unstable-2025-02, in nixos 26.05, nixpkgs unstable

πŸ’– GENLIB_MACRO πŸ’–

okay bestie, welcome to the Alliance - genlib User's Manual page for GENLIB_MACRO(3) β€” the one-stop shop, the group chat of macro generators, the ✨generic interface✨ that talks to literally all of them. grab a boba, we're doing this πŸ§‹


🌸 NAME 🌸

GENLIB_MACRO β€” the interface that lets you chat with every single MACRO generator in the family. one door, all the rooms. slay. πŸ’…


✨ SYNOPSIS ✨

#include  <genlib.h>

void GENLIB_MACRO (long function, char *modelname, long flags, long N,
long drive, long regNumber, char *constVal);

πŸ¦‹ DESCRIPTION πŸ¦‹

so GENLIB_MACRO() is the generic entry point to all of the genlib macro generators, fr fr. and because not every generator has the same little checklist of arguments, it takes a variable number of arguments. it's giving "one function to rule them all" energy πŸ‘‘

the arguments come in two flavours:

  • Mandatory arguments β€” these ones you always have to hand over, no exceptions. they're the minimal common set that every single macro-generator needs. and listen: mandatory args go first in the argument list. periodt.
  • Optional arguments β€” the extras that are specific to a particular macro-generator, or to a whole class of macro-generators. iykyk.

πŸŽ€ ARGUMENTS πŸŽ€

  1. long function : (mandatory) tells the world which macro-generator you want to invoke. for example, if you wanna make a two-entry multiplexer, you pass GENLIB_MUX2. iconic.
  2. char* modelname : (mandatory) the name of the model you're generating. for example: "model_mux2_32bits". name your baby 🍼
  3. long flags : (mandatory) which views are gonna get generated. it's a logical combination (OR them together, bestie) of these values:
    1. F_PLACE : generate the physical view (placement only).
    2. F_BEHAV : generate the behavioral view (the VHDL view).
    3. F_LSB_FIRST : the terminal of index zero gets matched to the LSB, so a 32-bit vector will be written as "signal[31:0]".
    4. F_MSB_FIRST : the terminal of index zero gets matched to the MSB, so a 32-bit vector will be written as "signal[0:31]" (aka. IBM notation).
  4. long N : (mandatory) the width of the model's bus that's getting generated.
  5. long drive : (optional) the output power drive. ⚑
  6. long regNumber : (optional) the number of registers, or the depth of a FIFO macro-generator.
  7. char* constval : (optional) a character string holding a constant. for example: "0xFFFF0000". yes she's got range πŸ’œ

πŸ‘‘ AVAILABLE MACRO-GENERATORS πŸ‘‘

here's the whole roster, the full lineup, the main characters:


🌈 SEE ALSO 🌈

mbk(1),


πŸ’€ and that's the whole page, no cap. go forth and generate some macros, bestie 🫢

this page came to you straight from ASIM/LIP6, dated 30 July 2004, and it's the GENLIB_MACRO(3) page, babes. mwah πŸ’‹ πŸŽ€

πŸ“¦ where this page comes from