NewANADOLOGIC Hardware Academy is live: 240 free, AI-graded FPGA & SoC questions.Start learning

FPGA & VHDL KnowHow Series1 min read

FPGA Anadologic

๐๐ฎ๐ž๐ฌ๐ญ๐ข๐จ๐ง: Can we delete or skip any port in instantiation of entities in ๐•๐‡๐ƒ๐‹?

๐€๐ง๐ฌ๐ฐ๐ž๐ซ: If the port you do not want to use is an ๐จ๐ฎ๐ญ๐ฉ๐ฎ๐ญ port, then it is OK to remove this port from instantiation or connect the port with โ€œ๐จ๐ฉ๐ž๐งโ€ keyword of VHDL:

๐‘‡๐ธ๐‘†๐‘‡_๐ผ๐‘๐‘†๐‘‡_๐ผ : ๐‘’๐‘›๐‘ก๐‘–๐‘ก๐‘ฆ ๐‘ค๐‘œ๐‘Ÿ๐‘˜.๐‘ก๐‘’๐‘ ๐‘ก_๐‘–๐‘›๐‘ ๐‘ก(๐ต๐‘’โ„Ž๐‘Ž๐‘ฃ๐‘–๐‘œ๐‘Ÿ๐‘Ž๐‘™) ๐‘๐‘œ๐‘Ÿ๐‘ก ๐‘š๐‘Ž๐‘ ( ๐‘๐‘™๐‘˜ย ย ย ย => ๐‘๐‘™๐‘˜ย ย ย , ๐‘Ÿ๐‘ ๐‘กย ย ย ย => ๐‘Ÿ๐‘ ๐‘กย ย ย , ๐‘›๐‘ข๐‘š1_๐‘–ย ย ย => ๐‘›๐‘ข๐‘š1_๐‘–ย ย , ๐‘›๐‘ข๐‘š2_๐‘–ย ย ย => ๐‘›๐‘ข๐‘š2_๐‘–ย ย , โ€“๐‘›๐‘ข๐‘š_๐‘ ๐‘ข๐‘_๐‘œย => ๐‘œ๐‘๐‘’๐‘›, ๐‘›๐‘ข๐‘š_๐‘Ž๐‘‘๐‘‘_๐‘œย => ๐‘›๐‘ข๐‘š_๐‘Ž๐‘‘๐‘‘_๐‘œ );

But, if the port you do not want to use is an ๐ข๐ง๐ฉ๐ฎ๐ญ port, then Vivado gives you an error. So, you have to connect some signal to an input port even a constant is OK.

For example, if we delete rst input port in the instantiation, then we get this error from Vivado:

๐‘‡๐ธ๐‘†๐‘‡_๐ผ๐‘๐‘†๐‘‡_๐ผ : ๐‘’๐‘›๐‘ก๐‘–๐‘ก๐‘ฆ ๐‘ค๐‘œ๐‘Ÿ๐‘˜.๐‘ก๐‘’๐‘ ๐‘ก_๐‘–๐‘›๐‘ ๐‘ก(๐ต๐‘’โ„Ž๐‘Ž๐‘ฃ๐‘–๐‘œ๐‘Ÿ๐‘Ž๐‘™) ๐‘๐‘œ๐‘Ÿ๐‘ก ๐‘š๐‘Ž๐‘ ( ๐‘๐‘™๐‘˜ย ย ย ย => ๐‘๐‘™๐‘˜ย ย ย , โ€” ๐‘Ÿ๐‘ ๐‘กย ย ย ย => ๐‘Ÿ๐‘ ๐‘กย ย ย , ๐‘›๐‘ข๐‘š1_๐‘–ย ย ย => ๐‘›๐‘ข๐‘š1_๐‘–ย ย , ๐‘›๐‘ข๐‘š2_๐‘–ย ย ย => ๐‘›๐‘ข๐‘š2_๐‘–ย ย , โ€“๐‘›๐‘ข๐‘š_๐‘ ๐‘ข๐‘_๐‘œย => ๐‘œ๐‘๐‘’๐‘›, ๐‘›๐‘ข๐‘š_๐‘Ž๐‘‘๐‘‘_๐‘œย => ๐‘›๐‘ข๐‘š_๐‘Ž๐‘‘๐‘‘_๐‘œ );

[๐‘†๐‘ฆ๐‘›๐‘กโ„Ž 8-2029] ๐‘“๐‘œ๐‘Ÿ๐‘š๐‘Ž๐‘™ ๐‘Ÿ๐‘ ๐‘ก โ„Ž๐‘Ž๐‘  ๐‘›๐‘œ ๐‘Ž๐‘๐‘ก๐‘ข๐‘Ž๐‘™ ๐‘œ๐‘Ÿ ๐‘‘๐‘’๐‘“๐‘Ž๐‘ข๐‘™๐‘ก ๐‘ฃ๐‘Ž๐‘™๐‘ข๐‘’

I prefer to keep the output port and use โ€œ๐จ๐ฉ๐ž๐งโ€ keyword when I wonโ€™t plan to use that output port.

What about you? Please share your thoughts in comment section.

โ€œ๐‘บ๐’‰๐’‚๐’“๐’Š๐’๐’ˆ ๐’Œ๐’๐’๐’˜๐’๐’†๐’…๐’ˆ๐’† ๐’Š๐’” ๐’•๐’‰๐’† ๐’Ž๐’๐’”๐’• ๐’†๐’‡๐’‡๐’Š๐’„๐’Š๐’†๐’๐’• ๐’๐’†๐’‚๐’“๐’๐’Š๐’๐’ˆ ๐’Ž๐’†๐’•๐’‰๐’๐’…โ€

โ† All posts