bebus(2)

ORIGIN

Cao&Vlsi libraries, BEH package, libBeh106.a

NAME

beh_addbebus , beh_delbebus , beh_rmvbebus , beh_frebebus

SYNOPSIS

struct bebus *beh_addbebus (list, name, biabl, bibdd, type)
struct bebus *list;
char *name;
struct biabl *biabl;
struct binode *bibdd;
char type;
struct bebus *beh_delbebus (list, pnt, mode)
struct bebus *list;
struct bebus *pnt;
char mode;
struct bebus *beh_rmvbebus (list, name, mode)
struct bebus *list;
char *name;
char mode;
void beh_frebebus (list)
struct bebus *list;

PARAMETERS

list
    pointer of a list of bebus structures

name
    name of the bused output port to be added to or removed from the list

biabl
    list of biabl representing the expression of drivers setting the value of the bused output port

bibdd
    list of bibdd representing the expression of drivers setting the value of the bused output port

pnt pointer of the bebus structure to be removed from the list

type
    type of the bused output port :

    W   for a WOR_BIT

    M   for a MUX_BIT

mode
    recursive mode (Y or N)

DESCRIPTION

A bebus is a data structure representing a one-bit bused output port.

beh_addbebus() adds a bebus structure at the top of a list of bebus structures. The name registred in the bebus structure is produced by namealloc(). The function returns the pointer of the new list. No checks are made by this function.

beh_delbebus() deletes a bebus structure (pointed by pnt) from a list of bebus structures. The function returns the pointer of the new list. No action is made if the structure pointed by pnt doesn't belong to the list. If mode is set to 'Y' all objects (biabl, binode) pointed by the bebus will also be deleted. If mode is set to 'N' and there is any object (biabl, binode) pointed by the bebus, a warning message is printed on the standard error output.

beh_rmvbebus() deletes a bebus structure (named name) from a list of bebus structures. name is supposed to be produced by namealloc(). The function returns the pointer of the new list. No action is made if no structure named name has been found in the list. If mode is set to 'Y' all objects (biabl, binode) pointed by the bebus will also be deleted. If mode is set to 'N' and there is any object (biabl, binode) pointed by the bebus, a warning message is printed on the standard error output.

beh_frebebus() deletes a list of bebus structures (pointed by list) and all objects (biabl, binode) pointed by any bebus structure of the list. No action is made if list is an empty list (NULL pointer). No checks are made by this function.

EXAMPLE

#include <beh106.h>
struct bebus *list;
char *name;
name = namealloc ("data_bus_0");
list = beh_addbebus (list,"result_bus_0", NULL, NULL, 'M');
list = beh_rmvbebus (list,name);

SEE ALSO

beh(2), abl(1), bdd(1), biabl(2), binode(2), bebus(2), namealloc(2)

BUGS

Please e-mail to cao-vlsi@masi.ibp.fr for bug report and suggestions.