Hallo, habe ein Spartan 3S200FT256 Board von Xilinx.
Das wird wahrscheinlich niemand glauben, aber ich versuche seid
stunden den DCM in mein Source zu integrieren mit clk2x
Das klappt einfach nicht mehr. Immer irgentwelche Fehlermeldungen.
Kann mir jemannd ein leeres Projekt File geben in das ich dann
einfach meinen Quellcode reinsetze - denke das muss in jedem Fall gehe.
Nutze ISE 7i - ist halt alles ein Original Bundle.
Hallo,
>Das wird wahrscheinlich niemand glauben, aber ich versuche seid>stunden den DCM in mein Source zu integrieren mit clk2x>Das klappt einfach nicht mehr. Immer irgentwelche Fehlermeldungen.
hier im Forum sind viele Gläubige, die glauben auch sowas.
Stell doch einfach mal deine DCM Komponente als Quellcode
hier rein. Dann kann man mal drüberschauen und andere lernen
vieleicht auch noch was dabei.
Bye
Also als Fehlermeldung hab ich:
---------------------------------------
HDLParsers:3312 - "C:/timer.vhd" Line 53. Undefined symbol 'clk2x'.
ERROR:HDLParsers:1209 - "C:/timer.vhd" Line 53. clk2x: Undefined symbol
(last report in this block)
ERROR:HDLParsers:808 - "C:/timer.vhd" Line 55. = can not have such
operands in this context.
WARNING:HDLParsers:1406 - "C:/timer.vhd" Line 53. No sensitivity list
and no wait in the process
bei diesem Source :
-----------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
--- >>>>> t_clk clock in for counting
--- >>>>> t_reset reset counter to 0
--- <<<<< t_sec 8Bit output hold the second count result
--- <<<<<
---------------------------------------------------------------------
ENTITY timer IS
Port (clkin : IN std_logic;
t_reset : in std_logic;
t_sec : out std_logic_vector(7 downto 0)
);
END timer;
ARCHITECTURE timer_logic OF timer IS
signal sec_counter: std_logic_vector(7 downto 0);
signal counter: std_logic_vector(25 downto 0);
begin
process(clk2x)
begin
if (clk2x='1' and clk2x'event) then
counter <= counter + "1";
t_sec <= sec_counter;
if (counter>"10111110101111000010000000") then
counter <= "00000000000000000000000000";
sec_counter <= sec_counter +'1';
end if;
if (t_reset='1') then
counter <= "00000000000000000000000000";
sec_counter <= "00000000";
t_sec <= "11000000";
end if;
end if; --clock event
end process;
end timer_logic;
Das ist der Source vom DCM-Wizzard:
-------------------------------------------------
library ieee;
use ieee.std_logic_1164.ALL;
use ieee.numeric_std.ALL;
-- synopsys translate_off
library UNISIM;
use UNISIM.Vcomponents.ALL;
-- synopsys translate_on
entity te is
port ( CLKIN_IN : in std_logic;
RST_IN : in std_logic;
CLKIN_IBUFG_OUT : out std_logic;
CLK0_OUT : out std_logic;
CLK2X_OUT : out std_logic;
LOCKED_OUT : out std_logic);
end te;
architecture BEHAVIORAL of te is
signal CLKFB_IN : std_logic;
signal CLKIN_IBUFG : std_logic;
signal CLK0_BUF : std_logic;
signal CLK2X_BUF : std_logic;
signal GND : std_logic;
component IBUFG
port ( I : in std_logic;
O : out std_logic);
end component;
component BUFG
port ( I : in std_logic;
O : out std_logic);
end component;
component DCM
generic( CLK_FEEDBACK : string := "1X";
CLKDV_DIVIDE : real := 2.000000;
CLKFX_DIVIDE : integer := 1;
CLKFX_MULTIPLY : integer := 4;
CLKIN_DIVIDE_BY_2 : boolean := FALSE;
CLKIN_PERIOD : real := 0.000000;
CLKOUT_PHASE_SHIFT : string := "NONE";
DESKEW_ADJUST : string := "SYSTEM_SYNCHRONOUS";
DFS_FREQUENCY_MODE : string := "LOW";
DLL_FREQUENCY_MODE : string := "LOW";
DUTY_CYCLE_CORRECTION : boolean := TRUE;
FACTORY_JF : bit_vector := x"C080";
PHASE_SHIFT : integer := 0;
STARTUP_WAIT : boolean := FALSE;
DSS_MODE : string := "NONE");
port ( CLKIN : in std_logic;
CLKFB : in std_logic;
RST : in std_logic;
PSEN : in std_logic;
PSINCDEC : in std_logic;
PSCLK : in std_logic;
DSSEN : in std_logic;
CLK0 : out std_logic;
CLK90 : out std_logic;
CLK180 : out std_logic;
CLK270 : out std_logic;
CLKDV : out std_logic;
CLK2X : out std_logic;
CLK2X180 : out std_logic;
CLKFX : out std_logic;
CLKFX180 : out std_logic;
STATUS : out std_logic_vector (7 downto 0);
LOCKED : out std_logic;
PSDONE : out std_logic);
end component;
begin
GND <= '0';
CLKIN_IBUFG_OUT <= CLKIN_IBUFG;
CLK0_OUT <= CLKFB_IN;
CLKIN_IBUFG_INST : IBUFG
port map (I=>CLKIN_IN,
O=>CLKIN_IBUFG);
CLK0_BUFG_INST : BUFG
port map (I=>CLK0_BUF,
O=>CLKFB_IN);
CLK2X_BUFG_INST : BUFG
port map (I=>CLK2X_BUF,
O=>CLK2X_OUT);
DCM_INST : DCM
generic map( CLK_FEEDBACK => "1X",
CLKDV_DIVIDE => 2.000000,
CLKFX_DIVIDE => 1,
CLKFX_MULTIPLY => 4,
CLKIN_DIVIDE_BY_2 => FALSE,
CLKIN_PERIOD => 20.000000,
CLKOUT_PHASE_SHIFT => "NONE",
DESKEW_ADJUST => "SYSTEM_SYNCHRONOUS",
DFS_FREQUENCY_MODE => "LOW",
DLL_FREQUENCY_MODE => "LOW",
DUTY_CYCLE_CORRECTION => TRUE,
FACTORY_JF => x"C080",
PHASE_SHIFT => 0,
STARTUP_WAIT => FALSE)
port map (CLKFB=>CLKFB_IN,
CLKIN=>CLKIN_IBUFG,
DSSEN=>GND,
PSCLK=>GND,
PSEN=>GND,
PSINCDEC=>GND,
RST=>RST_IN,
CLKDV=>open,
CLKFX=>open,
CLKFX180=>open,
CLK0=>CLK0_BUF,
CLK2X=>CLK2X_BUF,
CLK2X180=>open,
CLK90=>open,
CLK180=>open,
CLK270=>open,
LOCKED=>LOCKED_OUT,
PSDONE=>open,
STATUS=>open);
end BEHAVIORAL;
und dann habe ich noch das DCM Template:
--------------------------------------------------------
-- VHDL Instantiation Created from source file te.vhd -- 13:34:41
11/07/2010
--
-- Notes:
-- 1) This instantiation template has been automatically generated using
types
-- std_logic and std_logic_vector for the ports of the instantiated
module
-- 2) To use this template to instantiate this entity, cut-and-paste and
then edit
COMPONENT te
PORT(
CLKIN_IN : IN std_logic;
RST_IN : IN std_logic;
CLKIN_IBUFG_OUT : OUT std_logic;
CLK0_OUT : OUT std_logic;
CLK2X_OUT : OUT std_logic;
LOCKED_OUT : OUT std_logic
);
END COMPONENT;
Inst_te: te PORT MAP(
CLKIN_IN => ,
RST_IN => ,
CLKIN_IBUFG_OUT => ,
CLK0_OUT => ,
CLK2X_OUT => ,
LOCKED_OUT =>
);
----------------------------------------------------------------
Du hast dir zwar per DCM Wizzard die DCM-Komponente generiert,
musst sie aber noch in deine timer-Komponente einbinden
(Definition und Instantiierung fehlen). Ausserdem fehlt noch das
Signal clk2x.
Btw. verwende für counter und sec_counter statt "std_logic_vector"
besser "integer range..", ist lesbarer. Und dann vieleicht noch
die Zuweisung "t_sec <= sec_counter;" aus dem Prozess raus.
Gruss
Mir ist nicht ganz klar was ich einbinden muss und wie ich die
Instantierung genau mache.
Es geht offensichtlich um dieses hier- richtig ? :
-------------------------------------
COMPONENT te
PORT(
CLKIN_IN : IN std_logic;
RST_IN : IN std_logic;
CLKIN_IBUFG_OUT : OUT std_logic;
CLK0_OUT : OUT std_logic;
CLK2X_OUT : OUT std_logic;
LOCKED_OUT : OUT std_logic
);
END COMPONENT;
Inst_te: te PORT MAP(
CLKIN_IN => ,
RST_IN => ,
CLKIN_IBUFG_OUT => ,
CLK0_OUT => ,
CLK2X_OUT => ,
LOCKED_OUT =>
);
--------------------------------
Aber wie wird dies in meinem timer Beispiel instantiert ?
Habe soetwas noch nie gemacht.
Und wie bindet man die Definitionen ein ?
rujatt schrieb:> Und wie bindet man die Definitionen ein ?
Mach dich mal zum Thema "Komponenten" schlau.
Und dann mußt du nur die Komponente te in deinen Code einbinden.
Etwa so:
1
ENTITYtimerIS
2
Port(clkin:INstd_logic;
3
t_reset:instd_logic;
4
t_sec:outstd_logic_vector(7downto0)
5
);
6
ENDtimer;
7
8
9
ARCHITECTUREtimer_logicOFtimerIS
10
11
COMPONENTte
12
PORT(
13
CLKIN_IN:INstd_logic;
14
RST_IN:INstd_logic;
15
CLKIN_IBUFG_OUT:OUTstd_logic;
16
CLK0_OUT:OUTstd_logic;
17
CLK2X_OUT:OUTstd_logic;
18
LOCKED_OUT:OUTstd_logic
19
);
20
ENDCOMPONENT;
21
22
signalsec_counter:std_logic_vector(7downto0);
23
signalcounter:std_logic_vector(25downto0);
24
25
signalclk2x:std_logic;--- das Fehlen dieses Signals wurde bemängelt...
26
27
begin
28
29
Inst_te:tePORTMAP(
30
CLKIN_IN=>clkin,
31
RST_IN=>t_reset,
32
CLKIN_IBUFG_OUT=>null,
33
CLK0_OUT=>null,
34
CLK2X_OUT=>clk2x,
35
LOCKED_OUT=>null
36
);
37
38
39
40
process(clk2x)
41
begin
42
if(clk2x='1'andclk2x'event)then
43
counter<=counter+"1";
44
t_sec<=sec_counter;
45
46
if(counter>"10111110101111000010000000")then
47
counter<="00000000000000000000000000";
48
sec_counter<=sec_counter+'1';
49
endif;
50
51
if(t_reset='1')then
52
counter<="00000000000000000000000000";
53
sec_counter<="00000000";
54
t_sec<="11000000";
55
endif;
56
57
endif;--clock event
58
endprocess;
59
60
endtimer_logic;
BTW:
> if (counter>"10111110101111000010000000") then> counter <= "00000000000000000000000000";
Nimm als Zähler doch besser einen integer, dann muß man nicht solche
zwielichtigen Bitmuster enwirren... :-/
So wie dort z.B.
http://www.lothar-miller.de/s9y/archives/61-Lauflicht.html
(Da kannst du übrigens auch die Component-Geschichte nochmal sehen)
Aha, habe die Componente te so eingefügt.
Inst_te : te instantiwert dann die Port-Map nehme ich an.
Das ich meine net-Constrains hier noch eintragen muste wuste ich nicht.
Jetzt bekomme ich immer noch den Fehler das er clk2x nicht kennt.
------------------------------------------------------
HDLParsers:3312 - "C:/timer.vhd" Line 73. Undefined symbol 'clk2x'.
ERROR:HDLParsers:1209 - "C:/timer.vhd" Line 73. clk2x: Undefined symbol
(last report in this block)
ERROR:HDLParsers:3294 - "C:/timer.vhd" Line 71. Can not determine a type
for Null value.
ERROR:HDLParsers:3294 - "C:/timer.vhd" Line 72. Can not determine a type
for Null value.
ERROR:HDLParsers:3294 - "C:/timer.vhd" Line 74. Can not determine a type
for Null value.
ERROR:HDLParsers:808 - "C:/timer.vhd" Line 80. = can not have such
operands in this context.
WARNING:HDLParsers:1406 - "C:/timer.vhd" Line 77. No sensitivity list
and no wait in the process
----------------------------------------
Warum kennt er clk2x noch nicht ?
Die Linkseite ist interessant werde ich mir bei gegelenheit genauer
anschauen.
> Das ich meine net-Constrains hier noch eintragen muste wuste ich nicht.
Du verwechselt hier Kraut&Rüben...
> Jetzt bekomme ich immer noch den Fehler das er clk2x nicht kennt.
Der Fehler liegt eher in Zeile 42... :-/
Oder: woher soll ich denn deinen Code kennen?
Poste mal deine timer.vhd Datei als Anhang (mit Endung .vhd wegen des
Syntax-Highlightings)...
rujatt schrieb:> Angehängte Dateien:> timer.vhd.txt
.txt ?
Hast du nicht gelesen, was ich geschrieben hatte?
Lothar Miller schrieb:> Poste mal deine timer.vhd Datei als Anhang (mit Endung .vhd wegen des> Syntax-Highlightings)...
Seis drum...
Nehmen wir mal deinen Code:
OK besten Dank, ich sitze schon so lange daran das ich selbst einfache
Dinge übersehe.
Es kommen keine Errors mehr aber ein kleines Problem ist noch da.
Irgentwie hängt der DCM d.h. das Demoprogramm hängt.
Zuerst dachte ich der Takt ist zu hoch.
Das gleiche ist aber auch der Fall wenn ich clk0 oder clkin mit 50mhz
nutze.
Das System hängt iregentwie ?
Woran liegt das ?
Frank schrieb:> Wir brauchen dringend ein Anfängerforum.
Nein, wir bräuchten eher dringend Anfänger, die nicht bei jedem kleinen
Problem die Publikumsfrage stellen... :-/
Hallo zusammen,
ich hänge an einem ähnlochen problem um mein DCM einzubinden.
Hab mir mit dem IP core ein DCM nach wünschen erzeugt
50 MHz rein -> 50 und 18 Mhz raus.
die HDL Instantiation Template hab ich dann wie folgt in ein neues VHDL
Modul eingebunden und daraus ein Schematic Symbol erstellt und mit in
meine top level Schematic eingebunden. Simulation klappt auch
einwandfrei soweit. Nur bei der Synthese meckert er folgendes:
Was mach ich denn hier falsch. Suche im Netz hat mich nicht gerade
weitergebracht
------------------------------------------------------------------------
-
ERROR:Xst:2585 - Port <CLK0> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLK180> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLK270> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLK2X> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLK2X180> of instance <DCM_INST> does not exist
in definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLK90> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLKDV> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLKFB> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLKFX> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLKFX180> of instance <DCM_INST> does not exist
in definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <CLKIN> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <DSSEN> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <LOCKED> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <PSCLK> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <PSDONE> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <PSEN> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <PSINCDEC> of instance <DCM_INST> does not exist
in definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <RST> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
ERROR:Xst:2585 - Port <STATUS> of instance <DCM_INST> does not exist in
definition <DCM>. Please compare the definition of block <DCM> to its
component declaration to detect the mismatch.
------------------------------------------------------------------------
-
Ramon F. schrieb:> Was mach ich denn hier falsch.
Du gibst die Zielarchitektur und die ISE-Version nicht an!
> ich hänge an einem ähnlochen problem um mein DCM einzubinden.
Bitte fange einen neuen Thread an und verweise von dort hierher, wenn es
relevant ist.
Jetzt muss jeder den 3 Jahre alten Schriftverkehr durchlesen, um dann
herauszufinden, dass es ein neues, unabhängiges Problem gibt...