Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] Illegal target for assignment

Status
Not open for further replies.

Akande

Newbie level 1
Joined
Sep 8, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12

Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
 
entity multiplier is
  port(
    clk : in std_logic;
    a   : in std_logic_vector(31 downto 0);
    b   : in std_logic_vector(31 downto 0);
    r   : inout std_logic_vector(31 downto 0);
    s     : inout std_logic_vector(31 downto 0)
     );
end multiplier;
 
 
architecture IMP of multiplier is
 
begin
  process (clk)
  begin
  
    if (clk'event and clk = '1') then
      (r & s)  <= (unsigned(a)* unsigned(b));
        end if;
  end process;
end IMP;





i want to design a 32 bit multiplier and create multiplier ip. maximum bus size is 32 bit so can not use 64bit array for output: how to concatenate two 32 bit output arrays?
when i simulate above code error "Illegal target for assignment" is shown. pleas help me with this
 
Last edited by a moderator:

VHDL doesn't know concatenations on the left-hand side of expression. Use an additional 64-bit wide signal or variable instead, assign respective parts of it to the port signals. In case of variable, assign under clock edge control, otherwise outside the process.
 

VHDL 2008 does allow it, but not in exactly that format:

(r,s) <= (unsigned(a)* unsigned(b));
 
  • Like
Reactions: FvM and verylsi

    verylsi

    Points: 2
    Helpful Answer Positive Rating

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top