cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

New Contributor II
        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?   
0 Likes
Reply
1 Solution
Esteemed Contributor II

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

View solution in original post

0 Likes
Reply
4 Replies
Esteemed Contributor II

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

View solution in original post

0 Likes
Reply
Anonymous
Not applicable

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`

0 Likes
Reply
Esteemed Contributor II

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

   

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

   

 

   

Bob

0 Likes
Reply
New Contributor II
        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/   
0 Likes
Reply