gEDA-dev: gEDA Schematic to Symbol Generator
A Tan
atan102912 at yahoo.com
Tue Oct 2 20:08:10 EDT 2007
Hi Bert,
Thank you very much for your helpful suggestions and comments. I appreciate that and I apologize for being so late to respond. I've been pretty busy and pretty ill lately. Anyways, the following is additional information added to the ini file for the program. It explains more about how users can change their pin and attribute settings. Hopefully, it'll help. Thanks again for your input.
Sincerely,
Andrew
#########################################################################
#
#
# geda_sch2sym.ini or SymName_IO_ports.ini file description
#
# 1) geda_sch2sym.bsh is a program to generate hierarchical symbols from
# given gEDA schematics. It can also be used to generate symbols
# from text files (SymName_IO_ports.ini) with pin description data
# in table form.
# 2) The ini files are used by the geda_sch2sym.bsh program.
# It resides in the same directory of the user schematic file. The
# geda_sch2sym.ini is configured by the user and used by the
# geda_sch2sym.bsh program to generate the hierarchical symbol and/or
# the SymName_IO_ports.ini file. If needed, further fine tuning of
# the symbol can be done by the user in the SymName_IO_ports.ini
# file and run the geda_sch2sym.bsh program with the -t option using
# the modified SymName_IO_ports.ini file.
# Please refer to the program usage README.txt for details.
# 3) All [sections] must exist, although certain [section]'s
# data may be empty.
# 4) Comment starts with "#" or ";" at the beginning of a line.
# "#" or ";" within a line, not starting with themselves,
# are treated as part of the data.
# 5) Data fields can be in the forms:
# option_name1=option_data1
# option_name2 = option data 2
# Other fields are space or tab separated. Leading spaces/tabs are
# ignored. Consecutive spaces or tabs are treated as single space.
# 6) Most fields can be defined freely by users to set user preferences
[sch_IO_devices]
# User defined IO port symbols' device attributes used in the schematic.
#
# Users should find out which device attribute values are used for I/O
# symbols in their schematics and enter them below.
#
# io_device_attr_value:
# These are device attribute values of the IO port symbols in the user
# schematic. Each instance of these devices contained in the schematic
# will be used by the geda_sch2sym program as a pin of the symbol to be
# generated. The netname of the wire connected to these IO devices in
# the schematic will initially be generated as the data in the pinnumber
# and the pinlabel columns of the [sym_pins_list].
# The refdes attribute values assigned to the IO devices in the schematic
# will be used to generate the pinseq attribute value for the symbol pin
# by extracting the numeric suffix from the refdes value.
# Note that the I/O device must have "refdes" attribute value with unique
# numeric suffix.
#
# io_port_direction:
# User defined to be used as the symbol pin's pintype
#
# posit:
# Define initially where the pin will be placed on the symbol box;
# left, right, top or bottom. The posit column in the [sym_pins_list]
# section will override this posit setting.
# Valid values: l, r, t, b
#
# The io_port_direction will be used as the symbol pin's pintype.
# Valid values : IN, OUT, INOUT, IO, (or your own, such as pas, pwr).
#
# Below is gEDA Verilog I/O port symbols' devices setup.
# io_device_attr_value io_port_direction posit
IPAD IN l
OPAD OUT r
IOPAD INOUT r
# Below is possible Spice netlist I/O port symbols' devices setup.
# User should find out which device attribute values are used for I/O
# symbols, and enter them below. Do not forget to comment out the
# above gEDA Verilog I/O setting.
# io_device_attr_value io_port_direction posit
; spice-IO INOUT r
[sym_options]
# These are the user defined values to be used for the generated
# symbol. Most values are integer values, others are either yes or no.
# If the sym_box_width/height is specified as greater than the calculated
# value, it will be used as specified.
sym_box_width = 2000
sym_box_height = 800
# Distance between the box corner and its closest pin on left or right
# side of the box.
sym_box_corner_to_lr_pin = 200
# Distance between the box corner and its closest pin on top or bottom
# side of the box.
sym_box_corner_to_tb_pin = 200
# Drawn width of the box lines
sym_box_line_width = 10
# Font size for refdes and device attribute value
sym_ref_dev_font_size = 10
# Font size for other symbol attributes
sym_attr_font_size = 8
pin_length = 300
# Distance between pins
pin_sep = 300
# Distance from the origin axis to a pin
pin_offset_from_origin = 100
# Drawn line width for the direction arrow, and the circle dot
pin_dot_line_width = 10
# define if pin text are shown vertical for pins on top or bottom of symbol
pin_tb_text_vertical = yes
# Yes if pin direction arrows are drawn in the symbol. If this option
# is yes, then all pin label_0 will be aligned to have the same distance from
# the side of the symbol box.
pin_dir_arrow = yes
[sym_attr]
# Require attribute names, user can define their values
# Do not forget to set the actual "device attribute value" either before
# the symbol generation in the ini file, or after the symbol generation
# in the symbol file.
# Attr_name = attr_value
version = 20061020 1
device = device?
refdes = U?
[sym_attr_optional]
# Optional user defined symbol attribute names and values below
# Attr_name = attr_value
description = your description
comment = This is a comment attribute value
author = Your Name
YourAttr = Your attribute value
[sym_pin_attr_select]
# User can define the location of attribute value to be displayed
# on the symbol. The attribute value corresponding to the selected
# user defined attribute name is defined by the column number of
# the [sym_pins_list].
# pAttr_0 row is required, other rows are optional
# A 1 in the "visible" column allows the selected attribute value to
# be visible on the symbol.
# Pin attribute text location
# |
# [pAttr_1] | [pAttr_4]
# pin --------------------|> pAttr_0
# [pAttr_2] | [pAttr_3]
# Outside symbol box <- | -> Inside Symbol box
#
# Below is gEDA Verilog netlist compatible setting
# attr_value,
#attr_loc attr_name column No of
# sym_pin_list visible font_size
pAttr_0 pinnumber 0 1 8
pAttr_1 pinseq 1 0 6
pAttr_2 pintype 2 0 6
pAttr_3 pinlabel 6 0 6
# Below is possible Tragesym compatible setting
; pAttr_0 pinlabel 6 1 8
; pAttr_1 pinnumber 0 1 8
; pAttr_2 pinseq 1 0 8
; pAttr_3 pintype 2 0 8
# Below is custom setting
; pAttr_0 pinname 0 1 8
; pAttr_1 pinnumber 1 0 8
; pAttr_2 pintype 2 0 8
[sym_pins_list]
# For geda_sch2sym.ini file, the data in this section is empty and
# ignored by the program. But do not remove the [sym_pins_list] header.
#
# For SymName_IO_ports.ini file, this section is filled with I/O ports
# data generated by the program or modified/configured by the user.
# Users may add additional columns with their own data, and then use the
# feature in [sym_pin_attr_select] section to get the data into the symbol.
# For example, create a new column of data of your own in column 7 in the
# SymName_IO_ports.ini file, then replace the pAttr_0 rows as follow, run
# the -t option, and see the effect on the symbol:
; pAttr_0 mypinattr 7 1 8
#
# This must be the last [section] in the file.
# Blank field is denoted by "-" (minus) without the quotes.
# Style: (line,dot,none,-)
# Posit: (l, r, t, b)
# Pintype: (in, out, io, inout, (or your own) ); uppercase or lowercase
# Only (in, out, io, inout) will generate arrow if enabled in [sym_options].
#
# 0 1 2 3 4 5 6 <- column number
# pinnumber pinseq pintype style posit net pinlabel
#
###########################################################################
Bert Timmerman <bert.timmerman at xs4all.nl> wrote: Hi Andrew,
I have been playing with your script etc. last night and I find it quit
useful.
IMHO this is another big step in getting hierarchy automated (as in the
last "A" in gEDA).
One thing that could be improved is w.r.t. the attributes defined in the
geda_sch2sym.ini file.
[sym_attr]
# Require attribute names, user can define their values
# Attr_name = attr_value
version = 20061020 1
device = ?
refdes = U?
[sym_attr_optional]
# Optional user defined symbol attribute names and values below
# Attr_name = attr_value
description = ?
author = Bert Timmerman
dist-license = GPL
use-license = unlimited
The way things are at this moment all devices are "adder1b" ;-(
And of course one can substitute the "author=", "use-license=" and
"dist-license=" attributes to the user needs, maybe even pass $USER to
the "author=" attribute.
Other settings I have changed are:
pin_dir_arrow = no
IMHO the arrows on the input side of the symbol resemble a clocked
input, so I highly appreciate it that this feature is configurable.
and I like the custom setting of pinname, pinnumber and pintype as in:
# Pin attribute text location
# |
# [pAttr_1] | [pAttr_4]
# pin --------------------|> pAttr_0
# [pAttr_2] | [pAttr_3]
# Outside symbol box <- | -> Inside Symbol box
#
# Below is gEDA Verilog netlist compatible setting
# attr_value,
#attr_loc attr_name column No of
# sym_pin_list visible font_size
# Below is custom setting
pAttr_0 pinname 0 1 8
pAttr_1 pinnumber 1 0 8
pAttr_2 pintype 2 0 8
over the default values.
Yours is VERY good stuff indeed.
Now for a good way to get this functionality implemented into
gschem ;-)
Gentle-people may I have your votes please ?
Kind regards,
Bert Timmerman.
On Tue, 2007-09-25 at 20:27 -0700, A Tan wrote:
_______________________________________________
geda-dev mailing list
geda-dev at moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.seul.org/pipermail/geda-dev/attachments/20071002/1e763ee8/attachment.htm
More information about the geda-dev
mailing list