Hi Rob,
Have you tried:
(this_q, that_q, the_other_q) <= (this, that, the_other) when
rising_edge(clk);
I haven't tried it and am concerned there may be a type ambiguity
problem.
In general, if I wanted to block things together like this,
I would use the array as the input and define index constants
to extract the values when necessary:
package CritterPkg is
constant THIS_INDEX : integer := 0 ;
constant THAT_INDEX : integer := THIS + 1 ;
constant THE_OTHER_INDEX : integer := THAT + 1 ;
subtype critter_type is std_logic_vector (THE_OTHER_INDEX downto
THIS_INDEX) ;
end package CritterPkg ;
entity Critter is
Port (
Critter_In : in critter_type ;
Critter_Out : out critter_type ;
clk : in std_logic
);
end entity Critter;
architecture Behavioural of Critter is
signal this_int : std_logic ;
begin
Critter_out <= Critter_in when rising_edge(clk);
-- to reference individual values:
this_int <= Critter_in(THIS_INDEX) ;
end architecture Behavioural;
At the port map:
U_Critter : critter
port map (
Critter_in(THIS_INDEX) => this,
Critter_in(THAT_INDEX) => that,
Critter_in(THE_OTHER_INDEX) => the_other,
Critter_out(THIS_INDEX) => this_q,
Critter_out(THAT_INDEX) => that_q,
Critter_out(THE_OTHER_INDEX) => the_other_q,
Clk => Clk
) ;
Record fields would also work well if your synthesis tool does
not complain about records.
On that note, does anyone know if the following is portable
(particularly concerned about some of the ASIC tools):
outputs <= inputs when rising_edge(clk);
Cheers,
Jim
|