2017-04-25 14:41:48 +02:00
|
|
|
/*
|
|
|
|
|
* wiring.h --
|
|
|
|
|
*
|
|
|
|
|
* Contains definitions for things that are exported by the
|
|
|
|
|
* wiring module.
|
|
|
|
|
*
|
2020-05-23 23:13:14 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
* * Copyright (C) 1985, 1990 Regents of the University of California. *
|
|
|
|
|
* * Permission to use, copy, modify, and distribute this *
|
|
|
|
|
* * software and its documentation for any purpose and without *
|
|
|
|
|
* * fee is hereby granted, provided that the above copyright *
|
|
|
|
|
* * notice appear in all copies. The University of California *
|
|
|
|
|
* * makes no representations about the suitability of this *
|
|
|
|
|
* * software for any purpose. It is provided "as is" without *
|
|
|
|
|
* * express or implied warranty. Export of this software outside *
|
|
|
|
|
* * of the United States of America may require an export license. *
|
2017-04-25 14:41:48 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
*
|
2020-05-25 21:46:59 +02:00
|
|
|
* rcsid $Header$
|
2017-04-25 14:41:48 +02:00
|
|
|
*/
|
|
|
|
|
|
2024-10-16 08:38:41 +02:00
|
|
|
#ifndef _MAGIC__WIRING__WIRING_H
|
|
|
|
|
#define _MAGIC__WIRING__WIRING_H
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
#include "utils/magic.h"
|
|
|
|
|
#include "database/database.h"
|
|
|
|
|
|
|
|
|
|
/* Table that defines the shape of contacts and the layers that they
|
|
|
|
|
* connect. This definition allows some layers to extend around the
|
|
|
|
|
* contact, to support technologies where the contact pads are different
|
|
|
|
|
* sizes for the different layers that the contact connects.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
typedef struct _Contact *ContactPtr;
|
|
|
|
|
|
|
|
|
|
typedef struct _Contact
|
|
|
|
|
{
|
|
|
|
|
TileType con_type; /* Type of material that forms core of
|
|
|
|
|
* contact.
|
|
|
|
|
*/
|
|
|
|
|
int con_size; /* Minimum size of this contact (size of
|
|
|
|
|
* minimum con_type area).
|
|
|
|
|
*/
|
|
|
|
|
TileType con_layer1; /* First of two layers that the contact
|
|
|
|
|
* really isn't a contact.
|
|
|
|
|
*/
|
|
|
|
|
int con_surround1; /* How much additional material of type
|
|
|
|
|
* con_layer1 must be painted around the
|
|
|
|
|
* edge of the contact.
|
|
|
|
|
*/
|
2019-04-24 16:48:45 +02:00
|
|
|
int con_extend1; /* How much additional material of type
|
|
|
|
|
* con_layer1 must extend beyond the
|
|
|
|
|
* contact in the orientation of the route.
|
|
|
|
|
*/
|
2017-04-25 14:41:48 +02:00
|
|
|
TileType con_layer2; /* Same information for second layer that
|
|
|
|
|
* the contact connects.
|
|
|
|
|
*/
|
|
|
|
|
int con_surround2;
|
2019-04-24 16:48:45 +02:00
|
|
|
int con_extend2;
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
ContactPtr con_next; /* Pointer to next contact record */
|
|
|
|
|
} Contact;
|
|
|
|
|
|
|
|
|
|
extern Contact *WireContacts; /* Points to all the contacts that are
|
|
|
|
|
* defined. */
|
|
|
|
|
|
|
|
|
|
/* Types defining the current state of the wiring tool */
|
|
|
|
|
extern TileType WireType; /* Type of material currently selected
|
|
|
|
|
* for wiring.
|
|
|
|
|
*/
|
|
|
|
|
extern int WireWidth; /* Thickness of material to use for wiring. */
|
|
|
|
|
|
|
|
|
|
/* Procedures for placing wires: */
|
|
|
|
|
|
2025-01-31 20:02:19 +01:00
|
|
|
extern void WirePickType(TileType type, const Point *ppoint, int width);
|
|
|
|
|
extern void WireAddLeg(Rect *rect, const Point *point, int direction);
|
2025-01-31 19:59:05 +01:00
|
|
|
extern void WireAddContact(TileType newType, int newWidth);
|
|
|
|
|
extern void WireShowLeg(void);
|
|
|
|
|
extern int WireGetWidth(void);
|
|
|
|
|
extern TileType WireGetType(void);
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
/* Legal values for the "direction" parameter to WireAddLeg: */
|
|
|
|
|
|
|
|
|
|
#define WIRE_CHOOSE 0
|
|
|
|
|
#define WIRE_HORIZONTAL 1
|
|
|
|
|
#define WIRE_VERTICAL 2
|
|
|
|
|
|
|
|
|
|
/* Procedures for reading the technology file: */
|
|
|
|
|
|
2025-01-31 19:59:05 +01:00
|
|
|
extern void WireTechInit(void);
|
2025-01-31 20:02:19 +01:00
|
|
|
extern bool WireTechLine(const char *sectionName, int argc, char *argv[]);
|
2025-01-31 19:59:05 +01:00
|
|
|
extern void WireTechFinal(void);
|
|
|
|
|
extern void WireTechScale(int scalen, int scaled);
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
/* Initialization: */
|
|
|
|
|
|
2025-01-31 19:59:05 +01:00
|
|
|
extern void WireInit(void);
|
2017-04-25 14:41:48 +02:00
|
|
|
|
2024-10-16 08:38:41 +02:00
|
|
|
#endif /* _MAGIC__WIRING__WIRING_H */
|