
๐๐ฎ๐๐ฌ๐ญ๐ข๐จ๐ง: What happens if you assign multiple times the same value concurrently to a signal in ๐๐๐๐?
๐๐ง๐ฌ๐ฐ๐๐ซ: If you assign two or more different values to a signal concurrently in VHDL this is called as โmulti-driven netโ such as:
๐_๐ <= ๐ ๐ก๐_๐๐๐๐๐_๐ฃ๐๐๐ก๐๐(๐ข๐๐ ๐๐๐๐๐(๐_๐) + ๐ข๐๐ ๐๐๐๐๐(๐_๐)); ๐_๐ <= ๐ ๐ก๐_๐๐๐๐๐_๐ฃ๐๐๐ก๐๐(๐ข๐๐ ๐๐๐๐๐(๐_๐) โ ๐ข๐๐ ๐๐๐๐๐(๐_๐));
This is not allowed and you will get this critical warning from Vivado:
[๐๐ฆ๐๐กโ 8-6859] ๐๐ข๐๐ก๐-๐๐๐๐ฃ๐๐ ๐๐๐ก ๐๐ ๐๐๐ ๐๐๐๐๐๐ ๐ค๐๐กโ 1๐ ๐ก ๐๐๐๐ฃ๐๐ ๐๐๐ โ๐๐๐๐๐๐_๐๐๐๐ ๐กโ ๐๐๐ 2๐๐ ๐๐๐๐ฃ๐๐ ๐๐๐ โ๐๐๐๐๐๐_๐ ๐๐๐๐๐โ
But if you assign the same value to a signal concurrently multiple time such as:
๐_๐ <= ๐ ๐ก๐_๐๐๐๐๐_๐ฃ๐๐๐ก๐๐(๐ข๐๐ ๐๐๐๐๐(๐_๐) + ๐ข๐๐ ๐๐๐๐๐(๐_๐)); ๐_๐ <= ๐ ๐ก๐_๐๐๐๐๐_๐ฃ๐๐๐ก๐๐(๐ข๐๐ ๐๐๐๐๐(๐_๐) + ๐ข๐๐ ๐๐๐๐๐(๐_๐));
Then synth tool such as Xilinx Vivado understands these two lines are actually the same and behaves them like there is one single assignment. Gives no warning at all.
In my opinion, it would be good to give an error for multi-driven net and at least give a warning about the second condition.
Please share your thoughts in comment section.
โ๐บ๐๐๐๐๐๐ ๐๐๐๐๐๐๐ ๐๐ ๐๐ ๐๐๐ ๐๐๐๐ ๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐ โ
