Back to Forums
6 posts / 0 new
Last post
#1 Apr 6, 2017
P-Dizzle
Offline
Last seen: 1 year 1 month ago
Joined: 2017-01-12 08:05

Changing parameters of hierarchical blocks to different values

Hi together,

I have the following simplified scenario:
I created a schematic with an parallel resistor - capacitor combination which I will use as a hierarchical block within my root schematic.
In my root schematic I then created a hierarchical block calles "RC1" containing this RC branch. I then copied this block to get a second RC branch, now called "RC2".


RC_src schematic


Root_schematic

Now I would like to change the parameters of the hierarchical blocks to two different values. Lets say "RC1" should be 5Ohm||1nF and "RC2" should be 10Ohm||2nF. Is there a possible way to do this being in the root schematic?
I kind of imagined something like assigning the values {Rval} and {Cval} to the components and then defining in a PARAM-block:
RC1.Rval = ...
RC1.Cval = ...
RC2.Rval = ...
RC2.Cval = ...
Unfortunately, this is not working. I can only define in the PARAM-block
Rval = ...
Cval = ...
But then, both the blocks take the same values.

So is there an elegant way to assign different component-values to both the hierarchical blocks?

This is just a strongly simplified example. In my real model I am using a lot of the same (with the same structure) hierarchical blocks with a lot of components each. But the point is, that I need varying component-values for all the blocks. I have been searching for hours now but couldn't find what I need...

If this is not possible, is there a way to assign different values to RC1 and RC2 within the hierarchical block?

Thank you very much for your help.

With best regards
P-Dizzle 

Thu, 2017-04-06 08:20
RobertoGb
RobertoGb's picture
Offline
Last seen: 5 years 9 months ago
Joined: 2016-05-24 03:10

Hi, 

You could use the SUBPARAMS block:

Then you have to create two new properties in each Hierarchical Block with tne name Rval and Cval and you can replicate the hierarchical Blocks using different values in each of them.  

I hope it helps.

Regards

 

 

Thu, 2017-04-06 10:52 (Reply to #2)
P-Dizzle
Offline
Last seen: 1 year 1 month ago
Joined: 2017-01-12 08:05

Hi Roberto,

first of all thank you very much for your reply. This is working very well. :)

Now I have one more question... is it possible to somehow add those properties of the hierarchical blocks to a PARAM block in the root schematic? The background is, that I would like to do a parameter sweep, changing the different values of the different hierarchilcal blocks (so e.g. first changing the R value of RC1 and in a second simulation changing the value R of RC2).

Thanks again.
Regards
P-Dizzle

Thu, 2017-04-20 04:22
alok
Offline
Last seen: 1 year 2 weeks ago
Joined: 2016-05-10 23:49

Yes, You should be able to declare a global variable using PARAM block and use this variable to define the value of parameter on one of the instance, the one you would like to sweep.

 


 

Thu, 2017-04-20 04:23
alok
Offline
Last seen: 1 year 2 weeks ago
Joined: 2016-05-10 23:49

forum

Wed, 2023-09-20 21:56
endharmful
Offline
Last seen: 6 months 8 hours ago
Joined: 2023-01-13 04:32

You can use PARAM block to declare a global variable and utilize it to define the parameter value on the instance you want to sweep.

 

geometry dash world

 

Download PSpice and try it for free! Download Free Trial
Cadence