Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > handling the formals parameter

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



handling the formals parameter
Moderator:
JFMD

Post Reply
Follow this topic



handling the formals parameter

iskw posted on 07 Feb 2013 5:38 PM PST
Member
4 Forum Posts
hi to all. I am trying to make custom components. I read PSoC Creator Component Author Guide(http://www.cypress.com/?docID=41594). But I don't know how to use formals parameter in API.c Author Guide says "Using parameters allows a Verilog instance to be synthesized based on the specific requirement of a component instance. " at page 125. Is there method to use formals parameter in API.c?


Re: handling the formals parameter

Bob Marlowe posted on 08 Feb 2013 12:19 AM PST
Top Contributor
1768 Forum Posts

On page 63 in Component Author Guide" is a (short) explanation in how to refer to a component's parameters.

It folloows the syntax of

`<@ParameterName>`  (do not care for the colour, its a forum sw bug) 

which will be expanded to the parameter's value at the time the c-code gets generated.

 

Just to satisfy my curiosity: What kind of component are you building?

 

Happy coding

Bob



Re: handling the formals parameter

PSoC Rocks posted on 08 Feb 2013 03:05 AM PST
Top Contributor
128 Forum Posts

When you enter the parameters in the Component symbol file, you can get that in your header file as a macro.

#define `$INSTANCE_NAME`_ParameterName `$ParameterName`



Re: handling the formals parameter

Bob Marlowe posted on 08 Feb 2013 05:42 AM PST
Top Contributor
1768 Forum Posts

Sorry, forget the "<" and ">" in my last post. I mis-read something.

To use "@" or "$" are equivalent.

 

Bob



Re: handling the formals parameter

iskw posted on 08 Feb 2013 08:11 AM PST
Member
4 Forum Posts
Thank you Bob and Ken responded. I missed the page. I was able to understand how to use the parameter. Dear Bob I'm making a calculator like Free42 using the keypad. Keypad http://wvshare.com/product/A_D-Keypad.htm Free42 http://thomasokken.com/free42/




ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20