I've been wondering if it would be useful to add some user hooks into various bits of gschem.

For example, if you select an instance in a schematic, maybe have gschem do its normal thing (select the instance) and then if the hook has been defined, run the guile procedure

 (gschem-selected-instance-hook list_of_selected_instances)

Offhand, this one and hooks for selecting a net or an instance pin are the big ones which come to mind.

It seems if you had this in place, you could set up an additional menu, "Mode" perhaps, where you could pick if you are in pcb layout mode, simulation mode, or whatever. If you're in pcb layout mode, you could install hooks which cause communication between gschem and pcb so you could select something on the schematic and have pcb select the corresponding layout instance. If you're in simulation mode, selecting a net or an instance pin could perhaps plot the signal or insert the expression into a waveform calculator.

Currently, none of the hooks exist in the other tools which I have in mind, but we have to start somewhere! I think for me, the crossprobing between gschem and pcb (select an instance in one tool and have the other tool automatically select the corresponding instance) is at the top of my wish list.

Comments?  Pointers to the spot in the code where such hooks would be added?

I think the ability to have these hooks written in scheme and loaded at run time would be very useful. It would make it easier to plug in various other tools without having to recompile.


-Dan


Reply via email to