You are here

Set symbol terminal width with parameter | Cypress Semiconductor

Set symbol terminal width with parameter

Summary: 2 Replies, Latest post by odissey1 on 11 Jun 2015 04:07 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
urb's picture
1 post

I am trying to create a component with a variable width, similar to the 'Basic Counter' in the Utility subfolder of the Cypress library. This component allows one to change the counter width by changing the 'Widch' parameter of the component instance. When this parameter value is changed the corresponding counter ouput bus on the schematic symbol is updated to reflect the new bus size.

How can I implement this functionality on a symbol that I create? I tried using the following steps.
1. Add Component Item using Symbol Wizard
2. Create a symbol named 'Foo' and add an input terminal named 'clock' and an output terminal named 'count'
3. Right-click on blank part of symbol Foo sheet, then select 'Symbol Parameters...'
4. Add parameter 'Size' of type int and set value to 4. Close Parameters Definition dialog.
5. Double-click 'count' terminal to edit.
6. This is where I want to set the range of the 'count' symbol terminal to be 'Size-1:0'. However, I have no way to use an expression to set either the left or right index.

The Warp verilog reference gives the following example. I tried to generate a symbol from the following code but was not successful.

Does anyone know how to create symbols with terminals who's width changes with a parameter value???

KeerthiRocks's picture
Cypress Employee
77 posts

Its modified in the customizer file "custom.cs". You can import the component from the Basic Counter compoennt library and check the implementaion.

Or if you just want to switch b/w 2/3 known widths you can check the status register implemetation.



user_342122993's picture
527 posts

 You can take a look on variable width bus implementation in this custom component


Log in to post new comments.