bereg(2)

ORIGIN

Cao&Vlsi libraries, BEH package, libBeh106.a

NAME

beh_addbereg , beh_delbereg , beh_rmvbereg , beh_frebereg

SYNOPSIS

struct bereg *beh_addbereg (list, name, biabl, bibdd)
struct bereg *list;
char *name;
struct biabl *biabl;
struct binode *bibdd;
struct bereg *beh_delbereg (list, pnt, mode)
struct bereg *list;
struct bereg *pnt;
char mode;
struct bereg *beh_rmvbereg (list, name, mode)
struct bereg *list;
char *name;
char mode;
void beh_frebereg (list)
struct bereg *list;

PARAMETERS

list
    pointer of a list of bereg structures

name
    name of the internal register to be added to or removed from the list

biabl
    list of biabl representing the expression of drivers setting the value of the internal register

bibdd
    list of bibdd representing the expression of drivers setting the value of the internal register

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

mode
    recursive mode (Y or N)

DESCRIPTION

A bereg is a data structure representing a one-bit internal register.

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

beh_delbereg() deletes a bereg structure (pointed by pnt) from a list of bereg 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 bereg will also be deleted. If mode is set to 'N' and there is any object (biabl, binode) pointed by the structure a warning message is printed on the standard error output.

beh_rmvbereg() deletes a bereg structure (named name) from a list of bereg 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 bereg will also be deleted. If mode is set to 'N' and there is any object (biabl, binode) pointed by the structure a warning message is printed on the standard error output.

beh_frebereg() deletes a list of bereg structures (pointed by list) and all objects (biabl, binode) pointed by any bereg 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 bereg *list;
char *name;
name = namealloc ("counter_2");
list = beh_addbereg (list,"ram_0", NULL, NULL);
list = beh_rmvbereg (list,name);

SEE ALSO

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

BUGS

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