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.

please help me in the following vhdl program

Status
Not open for further replies.

KAVINKUMAR_A

Newbie level 3
Joined
Jan 17, 2014
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
23
\\\ prefix of slice name must be an array
\\\ vhdl compiler existing
***** i got this two error . i dont know how to solve it.
***** i want to multiply an 8 bit number with 0.1(decimal number)

please help me

Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
library ieee; 
use ieee.std_logic_1164.all; 
use ieee.std_logic_unsigned.all;
entity mult is  
  port(A : in std_logic_vector(7 downto 0);  
      B : in std_logic_vector(7 downto 0);  
      RES : out std_logic_vector(15 downto 0));  
end mult;  
architecture archi of mult is
signal y : std_logic_vector(7 downto 0);
signal c : real;
 
  begin 
    
     y <=(CONV_INTEGER(c(7 downto 0))); 
    RES <= A * y;  
end archi; 
 
 
data <= mem_data(CONV_INTEGER(addr(15 downto 0)))

 
Last edited by a moderator:

A real type is not a bit wise type. It is also not suitable for synthesisable designs. So just forget about real types now.

Read up on fixdd point.
 
sir .. i cant get your points.. i want to multiply an eight bit number with a decimal value 0.1 ... how can i multiply.. how to alter the program to get a desirable output??
 

if you really want to use floating point, you will have to use the floating point cores from your vendor.

But I highly suggest you read up on fixed point notation. It is essentially an integer multiplcation with an offset.

Either way, you cannot use the real type in VHDL for synthesisable designs.
 
  • Like
Reactions: KAVINKUMAR_A

    V

    Points: 2
    Helpful Answer Positive Rating

    KAVINKUMAR_A

    Points: 2
    Helpful Answer Positive Rating
sir.. i studied about fixed points . while i m using the fixed point packages in altera quartus 2 modelsim 9.1, there was an error.. how to overcome from this error??

\\library ieee_proposed not found

i searched through online but i cant get cleared from the above error..

help me sir
 

you need to map the library into modelsim. You need to make sure the library is compiled in modelsim first, and then you can map it either via the gui, or with the command:

vmap ieee_proposed /<path to ieee_proposed>/

But if you get a newer version of modelsim, this package is included as part of the ieee library. The fixed point packages are part of the VHDL 2008 standard, and can be included like:

use ieee.fixed_pkg.all;
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top