Forum Discussion
13 Replies
- FvM
Super Contributor
Hi,
virtual pin assignment removes a top entity port pint from the actual port list.
You can assign an initial value to the pin to achieve what you want.- sstrell
Super Contributor
No. As stated, setting a top-level signal with the VIRTUAL_PIN assignment ON means that that signal will be routed to a logic "stub" in the FPGA fabric instead of to an I/O pin. This is usually used if you don't yet know what specific I/O pin you want to use, but you don't want the compiler to optimize away the signal because it's not connected to anything. There's even a quick video on this! https://www.youtube.com/watch?v=QET0lC-jdAQ
- Steve-Mowbray-ENL
Occasional Contributor
Hi sstrell -- thanks I watched that video before posting but did not pick up what the port logic value used by the compiled design when running would be -- my questions arising are:
- does default port value method suggested by FvM put a fixed know value for the virtual pin port signal?
- what happens if you set the virtual pin value to OFF instead of ON?
- Steve-Mowbray-ENL
Occasional Contributor
Hi FvM -- ok that makes sense and more specifically implies SV 2009 or later (for default port values) -- I will try
- TingJiangT_Intel
Contributor
Hi there, may I know why you need to know the initial value of the virtual pins. Do you need to do simulation?
Virtual pin usually used to do some optimization in timing and resources usage, so normally it won't be the final version of your design.
- Steve-Mowbray-ENL
Occasional Contributor
top level file is reused between multiple projects on different target hardware -- we can reuse the top level file with virtual pins on lesser hardware so long as the state of the virtual pin is fixed known in the lesser hardware project -- improved hardware will have the pin as physical and the state will come from external source
- TingJiangT_Intel
Contributor
I found the following information which may provide reference:
https://www.intel.com/content/www/us/en/support/programmable/articles/000073765.html