Altera_Forum
Honored Contributor
18 years agoCan't resolve multiple constant drivers?
I'm really confused. I'm trying to make a barrel rotator but Quartus is complaining about my VHDL.
This is the line it points to: SIGNAL alu: STD_LOGIC_VECTOR(15 DOWNTO 0); but I see nothing wrong with that statement. Basically I take my input, do a left and right rotate, and use my mux to decide whether I want to select either of those shifts or no shift at all, and go through the stages. I'm pretty sure I made my mux correctly, but I really am lost now.ARCHITECTURE Structure OF ShiftRegister IS
SIGNAL alu: STD_LOGIC_VECTOR(15 DOWNTO 0);
SIGNAL tempL: STD_LOGIC_VECTOR(15 DOWNTO 0);
SIGNAL tempR: STD_LOGIC_VECTOR(15 DOWNTO 0);
COMPONENT busmux4to1
PORT
(
selectIn: IN STD_LOGIC_VECTOR(1 DOWNTO 0);
a: IN STD_LOGIC_VECTOR(15 DOWNTO 0);
b: IN STD_LOGIC_VECTOR(15 DOWNTO 0);
c: IN STD_LOGIC_VECTOR(15 DOWNTO 0);
d: IN STD_LOGIC_VECTOR(15 DOWNTO 0);
e: OUT STD_LOGIC_VECTOR(15 DOWNTO 0)
);
END COMPONENT;
BEGIN
alu<=aluIn;
--4 rotation
tempL<=alu(11 DOWNTO 0) & alu(15 DOWNTO 12);
tempR<=alu(3 DOWNTO 0) & alu(15 DOWNTO 4);
stage0: busmux4to1 PORT MAP(shiftRight & shift(2),alu,tempL,alu,tempR,alu);
--2 rotation
tempL<=alu(13 DOWNTO 0) & alu(15 DOWNTO 14);
tempR<=alu(1 DOWNTO 0) & alu(15 DOWNTO 2);
stage1: busmux4to1 PORT MAP(shiftRight & shift(1),alu,tempL,alu,tempR,alu);
--1 rotation
tempL<=alu(14 DOWNTO 0) & alu(15);
tempR<=alu(0) & alu(15 DOWNTO 1);
stage2: busmux4to1 PORT MAP(shiftRight & shift(0),alu,tempL,alu,tempR,alu);
aluOut<=alu;
END Structure;