4 * Copyright (c) 2000 Stephen Williams (steve@icarus.com)
6 * This source code is free software; you can redistribute it
7 * and/or modify it in source code form under the terms of the GNU
8 * General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
22 #ident "$Id: priv.h,v 1.8 2007/02/26 19:49:50 steve Exp $"
25 # include <ivl_target.h>
31 extern unsigned error_count
;
34 * A device has an array of pins, that are bound to the netlist either
35 * by attribute or by random lookup. The bind_pin table keeps track of
38 * Each cell also has attached to it an expression that calculates
39 * results from an input. That expression is represented by a sum of
40 * product terms. A product term is an array of term_t objects,
41 * terminated by a term will a null nex pointers. A sum, then, is an
42 * array of pointers to term_t arrays, terminated by a null pointer.
45 typedef struct term_s
{
51 * This structure describes a target device pin. If the pin is not
52 * controlled by the pal (i.e. it is a power pin) then the sop field
53 * is null. Otherwise, the sop in the macrocell that controls the pin.
55 * If the pin has an enable, then the sop for the enable function is
56 * stored here as well.
58 * This structure for collecting the PAL design assumes that all the
59 * macrocells are associated with pins, or are enables for other
62 * The bind_pin array is the complete description of the target as it
66 /* This is the netlist connection for the pin. */
68 /* If the pin is an output, this is is sop that drives it. */
71 /* If the output has an enable, this is it, along with the
72 single term that activates it. */
73 ivl_net_logic_t enable
;
76 /* If there is a register here, this is it. */
80 /* The input to the cell is this expression. */
82 /* These are the SOP flags that I believe I need. */
87 extern struct pal_bind_s
* bind_pin
;
91 * These are various steps in the fitting process.
93 extern int get_pad_bindings(ivl_scope_t net
, void*x
);
95 extern void absorb_pad_enables(void);
97 extern int fit_registers(ivl_scope_t scope
, void*x
);
99 extern int fit_logic(void);
101 extern int emit_jedec(const char*path
);
105 * Revision 1.8 2007/02/26 19:49:50 steve
106 * Spelling fixes (larry doolittle)
108 * Revision 1.7 2002/08/12 01:35:03 steve
109 * conditional ident string using autoconfig.
111 * Revision 1.6 2001/05/16 03:55:30 steve
112 * Update to new LPM API for flip-flops.
114 * Revision 1.5 2001/01/15 00:05:39 steve
115 * Add client data pointer for scope and process scanners.
117 * Revision 1.4 2001/01/09 03:10:48 steve
118 * Generate the jedec to configure the macrocells.
120 * Revision 1.3 2000/12/14 23:37:47 steve
121 * Start support for fitting the logic.
123 * Revision 1.2 2000/12/09 03:42:52 steve
124 * Stuff registers into macrocells.
126 * Revision 1.1 2000/12/09 01:17:38 steve
127 * Add the pal loadable target.