Line | |
---|
1 | /* |
---|
2 | |
---|
3 | Copyright (c) 1992, 1993 |
---|
4 | Regents of the University of California |
---|
5 | All rights reserved. |
---|
6 | |
---|
7 | Use and copying of this software and preparation of derivative works |
---|
8 | based upon this software are permitted. However, any distribution of |
---|
9 | this software or derivative works must include the above copyright |
---|
10 | notice. |
---|
11 | |
---|
12 | This software is made available AS IS, and neither the Electronics |
---|
13 | Research Laboratory or the Universify of California make any |
---|
14 | warranty about the software, its performance or its conformity to |
---|
15 | any specification. |
---|
16 | |
---|
17 | Author: Szu-Tsung Cheng, stcheng@ic.Berkeley.EDU |
---|
18 | 10/92 |
---|
19 | 10/93 |
---|
20 | |
---|
21 | $Header: /projects/development/hsv/CVSRepository/vl2mv/src/parser/vl_clock.c,v 1.2 2009/03/09 20:25:57 fabio Exp $ |
---|
22 | |
---|
23 | |
---|
24 | */ |
---|
25 | |
---|
26 | #include "util.h" |
---|
27 | #include "st.h" |
---|
28 | #include "list.h" |
---|
29 | #include "array.h" |
---|
30 | #include "set.h" |
---|
31 | #include "stack.h" |
---|
32 | #include "graph.h" |
---|
33 | #include "vl_defs.h" |
---|
34 | #include "vl_types.h" |
---|
35 | #include "vlr_int.h" |
---|
36 | #include "vl_fg_defs.h" |
---|
37 | #include "vl_fg_types.h" |
---|
38 | #include "vl_flowgraph.h" |
---|
39 | #include "vl_create.h" |
---|
40 | #include "vl_write_util.h" |
---|
41 | #include "verilog.h" |
---|
42 | |
---|
43 | extern vl_desc *mod_list; |
---|
44 | |
---|
45 | |
---|
46 | void register_vl2mv_synClock(char *cname, int edge, int pi, float rho) |
---|
47 | { |
---|
48 | vl_synClock *synclock; |
---|
49 | char buf[MAXSTRLEN]; |
---|
50 | |
---|
51 | if (edge > 1 || edge < 1 || pi < 0 || rho < 0.0) { |
---|
52 | sprintf(buf, "invalid VL2MVClock spec.: name=%s edge=%d pi=%d rho=%f", |
---|
53 | cname, edge, pi, rho); |
---|
54 | compile_error(buf); |
---|
55 | } |
---|
56 | |
---|
57 | synclock = (vl_synClock*)chk_malloc(sizeof(vl_synClock)); |
---|
58 | synclock->name = vlStrdup(cname); |
---|
59 | synclock->edge = edge; |
---|
60 | synclock->pi = pi; |
---|
61 | synclock->rho = rho; |
---|
62 | |
---|
63 | if (mod_list) |
---|
64 | st_insert(mod_list->synclock_st, vlStrdup(cname), |
---|
65 | (char*)synclock); |
---|
66 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.