T
Thomas Thorsen
Guest
If have been experimenting with VHDL in ModelSim XE, and made a design (a
DeltaSigma-modulator) that works and simulates properly. I tried putting it
all into Xilinx ISE (the webpack) to synthesise it to get an idea about how
to do it. However, the VHDL that worked in ModelSim does not work unchanged
in Xilinx, and i have no clue why. Any help is appreciated. Here is the line
of code that is causing the problem:
sumx <= std_logic_vector(signed(X1C1) + signed(X2C2) + signed(X3C3));
The three input signals and sumx are of type std_logic_vector. This works
fine in ModelSim but when running "Check Syntax" process in Xilinx, it
complains about the following:
ERROR:HDLParsers:3329 -
"D:/Profil/Skrivebord/Delt/P9/CRFB1/CascadeElement.vhd" Line 80. Expression
in type conversion to std_logic_vector has 2 possible definitions in this
scope, for example, SIGNED and std_logic_vector.
In the top of the file i have these definitions:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
I was told to use numeric_std (no one can provide good arguments), and so i
did. However, in one other entity, which i instantiate in this entity, i
internally use std_logic_arith because the resize-function in numeric_std
doesn't work "correctly" (the conv_signed in std_logic_arith does). All
entity ports are declared as std_logic_vector and signed types are only used
inside entities. I have a suspicion that this is causing the problem - but
why can ModelSim do it ? Is there a way to explicitly tell Xilinx which
conversion/arithmetic functions to use, when it cannot decide by itself? Or
is the root to this problem to be found elsewhere?
DeltaSigma-modulator) that works and simulates properly. I tried putting it
all into Xilinx ISE (the webpack) to synthesise it to get an idea about how
to do it. However, the VHDL that worked in ModelSim does not work unchanged
in Xilinx, and i have no clue why. Any help is appreciated. Here is the line
of code that is causing the problem:
sumx <= std_logic_vector(signed(X1C1) + signed(X2C2) + signed(X3C3));
The three input signals and sumx are of type std_logic_vector. This works
fine in ModelSim but when running "Check Syntax" process in Xilinx, it
complains about the following:
ERROR:HDLParsers:3329 -
"D:/Profil/Skrivebord/Delt/P9/CRFB1/CascadeElement.vhd" Line 80. Expression
in type conversion to std_logic_vector has 2 possible definitions in this
scope, for example, SIGNED and std_logic_vector.
In the top of the file i have these definitions:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
I was told to use numeric_std (no one can provide good arguments), and so i
did. However, in one other entity, which i instantiate in this entity, i
internally use std_logic_arith because the resize-function in numeric_std
doesn't work "correctly" (the conv_signed in std_logic_arith does). All
entity ports are declared as std_logic_vector and signed types are only used
inside entities. I have a suspicion that this is causing the problem - but
why can ModelSim do it ? Is there a way to explicitly tell Xilinx which
conversion/arithmetic functions to use, when it cannot decide by itself? Or
is the root to this problem to be found elsewhere?