Add support for text macros with arguments.
[iverilog.git] / tgt-pal / dump_final.c
blob393403832cb61a8308a5681a4d1acc9b852c2280
1 /*
2 * Copyright (c) 2000 Stephen Williams (steve@icarus.com)
4 * This source code is free software; you can redistribute it
5 * and/or modify it in source code form under the terms of the GNU
6 * General Public License as published by the Free Software
7 * Foundation; either version 2 of the License, or (at your option)
8 * any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19 #ifdef HAVE_CVS_IDENT
20 #ident "$Id: dump_final.c,v 1.4 2003/02/26 01:24:35 steve Exp $"
21 #endif
23 # include "config.h"
25 # include "priv.h"
26 # include <stdio.h>
29 void dump_final_design(FILE*out)
31 unsigned idx;
32 for (idx = 0 ; idx < pins ; idx += 1) {
33 struct pal_bind_s*pin = bind_pin + idx;
35 if (bind_pin[idx].sop) {
36 fprintf(out, "Output pin %u:\n", idx+1);
37 fprintf(out, " pin nexus=%s\n",
38 pin->nexus? ivl_nexus_name(pin->nexus) : "");
39 fprintf(out, " pin enable=%s\n",
40 pin->enable ? ivl_logic_name(pin->enable) : "1");
42 if (pin->reg)
43 fprintf(out, " pin ff=%s.%s.q%u\n",
44 ivl_scope_name(ivl_lpm_scope(pin->reg)),
45 ivl_lpm_basename(pin->reg),
46 pin->reg_q);
47 else
48 fprintf(out, " pin ff=*.q%u\n", pin->reg_q);
49 } else {
50 fprintf(out, "Input pin %u:\n", idx+1);
51 fprintf(out, " pin nexus=%s\n",
52 pin->nexus? ivl_nexus_name(pin->nexus) : "");
60 * $Log: dump_final.c,v $
61 * Revision 1.4 2003/02/26 01:24:35 steve
62 * ivl_lpm_name is obsolete.
64 * Revision 1.3 2002/08/12 01:35:03 steve
65 * conditional ident string using autoconfig.
67 * Revision 1.2 2001/07/25 03:10:50 steve
68 * Create a config.h.in file to hold all the config
69 * junk, and support gcc 3.0. (Stephan Boettcher)
71 * Revision 1.1 2000/12/09 03:42:52 steve
72 * Stuff registers into macrocells.