Bonjour,

J'essaye de multiplier un std_logic_vector par un nombre négatif :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
 
entity mul_main is
    Port ( a :in  STD_LOGIC_VECTOR( 0 to 7);
			  clk: in  STD_LOGIC;
           c :out STD_LOGIC_VECTOR(0 to 15)
			  );
end mul_main;
 
architecture Behavioral of mul_main is
 
begin
p: process(clk)
begin
if (clk' event and clk='1') then
c <= (-2)* a;
end if;
end process;
 
end Behavioral;
Mais j'obtiens cette erreur : * can not have such operands in this contex

Pouvez-vous m'aider à régler ce problème ?
Merci d'avance.