Forum: FPGA, VHDL & Co. XST ERROR - Timing Constraints


von Thomas R. (Gast)


Lesenswert?

Servus!

Ich habe folgendes Problem.
Wenn ich versuche folgendes Design zu synthetisieren bekomme ich Errors
(Siehe am ende des Beitrags).

Woran liegt es, am Sourcecode oder in der Constraints Spezifikation?

Weiß leider im Moment nicht wo ich ansetzen soll, denn bei der
Simulation hat es wunderbar geklappt.

mfg & Besten Dank im Voraus
Thomas
1
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.std_logic_unsigned.all;
4
5
entity keyboard is
6
7
  port (
8
    clock     : in  std_logic;                      -- 50 MHZ Board
9
Frequency
10
    reset_n    : in  std_logic;                      -- Active High
11
Reset
12
    ps2clock_i : in  std_logic;                      -- PS2 Clock
13
Input
14
    ps2data_i  : in  std_logic;                      -- PS2 Data Input
15
    led_o      : out std_logic_vector(8 downto 0));  -- Output to
16
LED's
17
18
end keyboard;
19
          
20
architecture RTL of keyboard is
21
22
signal ps2clock1 : std_logic;
23
signal ps2clock2 : std_logic;
24
signal ps2clock  : std_logic;
25
signal scancode  : std_logic_vector(8 downto 0);
26
signal bitcnt    : std_logic_vector(2 downto 0);
27
28
begin  -- RTL
29
30
  P_SYNCRONIZER_FF : process (clock, reset_n)
31
  begin  -- process P_SYNCRONIZER_FF
32
    if reset_n = '1' then                     -- asynchronous reset
33
(active low)
34
      ps2clock1 <= '0';
35
    elsif clock'event and clock = '1' then  -- rising clock edge
36
      ps2clock1 <= ps2clock_i;
37
    end if;
38
  end process P_SYNCRONIZER_FF;
39
40
    P_EDGEDETECT_I : process (clock, reset_n)
41
  begin  -- process P_EDGEDETECT_I
42
    if reset_n = '1' then                     -- asynchronous reset
43
(active low)
44
      ps2clock2 <= '0';
45
    elsif clock'event and clock = '1' then  -- rising clock edge
46
      ps2clock2 <= ps2clock1;
47
    end if;
48
  end process P_EDGEDETECT_I;
49
50
51
  P_EDGEDETECT_II : process (clock, reset_n)
52
  begin  -- process P_EDGEDETECT_II
53
    if reset_n = '1' then                     -- asynchronous reset
54
(active low)
55
      ps2clock <= '0';
56
    elsif clock'event and clock = '1' then  -- rising clock edge
57
      ps2clock <= ps2clock2 xor ps2clock1;
58
    end if;
59
  end process P_EDGEDETECT_II;
60
61
  S_READ_PS2DATA : process (clock, reset_n)
62
  begin  -- process S_READ_PS2DATA
63
    if reset_n = '1' then                     -- asynchronous reset
64
(active low)
65
      led_o                <= (others => '0');
66
      bitcnt               <= (others => '0');
67
      scancode             <= (others => '0');
68
    elsif clock'event and clock = '1' then  -- rising clock edge
69
      if ps2clock = '1' then
70
        if ps2clock1 = '0' then             -- rising edge of PS2
71
Clock
72
          scancode(CONV_INTEGER(bitcnt)) <= ps2data_i;
73
          bitcnt           <= bitcnt + 1;
74
          if(bitcnt = "1000")then
75
            led_o          <= scancode;
76
            bitcnt         <= (others => '0');
77
          end if;
78
        end if;
79
      end if;
80
    end if;
81
  end process S_READ_PS2DATA;
82
83
end RTL;

Timing constraints file:
----------------------------------------------------------------

NET "clock" TNM_NET = "clock";
TIMESPEC "TS_clock" = PERIOD "clock" 50 MHz HIGH 50 %;

NET "clock"     LOC = "T9";
NET "reset_n"      LOC = "L14";
NET "ps2data_i"   LOC = "M15";
NET "ps2clock_i"  LOC = "M16";

