Quantcast
Channel: Cadence PCB Design Forum
Viewing all articles
Browse latest Browse all 5525

How to reuse hierarchical block in ORCAD-PSPICE and modify subparam for each?

$
0
0

I have implemented a non-linear resistor via a heirarchical block using analog behavioral modelling. I added a subparam property named Rsheet which affects the resistance.

 

I have simulated this nonlinear resistor hierarchy block and it works  perfectly well. However, I need to use multiple copies of this , each with a different subparam  Rsheet value. I tried copying the hierarchy block then pasting it mutiple times. The problem is that changing the Rsheet value for each copy does not work. I have verified by pspice simulation that each block still uses the Rsheet subparam setting of the original hierarchical block because each block behaves exactly the same. 

I noticed that the resistor and VCVS(E) have the same reference, R1 and E1 for all copies. So i read this thread: https://community.cadence.com/cadence_technology_forums/f/pcb-design/13224/how-to-reuse-the-hierarchical-block  and followed the instructions of  User:oldmouldy. I went to tools>annotation and selected unconditional reference update.  (I used update occurrences instead of instances). After doing these, the references changed to R1, R2... and E1, E2.. However, the subparam still has the same reference=1 for all copies. Changing the rsheet subparam value for each copy still doesn't work. In fact, even if the references of R and E are now correct, and even when setting R1=1k and R2=2k and removing the VCVS, both blocks still behave exactly like the 1k resistor. It's like  the copies use the original setting despite all editing I've done in the properties and annotation.

My workaround was to create an entirely new schematic just for the same circuit with a slightly different parameter and it now works perfectly. But I really want to be able to edit the subparams of each hierarchy block copy independent from each other. Thanks. Any help will be greatly appreciated.

Related question: is there an easier way to modify the behavior of a resistor... i know the transistor models can be edited by right clicking and choosing edit spice model.. is there a variable resistor subckt model available in pspice..if there are ABM implementations of controlled sources, the next best thing would be for resistors and capacitors.


Viewing all articles
Browse latest Browse all 5525

Trending Articles