First you have to create the subcircuit, and then you have to create the symbol, that you then can put in your overview circuit.
This is a feature that is quite useful, as then you can create a modular circuit, this mean that if you have a circuit that you will reuse, or if you just want a better overview over of your diagram.
For example, take a look at the gTAG circuit from the geda-example package on my machine it is located, at /usr/share/doc/geda-examples/examples/gTAG :
The blocks attributes is shown on the following picture:
So if we want our schematic to have this hierarki blocks, then we need to create a symbol and a schematic before we can add it the overview schematic.
Hopeful some day, an feature to gschem is added, so you just can draw an square, slap some pins on it and it will create the symbol and underlying schematic, with the inputs and output in it.
But until further, I have created a script that, takes an schematic and creates a block symbol from it. There is some limits on this scripts, so I will name them here:
- Use of symbol: "in-1.sym" to indicate a input port
- Use of symbol: "out-1.sym" to indicate a output port
This scripts, will create a file called "yournameofsch.src", this file is a tragesym file, that then is need to be put through "tragesym" to create the symbol for your circuit.
Add this symbol to your schematic, open the attributes for this symbol, and add "source=yournameofsch.src" to it. This is so that it points to your circuit.
Then you should be done, do this for all your subcircuits.
Just a warning, this script is not mean to be a permanent solution, this is only a temporary solution for this. I am also currently working on a new version, that does not rely on "tragesym" to create the symbol, but could take awhile before this is done.
The script can be found on github: https://github.com/mtkaalund/gSchem-Hierarki-Block-Symbol-Creater
Hopes this help somebody