1GENLIB_BUS.3(October 1, 1997) GENLIB_BUS.3(October 1, 1997)
2
3
4
6 GENLIB_BUS - Creates a bus name for netlist
7
9 #include <genlib.h>
10 char ∗GENLIB_BUS(busname, from, to);
11 char ∗busname;
12 long from, to;
13
15 busname Common signal name for a bus
16
17 from Starting index of the set of signal, from included
18
19 to Ending index of the set of signal, to included
20
22 GENLIB_BUS Creates a set of names, based upon a common name, valid for
23 the genlib netlist functions that manipulate the signal, and/or connec‐
24 tor, concept. They are:
25 LOINS(3)
26 LOCON(3)
27 The from, to arguments give the boundaries of the bus to be created,
28 both of them being included in the set. The function allows increasing
29 or decreasing order busses, as one could expect.
30 This function has a constant equivalent, it means that if the from, to
31 values are known at compilation time, one should better use, for read‐
32 ability purposes, the "[n:m]" construct.
33
35 #include <genlib.h>
36 main()
37 {
38 int b = 0;
39 int e = 12;
40 /∗ Create a figure to work on ∗/
41 GENLIB_DEF_LOFIG("mycell");
42 /∗ define interface ∗/
43 GENLIB_LOCON(GENLIB_BUS("i", b, e), INPUT, GENLIB_BUS("sig", b, e);
44 GENLIB_LOCON("o[2:0]", OUTPUT, "sigout[4:6]");
45 /∗ Place an instance ∗/
46 GENLIB_LOINS("model","instance", GENLIB_BUS("sig", e/2), "sigout[6]", EOL);
47 /∗ Save all that on disk ∗/
48 GENLIB_SAVE_LOFIG();
49 }
50
52 genlib(1), GENLIB_ELM(3).
53
54
55
56
57
58
59PROCEDURAL GENERATION LANGUAGE ASIM/LIP6 GENLIB_BUS.3(October 1, 1997)