16-bit ALU from 1- bit ALU

OP (Company: mitsos) #5415309
Rate this post
• ▲ useful
▼ not useful
i want to make a 16 bit alu with ripple carry adder using 1 bit alu as 
component. The 1 bit alu must perform addition, subtraction, and, or, 
xor, nor. It contains 3 multiplexers: ainvert, binvert and operation. I 
am trying to create the 16 bit alu but many errors occur and i dont 
really know what to do to fix them... Can someone explain what goes 
wrong?
Attached files:
Guest #5415966
Rate this post
• ▲ useful
▼ not useful
1
Start time: 09:27:37 on May 08,2018
2
vcom ALU1.vhd
3
Model Technology ModelSim SE-64 vcom 10.6c Compiler 2017.07 Jul 26 2017
4
-- Loading package STANDARD
5
-- Loading package TEXTIO
6
-- Loading package std_logic_1164
7
-- Compiling entity fulladd
8
-- Compiling architecture logic of fulladd
9
-- Compiling entity substraction
10
-- Compiling architecture sub of substraction
11
-- Compiling entity ALU1
12
-- Compiling architecture Structural of ALU1
13
-- Compiling entity Ripple_Adder
14
-- Compiling architecture Structural of Ripple_Adder
15
###### ALU1.vhd(109): A1: ALU1 port map( A(0), B(0), Cin, S(0), c1);
16
** Error: ALU1.vhd(109): Cannot resolve indexed name (type ieee.std_logic_1164.STD_ULOGIC) as type ieee.std_logic_1164.STD_LOGIC_VECTOR.
17
** Error: ALU1.vhd(109): Signal "c1" is type ieee.std_logic_1164.STD_LOGIC; expecting type std.STANDARD.BIT.
18
** Error: ALU1.vhd(109): (vcom-1035) Formal port "Aiv" has OPEN or no actual associated with it.
19
...
20
...
21
...
22
** Error: ALU1.vhd(126): VHDL Compiler exiting
23
End time: 09:27:37 on May 08,2018, Elapsed time: 0:00:00
24
Errors: 49, Warnings: 0

Line 109 is:
1
A1: ALU1 port map( A(0), B(0), Cin, S(0), c1);

The definition of ALU1 is:
1
component ALU1 is
2
    Port ( Oper:in STD_LOGIC_VECTOR(2 DOWNTO 0);
3
       a, b, Cin: in STD_LOGIC;
4
       Biv ,Aiv: in BIT;
5
        R, Cout: out STD_LOGIC);
6
end component;

So the compiler expect 8 arguments, but only get 5.
And he complains the type mismatch.

Duke

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.