a simple addition "+" operator question



Hi,

I have the following code, which can compile without problem in
modelsim (vcom) but when i use vsim, it fails.
------------------------------------
port (
...
x : in std_logic_vector(7 downto 0);
....
);

architecture ...

signal a :std_logic_vector(10 downto 0);
begin
a <= x&"00" + x&"00";
end
-------------------------------------------
when i vcom it, it's okay, but when i run it in modelsim, it said...

# ** Fatal: (vsim-3420) Array lengths do not match. Left is (10 downto
0). Right is (0 to 11).
# Time: 0 ns Iteration: 0 Process: ...
--------------------------------------------
it's very strange, if I do a <= x&"000". It is okay.
but when i use a <= x&"00" + x&"00". it is not...
I can't understand, as i think both are equivalent....

carson

.



Relevant Pages

  • Re: a simple addition "+" operator question
    ... you must do another concatenation on the left with 0 and xfor signed. ... when i vcom it, it's okay, but when i run it in modelsim, it said... ...
    (comp.lang.vhdl)
  • Re: Running testbench simulation problem with Quartus II 4.2 and Modelsim 6.0d
    ... Unfortunately I am not very good in using Modelsim as a standalone program. ... If this doesn't give you the vcom usage, ... Once vcom runs from the shell, ...
    (comp.lang.vhdl)
  • uart.vhd compile problems
    ... > I'm trying to compile your uart.vhd code ... I'm new to VHDL simulation and ModelSim in general. ... vcom uart.vhd test_uart.vhd ...
    (comp.lang.vhdl)
  • Re: Modelsim and Vhdl
    ... that offers training courses in MODELSIM or VHDL? ... http://www.google.com/search?q=vhdl+synthesis+testbench+tutorial Focus on learning VHDL for synthesis and testbench. ... vcom test_my_design.vhd ...
    (comp.lang.vhdl)
  • Re: Virus vs Port Scan Help
    ... If you don't know how to ignore a posting, ... If I try to manually block services & svchost from internet access via Vcom Firewall I'll see that both will start up multiple instances in the Vcom Net Defense Firewall list of applications trying to access the internet. ... Involved port numbers are all over the place, but seem to start off with port 80. ...
    (microsoft.public.windowsxp.general)