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.

Can't this vhdl program be viewed in simulation?

Status
Not open for further replies.

Anwesa Roy

Member level 2
Joined
Feb 24, 2014
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
532
Cant this vhdl program be viewed in simulation?

We are trying to use floating point numbers in our code(to represent real numbers). The code is synthesised properly. However when we try to simulate, error is shown that: compile step failed with errors. The question is cant we view the signal example in the simulation window(Isnt simulation of code possible if we use floating point numbers in vhdl code)?How can we view the simulation for this code?

The idea is taken from the site given below:
https://vhdlguru.blogspot.in/2010/03/fixed-point-operations-in-vhdl-tutorial.html

The code is given below:

Code:
----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date: 08/01/2016 03:49:02 PM
-- Design Name: 
-- Module Name: fixed_point1 - Behavioral
-- Project Name: 
-- Target Devices: 
-- Tool Versions: 
-- Description: 
-- 
-- Dependencies: 
-- 
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
-- 
----------------------------------------------------------------------------------


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

library ieee_proposed;
use ieee_proposed.fixed_pkg.all;


entity fixed_point1 is
    Port ( a,b : in STD_LOGIC;
           c : in STD_LOGIC;
           d : in STD_LOGIC_VECTOR (0 downto 0));
end fixed_point1;

architecture Behavioral of fixed_point1 is
signal example : ufixed (3 downto -4);
begin
example <= "10011100";

end Behavioral;
 

Re: Cant this vhdl program be viewed in simulation?

you didnt tell us what the error is.
Assuming you have fixed_pkg in your simulator, then it has no syntax problems and will simulate just fine (if you count a single internal signal with a fixed number fine).
 

Re: Cant this vhdl program be viewed in simulation?

you didnt tell us what the error is.
Assuming you have fixed_pkg in your simulator, then it has no syntax problems and will simulate just fine (if you count a single internal signal with a fixed number fine).

screenshot_20160801_172022.png

Sir,the error is probably this:



'fixed_pkg' is not compiled in library ieee_proposed [../../../fixed_point1.srcs/sources_1/new/fixed_point1.vhd:26]
 

Re: Cant this vhdl program be viewed in simulation?

Then the problem is you havent compiled the fixed_pkg code into the ieee_proposed library.
ieee_proposed is not a standard VHDL library - it was a '93 compatible version of the new code added to VHDL 2008 to allow people to compile designs in software without 2008 compatibility. So you either need to switch to 2008 code :

use ieee.fixed_pkg.all;

or provide the '93 compatible version of the library and compile it into the ieee_proposed library.
 

Re: Cant this vhdl program be viewed in simulation?

Then the problem is you havent compiled the fixed_pkg code into the ieee_proposed library.
ieee_proposed is not a standard VHDL library - it was a '93 compatible version of the new code added to VHDL 2008 to allow people to compile designs in software without 2008 compatibility. So you either need to switch to 2008 code :

use ieee.fixed_pkg.all;

or provide the '93 compatible version of the library and compile it into the ieee_proposed library.

Sir how to compile the fixed_pkg code into the ieee_proposed library?Sir kindly explain.
 

Re: Cant this vhdl program be viewed in simulation?

Find copy of the fixed_pkg from somewhere on the internet
Include it in your project in the ieee_proposed library.
Btw: the fixed_pkg does NOT do floating point - it does fixed point arithmatic.

If you cannot find a copy of the code (as it has been removed from where it used to live) You'll have to do it with the numeric_std library.
I also suggest updating to a more up to date version of vivado - yours is 2 years out of date - 2016.2 is currently available and may have better 2008 support so you wont need the ieee_proposed library at all as you could use the proper 2008 version in the ieee library.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top