Is it possible for a component to have different symbols for different architectures?

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

cross mob
DaGr_294516
Level 3
Level 3
10 sign-ins 10 questions asked First solution authored

I'm trying to make a custom component that has to work on PSoC 4 and 5. I need different terminals for the two versions.

I can have a different schematic for 4 and 5, but as far as I can tell there is no way to have different symbols/control symbol configurations... Is there a way to work around this?

Thanks in advance!

Dan

pastedImage_0.png

0 Likes
1 Solution

Dan,

   So there are a couple of different ways you can get at this.  First, if you define a super set symbol, you can use visibility expressions on the terminals.  Something like:

"PSoC5" eq GetDeviceFamilyName()

   Remember you still need to set default expressions and the implementing schematic needs to have the terminal.

   Option 2 is a little cleaner in my opinion.  You can create a software only component (the implementation of your APIs) and then use that component as a base for a separate PSoC 4 and PSoC 5 implementation component.  Use macros to redefine the APIs in the top level component as calls to the base component.  I know it sounds complex but it really is simple to do.

   Scott

View solution in original post

4 Replies
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Daniel,

You are correct that in PSoC creator we can have different schematics for a custom component corresponding to the device (say PSoC 4 or PSoC 5LP). This is because component schematic can be specific to a device.

But, the component symbol is more generic. It is not specific to a particular device as shown in the image below:

pastedImage_0.png

Is it possible for you create two components with different names that will be specific to PSoC 4 and PSoC 5LP. In that case you can have separate schematic and separate symbols for both the components (say component01 for PSoC 4 and component02 for PSoC 5LP)?

Best Regards

Ekta

0 Likes

Is there really no way to configure the symbol?

It would also be nice for the two versions of the component to share the same API files, otherwise there will be a lot of duplication. The two versions are very similar...

Thanks,

Dan

0 Likes

Dan,

   So there are a couple of different ways you can get at this.  First, if you define a super set symbol, you can use visibility expressions on the terminals.  Something like:

"PSoC5" eq GetDeviceFamilyName()

   Remember you still need to set default expressions and the implementing schematic needs to have the terminal.

   Option 2 is a little cleaner in my opinion.  You can create a software only component (the implementation of your APIs) and then use that component as a base for a separate PSoC 4 and PSoC 5 implementation component.  Use macros to redefine the APIs in the top level component as calls to the base component.  I know it sounds complex but it really is simple to do.

   Scott

Hi Scott,

Thanks very much for your response.

If you define visibility expressions for terminals, does that disable them or just hide them? I.E. would they still need to be connected to something internally, even when not shown?

Presumably the second solution would still require separate schematics for the two versions, but that would be ok... Is there an example somewhere of a simple implementation like this? No worries if not, I'm sure I can work it out.

I have had to move on from this issue temporarily but I'll have another go in a week or two.

Thanks again

Dan

0 Likes