W
Weng Tianxiang
Guest
OK, at last Jim and JaI admit my equation is right.
time, and they can be all false, so it /= 'XOR'.
work. It is an compiler error. If n is a dynamic signal like in my
case, you must use n as in a condition for 'if' statement. If you
don't believe, try to compile it using any VHDL compiler.
Second segment of equations is right. Thank you, JaI!!! It clearly
demonstrates how hard from current VHDL structure to get both right
and efficient code. You must rewrite total code to get efficient
code!!! It is a big problem when you have a big project. It is real,
not virtual. That is why 'I hate VHDL': it is like you bought a set of
sockets to start your business and found that 3/8" socket wasn't there
and the manufacturers say it is your problem, you can deal with it
using 1/2", why do we need to manufacture a 3/8" socket especially for
your purpose?!
That is why 'orif' is so useful in the situation: first you write
correct code, then change 'elsif' to 'orif', you get your most
efficient code without any other code and structure change.
Tomorrow I will 'attack' Achilles heel of Jim's proposal assert() to
resolve mutually exclusive relations.
Weng
Mutual exclusive relation means only one of them can be true at anyIf I take the following example:
A1 <= A and B;
A2 <= C and B;
with A and C mutually exclusive. How could you pretend that A1 and A2
are mutually exclusive ?
Mutual exclusive is these both signals are never equal. It is express in
logic by the xor function (exclusive or).
time, and they can be all false, so it /= 'XOR'.
Above equations are wrong. n must be a constant to let compiler toprocess (DIMMNumberClear, nC_BE_R0, n, bad_pci_type)
begin
if (DIMMNumberClear) then
DIMMNumber(4 downto 0) <= (others=>'0');
elsif (bad_pci_type = '0') then
if (AD_R0(28+n*32) = '1') then
DIMMNumber (4 downto 0) <= "10000";
else
DIMMNumber (4 downto 0) <= AD_R0(28+n*32 downto 24+n*32);
endif;
endif;
end process;
work. It is an compiler error. If n is a dynamic signal like in my
case, you must use n as in a condition for 'if' statement. If you
don't believe, try to compile it using any VHDL compiler.
Second segment of equations is right. Thank you, JaI!!! It clearly
demonstrates how hard from current VHDL structure to get both right
and efficient code. You must rewrite total code to get efficient
code!!! It is a big problem when you have a big project. It is real,
not virtual. That is why 'I hate VHDL': it is like you bought a set of
sockets to start your business and found that 3/8" socket wasn't there
and the manufacturers say it is your problem, you can deal with it
using 1/2", why do we need to manufacture a 3/8" socket especially for
your purpose?!
That is why 'orif' is so useful in the situation: first you write
correct code, then change 'elsif' to 'orif', you get your most
efficient code without any other code and structure change.
Tomorrow I will 'attack' Achilles heel of Jim's proposal assert() to
resolve mutually exclusive relations.
Weng