Generate for multiple pins component

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

cross mob
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I tried hard to understand the "Component Author Guide" but some things are not quite clear to me:

   

When I want to design a component that uses several I/O pins and the number of pins should be parameterized in the configuration dialog

   

1st. How to generate in Verilog (or is there a better/easier way?) the pins

   

2nd. How to set the properties of the pins (even if they are all the same) 

   

 

   

Regards, Bob

0 Likes
2 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The only hint I can see is part 3.6.3 - 'advanced shape properties'. It says there is a 'visibility expression' for terminals, which define whether a certain terminal is visible or not. This means you would need a component property for the number of terminals needed, and then have for each terminal a test whether it is included or not.

   

You may want to look into the CyControlReg_v1_70 folder of your Creator installation - it contains the verilog code for the control reg, which shows how to handle a variable number of terminals. Judging from what I can read in CyControlReg_v1_70.cysym, it works as described above (with the addition of checking for the need to display as a bus).

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Oh, make that 'part 3.6.2' - stupid keyboard 🙂

0 Likes