Utilisation du noyau de diviseur de Xilinx
Question
Je ne sais pas comment utiliser correctement le noyau IP du diviseur de Xilinx et ce que je fais mal.
Voici le code réduit au problème et tout ce que je fais en plus dans ISE, c'est que j'ajoute le diviseur Core Whit
CE - activé
Largeur du quotient 17
Largeur du diviseur 11
Reste
Signé
2 horloges par dévision
et le fichier UCF Whit net "clk_50mhz" définition
Je ne peux pas me débarrasser de cette erreur http://www.xilinx.com/support/answers/13873.htm
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_arith.ALL;
use IEEE.STD_LOGIC_signed.ALL;
use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity pg is
Port ( CLK_50MHz : in STD_LOGIC );
end pg;
architecture Behavioral of pg is
signal CLK : std_logic;
signal div_ce : std_logic := '0' ;
signal div_rfd : std_logic;
signal dividend_std : std_logic_vector (16 downto 0) := "00000000000000000";
signal divisor_std: std_logic_vector (10 downto 0) := "00000000000";
signal quotient_std: std_logic_vector (16 downto 0) ;
signal fractional_std : std_logic_vector (10 downto 0);
component divider is
port ( clk: in std_logic;
rfd: in std_logic;
ce: in std_logic;
dividend : in std_logic_vector (16 downto 0);
divisor: in std_logic_vector (10 downto 0);
quotient: out std_logic_vector (16 downto 0);
fractional : out std_logic_vector (10 downto 0)
);
end component;
begin
cdiv: process(CLK_50MHz)
begin
if(CLK_50MHz'event and CLK_50MHz='1') then
CLK<=not CLK;
end if;
end process cdiv;
VVV:divider
port map( clk=>CLK,
rfd=>div_rfd,
ce=>'1',
dividend=>dividend_std,
divisor=>divisor_std,
quotient=>quotient_std,
fractional=>fractional_std
);
end Behavioral;
La solution
Je ne sais pas quel est votre message d'erreur, mais voici quelques commentaires basés sur le code.
Première:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_arith.ALL;
use IEEE.STD_LOGIC_signed.ALL;
use IEEE.NUMERIC_STD.ALL;
Vous ne voulez vraiment pas toutes ces bibliothèques, ils entrent en collision de différentes manières.
Utilisez simplement Numeric_Std (Et en fait, vous n'en avez même pas besoin pour cet exemple)
Deuxième:
Vous pourriez également souffrir comme votre entité de haut niveau pg
a seulement une entrée d'horloge. Les outils remarqueront qu'aucune sortie n'est jamais envoyée dans le monde extérieur et optimisera le tout!
Essayez d'apporter l'entrée et les sorties du diviseur dans le monde extérieur.