LTSPICE is offering very nice possibility to incorporate repeatable portions of schematic into simulation, that is not available in many other SPICE simulation programs- hierarchical blocks. Hierarchical blocks represent reusable portions of schematic, visible on higher level of schematic as a symbol. While LTSPICE is missing multipage schematic editor, hierarchical blocks are offering another simple way of creating complex schematics.
Hierarchical blocks have very much in common with subcircuits. The main difference is that hierarchical block in LTSPICE is schematic, not the netlist in the library.
The other difference is that you can pass different parameter values for different instances of the part, using the same subcircuit. You can pass parameters to hierarchical blocks also, but they would be the same for all different instances that you may have on main schematic.
One big advantage of hierarchical block is simplicity of probing internal nodes. Click on hierarchical block symbol opening schematic of hierarchical block, and probe any point of it’s schematic the same way as in main schematic. Just enable “Save Subcircuit Node Voltages” and ”Save Subcircuit Device Currents” in Tools –> Control Panel –> Save Defaults tab of control panel menu.
To create a hierarchical block :
To create a symbol, representing hierarchical block:
Important: Name of schematic, representing hierarchical block and name of it’s symbol should be the same. Just extensions are different. Otherwise, LTSPICE would not be able to establish relationships between them.
You are ready to use your new hierarchical block. Don’t forget to create a simple test-bench for your newly created hierarchical block to make sure it operate’s properly.
I made a couple of pictures illustrating creation of hierarchical block. I will use schematic of LM317, that I created by converting LM317 SPICE subcircuit model in this example. You can download example files LM317HB.
1. Create schematic of hierarchical block.
2. Label all nodes that should have outside visibility.
3. Create a symbol for hierarchical block.
4. Set symbol type as a block and save it withe same name as schematic it represents (just different extension).
Just wish to say your article is as astonishing. The clarity on your submit is simply cool and i can think you are an expert in this subject. Well together with your permission let me to clutch your RSS feed to keep up to date with approaching post. Thank you one million and please keep up the enjoyable work.
I’m finding this information for 2 hours. I just found it. Thank you for a detail information about LTspice. I’m likely to sleep well. Good luck^^
Excellent post at Hierarchical Blocks in LTSPICE | Audio Perfection. I was checking constantly this blog and I’m impressed! Very useful information specifically the last part
I care for such info much. I was looking for this particular info for a very long time. Thank you and good luck.
Hello,
Is it possible to pass parameters to hierarchical block (different instances)?
How?