EmbDev.net

Forum: FPGA, VHDL & Verilog 16-bit ALU from 1- bit ALU


von Mitsos M. (Company: mitsos) (mitsos)


Attached files:

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?

: Edited by User
von Duke Scarring (Guest)


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

von mitsos (Guest)


Rate this post
useful
not useful
Yes i saw this too and i fixed it. Having fixed this does the existing 
code perform all the functions of an 16-bit alu?
thank you for your time!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.