loop synthese problem

Gast #2322200
Lesenswert?

Hallo,

Ich hab eine VHDL-code in meinem Projekt wie folgenden geschrieben, aber 
leider nicht synthesierbar:

entity test is
generic ( ARR_SIZE: integer := 4; iteration : integer := 0);
port (
    clk         : in  STD_LOGIC;
    x_in        : in  MY_ARRAY (ARR_SIZE-1 downto 0);
    y_in        : in  MY_ARRAY (ARR_SIZE-1 downto 0);
    x_out       : out MY_ARRAY (ARR_SIZE-1 downto 0);
    y_out       : out MY_ARRAY (ARR_SIZE-1 downto 0)
    );
end test;
architecture Behavioral of test is

begin
    process (clk)
    variable Xtemp,Ytemp     :  MY_ARRAY(ARR_SIZE-1 downto 0);
      begin
        if clk'event and clk ='1' then
     for i in ARR_SIZE-1 downto 0 loop
           Xtemp(i) := x_in(i) + (y_in(i) sra iteration);
     Ytemp(i) := y_in(i) - (x_in(i) sra iteration);
           end loop;
        end if;
  x_out <= Xtemp;
  y_out <= Ytemp;
   end process;
end Behavioral;

wenn ich  Xtemp(i) := x_in(i) + y_in(i);
    Ytemp(i) := y_in(i) - x_in(i);
statt
          Xtemp(i) := x_in(i) + (y_in(i) sra iteration);
    Ytemp(i) := y_in(i) - (x_in(i) sra iteration);
versucht, klappt es schon.

Kennt jemand wie kann es korrigiert werden?

vielen danke!
Gast #2323018
Lesenswert?

hallo,

meine Fehlermeldung ist: 
FATAL_ERROR:Xst:Portability/export/Port_Main.h:143:1.17 - This 
application has discovered an exceptional condition from which it cannot 
recover.  Process will terminate. For technical support on this issue, 
please open a WebCase with this project attached at 
http://www.xilinx.com/support.

Process "Synthesis" failed

SRA funktioniert gut. wenn ich z.B nur
    Xtemp(i) := y_in(i) sra iteration;
    Ytemp(i) := x_in(i) sra iteration;
schreib,Synthese klappt auch.

Danke!
Moderator (Firma: Titel) Persönliche Seite #2324108
Lesenswert?

jojo schrieb:
> wenn ich
>     Xtemp(i) := x_in(i) + y_in(i);
>     Ytemp(i) := y_in(i) - x_in(i);
> versucht, klappt es schon.

jojo schrieb:
> SRA funktioniert gut. wenn ich z.B nur
>     Xtemp(i) := y_in(i) sra iteration;
>     Ytemp(i) := x_in(i) sra iteration;
> schreib,Synthese klappt auch.

Dann probier doch mal, noch einen Zwischenschritt in der Berechnung 
einzuführen:
1
begin
2
    process (clk)
3
    variable Xtemp,Ytemp     :  MY_ARRAY(ARR_SIZE-1 downto 0);
4
    variable help            :  MY_ARRAY(0 downto 0);
5
    begin
6
      if clk'event and clk ='1' then
7
          for i in ARR_SIZE-1 downto 0 loop
8
           help(0)  := y_in(i) sra iteration;
9
           Xtemp(i) := x_in(i) + help;
10
           help(0)  := x_in(i) sra iteration;
11
           Ytemp(i) := y_in(i) - help;
12
          end loop;
13
       end if;
14
     x_out <= Xtemp;
15
     y_out <= Ytemp;
16
   end process;
17
end Behavioral;
Gast #2324262
Lesenswert?

1
ERROR:HDLCompiler:69 - "\xst_errors\synthese\array_test\../../rtl/array_test.vhd" Line 13: <my_array> is not declared.
2
ERROR:HDLCompiler:69 - "\xst_errors\synthese\array_test\../../rtl/array_test.vhd" Line 14: <my_array> is not declared.
3
ERROR:HDLCompiler:69 - "\xst_errors\synthese\array_test\../../rtl/array_test.vhd" Line 15: <my_array> is not declared.
4
ERROR:HDLCompiler:69 - "\xst_errors\synthese\array_test\../../rtl/array_test.vhd" Line 16: <my_array> is not declared.
Wie sieht denn die Definition von MY_ARRAY aus?

Duke
Gast #2324814
Lesenswert?

hallo duke,

library IEEE, ieee_proposed;
use IEEE.STD_LOGIC_1164.ALL;
use ieee_proposed.fixed_float_types.all;
use ieee_proposed.fixed_pkg.all;
use IEEE.NUMERIC_STD.ALL;
library LIB_TYP;
use LIB_TYP.ARRAY_TYPE.ALL;


Die Package fixed_float_types_c und fixed_pkg_c werden unter
 http://www.eda-stds.org/fphdl/  herunterladen, siehe  source code von 
xilinx 11.1.
Gast #2325586
Lesenswert?

jojo schrieb:
> library IEEE, ieee_proposed;
> use IEEE.STD_LOGIC_1164.ALL;
> use ieee_proposed.fixed_float_types.all;
> use ieee_proposed.fixed_pkg.all;
> use IEEE.NUMERIC_STD.ALL;
> library LIB_TYP;
> use LIB_TYP.ARRAY_TYPE.ALL;
Eieiei, das man Dir alles aus der Naes ziehem muß, nur um mal Code zu 
erhalten, der sich compilieren läßt ;-)
1
$ vcom ../rtl/array_test.vhd
2
Model Technology ModelSim PE vcom 10.0c Compiler 2011.07 Jul 21 2011
3
-- Loading package STANDARD
4
-- Loading package TEXTIO
5
-- Loading package std_logic_1164
6
-- Loading package NUMERIC_STD
7
-- Loading package fixed_float_types
8
-- Loading package fixed_pkg
9
-- Compiling package ARRAY_TYPE
10
-- Loading package ARRAY_TYPE
11
-- Compiling entity test
12
-- Compiling architecture Behavioral of test

Nächste Frage: Hast Du eine Testbench?

Ansonsten habe ich mal die Zuweisung von den Variablen zum Signal mit in 
den synchronen Teil reingenommen. Das sagt xst folgendes:
1
Elaborating entity <test> (architecture <Behavioral>) with generics from library <work>.
2
ERROR:HDLCompiler:410 - "../rtl/array_test.vhd" Line 51: Expression has 15 elements ; expected 14

Jetzt bist Du erstmal wieder dran.

Duke
Angehängte Dateien:
Gast #2325638
Lesenswert?

Hallo Duke,

Danke dir. Und das Compile ist kein problem wenn mann
     Xtemp(i) := resize( x_in(i) + (y_in(i) sra iteration),3,-10);
     Ytemp(i) := resize( y_in(i) - (x_in(i) sra iteration),3,-10);
schreibt. Das problem ist,dass es  immer nicht synthesierbar ist.

Ich hab eine Testbench geschrieben,aber gib's auch noch fehler.

noch mal danke.
Gast #2325827
Lesenswert?

jojo schrieb:
> Ich hab eine Testbench geschrieben,aber gib's auch noch fehler.
Die muß erstmal laufen.

Und immer dran denken: Du willst Hardware bauen. Dein Testmodul hat 
schon 225 Ein-/Ausgänge. Kommen die Daten wirklich parallel? Und muß in 
jedem Takt ein Ergebnis entstehen?

Duke

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren