Hallo, ich bin noch etwas unbeholfen in Sachen FPGA. Habe bisher einige kleiner Designs gemacht. Mein Problem ist folgendes: Ich bekomme von einem ADC einen exteren Takt auf das FPGA. Dieser Takt teilt mir mit wann ein neuer Wert auf den parallenen Datenleitungen zwischen ADC und FPGA bereit steht. Diesen Takt habe ich nun über BIO -> BUFR als lokalen Takt definiert? So richtung oder müssen noch weitere Einstellungen gemacht werden? Ich speichere den Wert zwischen und hole ihn mir mit einem schnelleren globalen Takt Signal in das Hauptdesign (so nenne ich es mal). Das Problem ist das das Register das den ADC Wert enthält, die FFs, anscheinend nicht alle in der lokalen Clock Region liegen (Fehler beim erstellen des Designs). Dort sind immoment noch einige Counter zum Testen mit drinne. Heißt das nun das alle FFs in dieser Region verbraucht sind und das Synthesetool sie deswegen wo anderst hin packen muss oder muss ich das dem Tool mitteilen das diese FFs in dieser Region liegen müssen. Falls ich irgendwelchen Blödsinn geschrieben habe bitte korrigiert mich. Ich habe mich mit dem FPGA Innenleben bisher nur wenig beschäftigt. Danke für Antworten mfg
Du must mit den constraints dafür sorgen, dass die daten rechtzeitig drin sind, und konsistent reinkommen. gfs brauchst Du noch ein zwei extra Register.
Ja aber das problem ist erstmal das das Design nichtz erstellt wird da einige FFs anscheined nicht in der Clock Region liegen. Wie kann man das ändern bzw. geht das überhaupt (Clockregion voll). Ich habe im Virtex 4 user guide leider nichts über die Verfügbaren resourcen in so einer Clock Region gefunden. mfg
Walter schrieb: > ADC und FPGA bereit steht. Diesen Takt habe ich nun über BIO -> BUFR als > lokalen Takt definiert? So richtung oder müssen noch weitere > Einstellungen > gemacht werden? Ich speichere den Wert zwischen und hole ihn mir mit > einem > schnelleren globalen Takt Signal in das Hauptdesign (so nenne ich es > mal). Hallo... Normalerweise ist die Reihenfolge IBUF -> BUFIO -> mit diesem Clock kannst du dann die IOLogic Flip FLops betreiben wie z.B. IDDRs -> BUFR -> FPGA Fabric (regional clock)... Der Regional Clock kann seine Region und die benachbarten erreichen - dem entsprechend sollte da schon einiges rein passen... Wie schnell und mit welcher Breite kommen die Daten in den FPGA?? Hast du Timing Constraints gesetzt??
Hi, also das ganze ist etwas kompliziert. Das Design läuft auf einem Sundance Board (SMT368 mit Virtex 4 FPGA). Ich habe mir das so gedacht: ADC CLK | Global clk ------------------------------------ ADC_DATA --> FIFO --> Hauptdesign ist alles noch nicht implementuiert. Ich bekomme aber je nach dem was ich gerade programmiert habe folgende Fehlermeldung: --------------------------------------------------------- FATAL INTERNAL ERROR: FPGA library: Place:905 - Components driven by Regional clock net <I_top/INST0_ADC_CLK_IN_clk_out> can't be placed and routed because location constraints are causing the clock region rules to be violated. Regional Clock net <I_top/INST0_ADC_CLK_IN_clk_out> is being driven by BUFR <I_top/INST0_ADC_CLK_IN/BUFR_CHA> locked to site "BUFR_X1Y7" Because of this location contraint, <I_top/INST0_ADC_CLK_IN_clk_out> can only drive clock regions "CLOCKREGION_X1Y4, CLOCKREGION_X1Y3, CLOCKREGION_X1Y2". The following components driven by <I_top/INST0_ADC_CLK_IN_clk_out> have been locked to sites outside of these clock regions: I_top/INST1_adc_read/x_chan_out_0.Data_27 (Locked Site: ILOGIC_X2Y61 CLOCKREGION_X1Y1) Please evaluate the location constraints of both the BUFR and the components driven by <I_top/INST0_ADC_CLK_IN_clk_out> to ensure that they follow the clock region rules of the architecture. For more information on the clock region rules, please refer to the architecture user's guide. ------------------------------------------------------------------------ -- Ich steige da nicht durch. Diese Fehlermeldung (mit anderen Instancen, je nach dem wie programmiert) kommt halt immer. Die Instancen die eigentlich auf einem andern (Global CLK) laufen. Also die FIFO auslesen erscheinen da halt. Warum, die haben doch nichts mehr mit dieser Clockregion zu tun?? Bin für jede hilfe dankbar.
So hier nochmal alles etwas genauer. Mein Code bisher:
1 | library ieee; |
2 | use ieee.std_logic_1164.all; |
3 | use ieee.numeric_std.all; |
4 | use ieee.std_logic_arith.all; |
5 | library diamond; |
6 | use diamond.chan_pkg.all; |
7 | |
8 | entity adc_read is |
9 | port ( |
10 | -- @Diamond3L Begin@
|
11 | -- Do not alter the contents of the block between the begin and end tags.
|
12 | x_chan_in_0 : IN X_chan_t; --port not named |
13 | y_chan_in_0 : OUT Y_chan_t; --port not named |
14 | x_chan_out_0 : OUT X_chan_t; --ADC_OUT |
15 | y_chan_out_0 : IN Y_chan_t; --ADC_OUT |
16 | -- @Diamond3L End@
|
17 | |
18 | ADCA_DATA_CLK : in std_logic; -- ADC Clock IN vom ADC |
19 | ADCA_DATA : in std_logic_vector (13 downto 0); -- ADC CHA |
20 | ADCB_DATA : in std_logic_vector (13 downto 0); -- ADC CHB |
21 | |
22 | LED : out std_logic; |
23 | |
24 | -- The following signals are always required for a task
|
25 | clk : IN std_logic; |
26 | rst : IN std_logic; |
27 | ce : IN std_logic; |
28 | ce_clr : IN std_logic |
29 | -- Do not add any ports after this point
|
30 | );
|
31 | end adc_read; |
32 | |
33 | architecture arch_adc_read of adc_read is |
34 | |
35 | -- @Diamond3L Alias Begin@
|
36 | -- Do not alter the contents of the block between the begin and end tags.
|
37 | alias ADC_OUT_x : X_chan_t is x_chan_out_0; |
38 | alias ADC_OUT_y : Y_chan_t is y_chan_out_0; |
39 | -- @Diamond3L Alias End@
|
40 | |
41 | component BUFIO is |
42 | port( |
43 | I : in std_logic; |
44 | O : out std_logic |
45 | );
|
46 | end component; |
47 | |
48 | component BUFR |
49 | port( |
50 | I : in std_logic; |
51 | CE : in std_logic; |
52 | CLR : in std_logic; |
53 | O : out std_logic |
54 | );
|
55 | end component; |
56 | signal temp_clk : std_logic; -- Zum Verbinden von BUFIO-->BUFR |
57 | |
58 | signal counter : integer range 0 to 7500000 := 0; -- Counter für LED |
59 | |
60 | signal sample_count : integer range 0 to 15 := 0; -- Counter für Samples |
61 | signal sample_count_pre : integer range 0 to 15 := 0; -- Zum vergleich mit sample_count |
62 | signal sample : std_logic_vector (31 downto 0); -- Zwischenspeicher für beide ADC Channels |
63 | signal sample_rdy : std_logic; -- if (sample_count != sample_count_pre) |
64 | |
65 | signal write : std_logic; -- zur Kommunikation mit anderen Tasks (entity) Sundance 3L Diamond |
66 | |
67 | signal LED_OUT : std_logic; |
68 | |
69 | signal adc_clk : std_logic; -- internes Clock Signal nach BUFR |
70 | begin
|
71 | |
72 | |
73 | -- erzeugen des interen adc_clk ----------------------------------
|
74 | BUFIO_CHA:BUFIO port map(I=>ADCA_DATA_CLK, O=>temp_clk); |
75 | BUFR_CHA: BUFR port map(I=>temp_clk, CE=>'0', CLR=>'0', O=>adc_clk); |
76 | ------------------------------------------------------------------
|
77 | |
78 | ---- für Sundance bzw. 3L Diamond kommunikation ------------------
|
79 | y_chan_in_0.ready <= '1'; -- assume channel is ready |
80 | ADC_OUT_x.validwords <= "01"; -- 32 Bit Word |
81 | ADC_OUT_x.write <= write; |
82 | -------------------------------------------------------------------
|
83 | |
84 | LED <= LED_OUT; |
85 | |
86 | -- auslesen der ADC Channels mit adc_clk --------------------------
|
87 | -- Speichern in Signal sample -------------------------------------
|
88 | process(adc_clk) |
89 | begin
|
90 | if rising_edge(adc_clk) then |
91 | -- LED Blink ---------------------------------
|
92 | counter <= counter + 1; |
93 | if counter = 7500000 then |
94 | LED_OUT <= LED_OUT xor '1'; |
95 | end if; |
96 | ----------------------------------------------
|
97 | -- Read both ADC Channels --------------------
|
98 | sample_count <= sample_count + 1; |
99 | sample <= conv_std_logic_vector(sample_count,4) & ADCB_DATA & ADCA_DATA; |
100 | ----------------------------------------------
|
101 | end if; |
102 | end process; |
103 | -------------------------------------------------------------------
|
104 | |
105 | -- prüfen ob neues Sample angekommen ist --------------------------
|
106 | process(sample_count, sample_count_pre) |
107 | begin
|
108 | if sample_count = sample_count_pre then |
109 | sample_rdy <= '0'; |
110 | else
|
111 | sample_rdy <= '1'; |
112 | end if; |
113 | end process; |
114 | --------------------------------------------------------------------
|
115 | |
116 | -- Auslesen des Registers (Signal) sample mit clk (Global CLK) -----
|
117 | -- Senden der Daten zum anderen Task mit Sundance bzw. 3L Diamond
|
118 | -- Kommunikations Channel
|
119 | process(clk) |
120 | begin
|
121 | if rising_edge(clk) then |
122 | if sample_rdy = '1' then |
123 | sample_count_pre <= sample_count; |
124 | if ADC_OUT_y.ready = '1' and write = '0' then |
125 | ADC_OUT_x.data(31 downto 0) <= sample; |
126 | ADC_OUT_x.data(63 downto 32) <= (others => '0'); |
127 | write <= '1'; |
128 | end if; |
129 | if write = '1' then |
130 | write <= '0'; |
131 | end if; |
132 | end if; |
133 | end if; |
134 | end process; |
135 | --------------------------------------------------------------------
|
136 | |
137 | end arch_adc_read; |
Die Fehlermeldung die ich nun bekomme sieht so aus: ---------------------------------------------------- FATAL INTERNAL ERROR: FPGA library: Place:905 - Components driven by Regional clock net <I_top/INST0_adc_read/adc_clk> can't be placed and routed because location constraints are causing the clock region rules to be violated. Regional Clock net <I_top/INST0_adc_read/adc_clk> is being driven by BUFR <I_top/INST0_adc_read/BUFR_CHA> locked to site "BUFR_X1Y7" Because of this location contraint, <I_top/INST0_adc_read/adc_clk> can only drive clock regions "CLOCKREGION_X1Y4, CLOCKREGION_X1Y3, CLOCKREGION_X1Y2". The following components driven by <I_top/INST0_adc_read/adc_clk> have been locked to sites outside of these clock regions: I_top/INST0_adc_read/sample<27> (Locked Site: ILOGIC_X2Y61 CLOCKREGION_X1Y1) Please evaluate the location constraints of both the BUFR and the components driven by <I_top/INST0_adc_read/adc_clk> to ensure that they follow the clock region rules of the architecture. For more information on the clock region rules, please refer to the architecture user's guide. ------------------------------------------------------------------------ - Warum wird denn Sample(27) nicht in die richtige clk_domain gepackt ??? Also adc_clk. mfg
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
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.