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_write_util.h,v 1.2 2009/03/09 20:25:58 fabio Exp $ |
---|
22 | |
---|
23 | |
---|
24 | */ |
---|
25 | EXTERN void vl_mv_to_bin ARGS((vl_term *)); |
---|
26 | EXTERN void vl_bin_to_mv ARGS((vl_term *)); |
---|
27 | EXTERN void vl_write_mv_comp ARGS((FILE *, short, vl_term *, vl_term *, vl_term *)); |
---|
28 | EXTERN void vl_write_bin_comp ARGS((FILE *, short, vl_term *, vl_term *, vl_term *)); |
---|
29 | EXTERN void vl_write_mv_connect ARGS((FILE *, vl_term *, vl_term *)); |
---|
30 | EXTERN void vl_write_bin_connect ARGS((FILE *, vl_term *, vl_term *, int)); |
---|
31 | EXTERN void vl_write_const ARGS((FILE *, vl_expr *, vl_term *)); |
---|
32 | EXTERN void vl_write_consts ARGS((FILE *)); |
---|
33 | EXTERN void write_int_connect ARGS((FILE*, int, vl_term*)); |
---|
34 | EXTERN vl_term *write_local_control ARGS((FILE*, vl_term*, lsList, int)); |
---|
35 | EXTERN char *new_termname ARGS(()); |
---|
36 | EXTERN char *new_instname ARGS(()); |
---|
37 | EXTERN vl_range *get_decl_range ARGS((void *)); |
---|
38 | EXTERN vl_expr *get_decl_range_left ARGS((void *)); |
---|
39 | EXTERN vl_expr *get_decl_range_right ARGS((void *)); |
---|
40 | EXTERN short get_decl_flags ARGS((void *)); |
---|
41 | EXTERN void get_hilo ARGS((vl_id_range *, int *, int *)); |
---|
42 | EXTERN void insert_control_list ARGS((var_info*, vl_term*)); |
---|
43 | EXTERN void print_control_var_pair ARGS((FILE *, char *, char *)); |
---|
44 | EXTERN vl_term *write_multi_in_or ARGS((FILE *, lsList)); |
---|
45 | EXTERN vl_term *syndrome_to_control ARGS((FILE*, char*, st_table*)); |
---|
46 | EXTERN lsList put_guard_zero ARGS((FILE *, lsList)); |
---|
47 | EXTERN lsList get_transition ARGS((FILE *)); |
---|
48 | EXTERN vl_term *write_array_access ARGS((FILE *, vl_id_range *, vl_term *, vl_expr *)); |
---|
49 | EXTERN char *sel_var ARGS((char *)); |
---|
50 | EXTERN char *check_dc ARGS((lsList)); |
---|
51 | EXTERN char *write_red_op ARGS((FILE*, short, vl_term*, vl_term*, vl_term*)); |
---|
52 | EXTERN char *write_op_vector_bop ARGS((FILE *, short, vl_term*, vl_term*, vl_term*)); |
---|
53 | EXTERN char *write_rel_vector_bop ARGS((FILE *, short, vl_term*, vl_term*, vl_term*)); |
---|
54 | EXTERN void put_nblock_transition ARGS((FILE *, int, int, vl_id_range *, int, int, int, char *, lsList)); |
---|
55 | EXTERN vl_port *search_match_port ARGS((char *, lsList)); |
---|
56 | EXTERN vl_port_connect *search_inst_port ARGS((char *, lsList)); |
---|
57 | EXTERN char *vl_translated_prim_symbol ARGS((unsigned char)); |
---|
58 | EXTERN char *vl_translate_prim_symbol ARGS((unsigned char)); |
---|
59 | EXTERN vl_term *array_or ARGS((FILE *, array_t *)); |
---|
60 | EXTERN vl_term *vl_write_nond_wire ARGS((FILE*, vl_term*, lsList, vl_term*)); |
---|
61 | EXTERN vl_term *concate_assigns ARGS((array_t *)); |
---|
62 | EXTERN char *descape ARGS((char*, char, char)); |
---|
63 | EXTERN char *triPort ARGS((char*)); |
---|
64 | EXTERN void *chng_decl_range ARGS((void *decl, vl_range *new_range)); |
---|
65 | EXTERN void to_upper ARGS((char*)); |
---|
66 | EXTERN char *shift_mv_vars ARGS((char *inputs, int nval)); |
---|
67 | EXTERN void declare_mvar_io ARGS((FILE *file, char *dir, vl_id_range *id_sym)); |
---|
68 | EXTERN void declare_bin_scalar_io ARGS((FILE *file, char *dir, vl_id_range *id_sym)); |
---|
69 | EXTERN void declare_bin_vector_io ARGS((FILE *file, char *dir, vl_id_range *id_sym)); |
---|
70 | EXTERN int vector_width ARGS((int lo, int hi)); |
---|
71 | EXTERN int need_edge_detector ARGS((lsList table_entries, int ith_port)); |
---|
72 | EXTERN int put_entry ARGS((FILE *file, char *str, char *dc, int need_leading_and)); |
---|
73 | EXTERN void chkUndefPorts ARGS((vl_expr *expr, st_table *sig_st)); |
---|
74 | EXTERN void write_out_port ARGS((FILE *file, vl_id_range *id_sym, |
---|
75 | int m_hi, int m_lo, vl_expr *inst_expr, |
---|
76 | st_table *auxSigST)); |
---|
77 | EXTERN void put_const_port_connect ARGS((FILE *file, char *outstr, |
---|
78 | vl_id_range *master, |
---|
79 | vl_port_connect *instance, |
---|
80 | lsList input_consts, |
---|
81 | vl_term *term_out)); |
---|
82 | |
---|
83 | EXTERN void put_mvar_port_connect ARGS((FILE *file, char *outstr, |
---|
84 | vl_id_range *master, |
---|
85 | vl_port_connect *instance)); |
---|
86 | EXTERN void put_bin_scalar_port_connect ARGS((FILE *file, char *outstr, |
---|
87 | vl_id_range *master, |
---|
88 | vl_port_connect *instance)); |
---|
89 | EXTERN void put_bin_vector_port_connect ARGS((FILE *file, char *outstr, |
---|
90 | vl_id_range *master, |
---|
91 | vl_port_connect *instance)); |
---|
92 | EXTERN void vl_write_outport_connect ARGS((FILE *file, vl_expr *inst_expr)); |
---|
93 | EXTERN int isOutPort ARGS((short unsigned flag)); |
---|
94 | EXTERN void record_pseudo_cntxt ARGS((FILE *file, int fg_id, |
---|
95 | st_table *pre_cond, |
---|
96 | char *ctrl_syndrome, |
---|
97 | char *rst_ctrl_syndrome, |
---|
98 | st_table *vars)); |
---|
99 | EXTERN void check_assign ARGS((vl_bassign_stmt *assign, int procedural)); |
---|
100 | EXTERN void write_switch ARGS((FILE *file, vl_id_range *id_sym, |
---|
101 | vl_term *sel, vl_expr *sel_expr, |
---|
102 | vl_term *orig, vl_term *new, |
---|
103 | vl_term *out_term)); |
---|
104 | EXTERN void dump_debug_information ARGS((FILE *file, vl_id_range *id_var, |
---|
105 | vl_term *current_term, int lineno, |
---|
106 | lsList ctrl_list, |
---|
107 | char *ctrl_syndrome)); |
---|
108 | EXTERN void patch_unaffected_term ARGS((FILE *file, vl_id_range *id_sym, |
---|
109 | vl_term *orig_term, |
---|
110 | vl_term *out_term)); |
---|
111 | EXTERN void connect_concat ARGS((FILE *file, vl_term *assign_term, array_t *lhs_array)); |
---|
112 | EXTERN void write_const_param ARGS((FILE *file, vl_expr *expr, vl_id_range *ival)); |
---|
113 | EXTERN void subrange_term ARGS((FILE *file, vl_term *in, vl_term *out)); |
---|
114 | EXTERN void expand_term ARGS((FILE *file, vl_term *in, vl_term *out)); |
---|
115 | EXTERN void shrink_term ARGS((FILE *file, vl_term *in, vl_term *out)); |
---|
116 | EXTERN void width_unknown ARGS(()); |
---|
117 | EXTERN void write_case_tag_const ARGS((FILE *file, vl_term *selector, |
---|
118 | vl_expr *tag_expr, st_table *vars)); |
---|
119 | EXTERN void put_bin_scalar_func_connect ARGS((FILE *file, |
---|
120 | vl_id_range *master, |
---|
121 | vl_term *instance)); |
---|
122 | EXTERN void put_bin_vector_func_connect ARGS((FILE *file, vl_id_range *master, |
---|
123 | vl_term *instance)); |
---|
124 | EXTERN void put_quasi_table ARGS((FILE *file, char *dc, char *quasi_name, |
---|
125 | char *sync_name, vl_id_range *id_sym, |
---|
126 | vl_term *out_term, int lo, int hi, |
---|
127 | int n_entries)); |
---|
128 | EXTERN void instantiate_reset_mux ARGS((FILE *file, vl_id_range *id_sym, |
---|
129 | int lo, int hi, |
---|
130 | var_info *var, var_info *lvar)); |
---|
131 | EXTERN void instantiate_input_latch ARGS((FILE *file, vl_id_range *id_sym)); |
---|
132 | EXTERN void instantiate_hidden_latch ARGS((FILE *file, vl_id_range *id_sym)); |
---|
133 | EXTERN void create_wire_nondeterminism ARGS((FILE *file, char * var_name, |
---|
134 | vl_id_range *id_sym, |
---|
135 | array_t *vars_array)); |
---|
136 | EXTERN void put_nblock_mout_transition ARGS((FILE *file, int non_block_wire, |
---|
137 | int n_entries, |
---|
138 | vl_id_range *id_sym, |
---|
139 | int idx_lo, int idx_hi, int cur, |
---|
140 | char *dc, char *latch_name)); |
---|