Configuration expressions - define a compile-time constant?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RoRo_3281831
Level 1
Level 1
10 questions asked 10 sign-ins 5 questions asked

When configuring an item on the PSoC schematic in PSoC Creator, many of the parameters used to configure the item have a "f(x)" button off to the right that seems to be there to allow you to define the value based on other parameters.

Clicking on it brings up a box that allows one to enter an expression, and on the right side there is tree full of sources from which one could pull various constants and operators.  For example, I can look at the device information and use that somehow.

However, what I'd really like to do is set a constant parameter somewhere (i.e. perhaps in project settings somewhere) and use that to configure many components.  For example, I often end up changing the "Width" parameter on digital components based on whether I want to work with 8 bit, 12 bit, 16 bit values or whatever.  I end up having to hunt around my entire schematic and find every digital component and constant and set them all to the same constant value. It seems like I should be somehow able to use this "expression" functionality to set that value in one place and have my design updated.

Is such a thing possible?  I've tried to find documentation on how to use these expressions, but I was only able to find this:  https://www.cypress.com/file/37371/download

That document only described basic expression syntax, and is written for PSoC Express, not PSoC Creator.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

RoRo,

One way of sharing a parameter (e.g. BusWidth) across several components on the schematic is to encapsulate that entire schematic into a new component. For example, there is a Control_Reg and Status_Reg on the schematic. The top component should have parameter BusWidth. Inside the component, add a Schematic, copy-paste Control_Reg, Status_Reg (and all associated connections), and pass them $BusWidth parameter in their configuration dialogs.

Some Creator components (created with C# customizer, like Control- and Status- Registers) have their parameters buried behind the configuration screen. Read this explanation provided by Bob Marlow, how to pass $BusWidth to them (memo attached).

Re: Component creation. Part 1 of ?

/odissey1

View solution in original post

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

RoRo,

One way of sharing a parameter (e.g. BusWidth) across several components on the schematic is to encapsulate that entire schematic into a new component. For example, there is a Control_Reg and Status_Reg on the schematic. The top component should have parameter BusWidth. Inside the component, add a Schematic, copy-paste Control_Reg, Status_Reg (and all associated connections), and pass them $BusWidth parameter in their configuration dialogs.

Some Creator components (created with C# customizer, like Control- and Status- Registers) have their parameters buried behind the configuration screen. Read this explanation provided by Bob Marlow, how to pass $BusWidth to them (memo attached).

Re: Component creation. Part 1 of ?

/odissey1

0 Likes