NET "led_o<0>" LOC = "P11";
NET "led_o<1>" LOC = "P12";
NET "led_o<2>" LOC = "N12";
NET "led_o<3>" LOC = "P13";
NET "led_o<4>" LOC = "N14";
NET "led_o<5>" LOC = "L12";
NET "led_o<6>" LOC = "P14";
NET "led_o<7>" LOC = "K12";
NET "led_o<8>" LOC = "R11";
-----------------------------------------------------------------

XILINX XST WARNINGS - ERRORS

Checking timing specifications ...
WARNING:XdmHelpers:625 - No instances driven from the following signals
or pins
   are valid for inclusion in TNM group "clock". A TNM property on a
pin or
   signal marks only the flip-flops, latches and/or RAMs which are
directly or
   indirectly driven by that pin or signal.
   signal "clock"
WARNING:XdmHelpers:644 - No appropriate elements were found for the TNM
group
   "clock". This group has been removed from the design.
ERROR:XdmHelpers:650 - The period specification "TS_clock" is invalid
because
   the "clock" group was removed.
Checking expanded design ...

von Thomas R. (Gast)


Lesenswert?

problem hat sich vorerst erledigt.
statt:
signal bitcnt    : std_logic_vector(2 downto 0);
muss es natürlich heißen:
signal bitcnt    : std_logic_vector(3 downto 0);

Aber wiese da eine meldung mit timing constraints kommt begreife ich
immer noch nicht..


mfg
thomas

von FPGAküchle (Gast)


Lesenswert?

Hm, also wenn ich das recht verstehe, ist clock das pin nicht der Name
des Taktnetzwerkes. Das kommt wohl daher das das Taktsignal über das
pin an einen Taktnetzwerktreiber (BUFG oder BUFGMUX) und dann ist es
ein takt. (DCM etc. die zw. Pin und BUFGMUX sein können, lassen wir mal
aus). Also der Name ist falsch. (Obwohl Xilinx sagt, das constraint
wurde durch "propagiert" also durch den clockbuffer durchgereicht.

Oder du versuchts statt einem Timingname einen Pinnamen zu verwenden.
Hm, die tools sagen dir was sie als Taktnamen erkennen, zum beispiel im
Report des placers.

Hm, bricht der Toolflow ab an dieser Stelle?. XST sollte eh nicht viel
mit constraints anfangen können (persönliche meinung).

Mal codeschnipsel:
für die Angebe das das Pin mit 77 MHz getrieben wird tippe ich
im ucf file

#Pinname
NET  "CLK77in"  LOC = "A8"  ;  #clkin

#netz einen Namen für den Timing analyzer geben
NET "clk77in"                 TNM_NET = "TN_CLK77in";

#jetzt endlich der Timinganalyse sagen das das Takt von 77MHz ist
TIMESPEC "TS_clk77"  = PERIOD "TN_CLK77in"                  12 ns
HIGH 50 %;


wahrscheinlich ist bei dir das Problem das der netzname erst einen
Timingnamen bekommen muss.

von FPGAküchle (Gast)


Lesenswert?

Aehm hab erst jetzt deinen ucf auszug gesehen, da scheint alles korrekt.
Vielleicht kommen die tools durcheinander, das das Pin clock nach dem
TMN_net definiert wird und das das TNM_NET den gleichen Namen wie das
Pin hat.

von Thomas R. (Gast)


Lesenswert?

Danke für die Mühe - also ich habe nochmals analysiert: Der Clock Pfad
wurde einfach wegoptimiert, wegen eines Fehlers im Design......


mfg

von FPGAküchle (Gast)


Lesenswert?

BTW: Dein lowaktiver Reset reset_n ist high aktiv.

von Thomas R. (Gast)


Lesenswert?

ja das passt schon so. Arbeite auf zwei verschiedenen
Entwicklungsboards, bei einem ist er active high, beim anderen active
low.....

mfg und besten dank für die mühe
Thomas R.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.