Mail Archives: geda-user/2013/10/27/15:37:23
On Sun, 2013-10-27 at 23:36 +0430, James Jackson wrote:
> Thank you for your reply. I have found a 'cludge' solution - if I give
> all my subcircuits the same refdes, then all the merging happens
> correctly. Seems a pretty dirty way of doing it, though...
>
>
> The hierarchy really just allows me to have one master schematic from
> which I can move around all others in the design easily. The circuit
> is a stereo audio application, so each circuit (of which there are
> six) will be used at most twice, and I don't have many signals moving
> between subcircuits (five at most).
I that case, try removing the sub-circuit names entirely. (Remove the
"refdes=X?" attribute from your instances, it should give you the
navigation you want without the X1/... prefix to everything.
> I think my options are boiling down to:
>
>
> 1. Keep the hierarchy, with the cludgy subcircuit naming described
> above
> 2. Keep the hierarchy, but route power signals explicitly to each
> subcircuit
> 3. Get rid of the hierarchy, and pass multiple schematic names to
> gsch2pcb
1 is possible, but might bite you in the longer term.
2 is normal for hierarchy.
3 is normal for flat schematics.
For 1, assuming you are not using hierarchy to multiply instantiate the
same schematic - rather, using it to help navigating an otherwise flat
schematic, try this:
In your project folder, create a file called "gnetlistrc" (or perhaps
"gafrc", depending on your exact version of gEDA?), in this place:
; Controls if net names are mangled to make them uniq when traversing
; down into the hierarchy. If this is disabled then the net names are not
; changed and it is the user's responsibility to make sure they are unique.
; If you disable this, you really are taking your netlist's life into your
; own hands. This basically has the effect of making all same named nets
; in the entire hierarchy be electrically connected. Hope you know what you
; are doing.
;
(hierarchy-netname-mangle "disabled")
There is also the option:
; hierarchy-uref-mangle string
;
; Controls if uref names are mangled to make them uniq when traversing
; down into the hierarchy. If this is disabled then urefs are not changed
; and it is the user's responsibility to make sure they are unique.
; If you disable this, you really are taking your netlist's life into your
; own hands. You *MUST* have unique urefs throughout the entire hierarchy
; or bad things might happen. Also you cannot reuse underlying schematics.
;
(hierarchy-uref-mangle "enabled")
;(hierarchy-uref-mangle "disabled")
But I'd recommend trying removing the refdes= from your sub-circuit
instantiation first, as if that works, it saves breaking the hierarchy
system completely.
Peter
--
Peter Clifton <peter DOT clifton AT clifton-electronics DOT co DOT uk>
Clifton Electronics
- Raw text -