[email protected] wrote:
> Gary Thorpe <[email protected]> writes:
>> I am having a problem using aggregates to assign signal values. My code is:
>> ...
>> The errors I get when I try to use the aggregate are:
>>
>> (SELECTED, UDQM, LDQM) <= set_value;
> The VHDL type system is getting in your way; try this:
> (SELECTED(7), SELECTED(6), SELECTED(5), SELECTED(4),
> SELECTED(3), SELECTED(2), SELECTED(1), SELECTED(0),
> UDQM, LDQM) <= set_value;
So aggregates must be composed of items with the same type?
> Personally, I would use your other choice:
> SELECTED <= set_value(9 downto 2);
> UDQM <= set_value(1);
> LDQM <= set_value(0);
I am also having trouble with this:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
port(
CS, RAS, CAS, WE: out std_logic;
..
..
..
(CS, RAS, CAS, WE) <= to_stdlogicvector("0010");
..
..
..
(CS, RAS, CAS, WE) <= "0001";
I try two different ways but both fail:
to_stdlogicvector("0010");
^
**Error: vhdlan,501 file.vhd(302):
Expression is ambiguous.
(CS, RAS, CAS, WE) <= "0001";
^
**Error: vhdlan,1021 file.vhd(315):
Can not determine type of right and left hand sides.
What am I doing wrong in this case? I would like to assign values to a group of
signals because together they define a logical operation (the four signals
define an SDRAM command for example). How do I do this properly?
> --
> Brian Ogilvie
> brian dot ogilvie at mathworks dot com
Thanks for the quick reply.