Line 40... |
Line 40... |
type vectorblock04 is array (03 downto 0) of std_logic_vector(floatwidth-1 downto 0);
|
type vectorblock04 is array (03 downto 0) of std_logic_vector(floatwidth-1 downto 0);
|
type vectorblock03 is array (02 downto 0) of std_logic_vector(floatwidth-1 downto 0);
|
type vectorblock03 is array (02 downto 0) of std_logic_vector(floatwidth-1 downto 0);
|
type vectorblock02 is array (01 downto 0) of std_logic_vector(floatwidth-1 downto 0);
|
type vectorblock02 is array (01 downto 0) of std_logic_vector(floatwidth-1 downto 0);
|
type vectorblockadd02 is array (01 downto 0) of std_logic_vector(widthadmemblock-1 downto 0);
|
type vectorblockadd02 is array (01 downto 0) of std_logic_vector(widthadmemblock-1 downto 0);
|
|
|
|
|
|
|
|
|
|
|
--! Constante de reseteo
|
--! Constante de reseteo
|
constant rstMasterValue : std_logic :='0';
|
constant rstMasterValue : std_logic :='0';
|
|
|
--! Constantes periodicas.
|
--! Constantes periodicas.
|
constant tclk : time := 20 ns;
|
constant tclk : time := 20 ns;
|
constant tclk_2 : time := tclk/2;
|
constant tclk_2 : time := tclk/2;
|
constant tclk_4 : time := tclk/4;
|
constant tclk_4 : time := tclk/4;
|
|
|
Line 377... |
Line 374... |
function ap_format_instruction(i:string;ac_o,ac_f,bd_o,bd_f:std_logic_vector;comb:std_logic) return std_logic_vector;
|
function ap_format_instruction(i:string;ac_o,ac_f,bd_o,bd_f:std_logic_vector;comb:std_logic) return std_logic_vector;
|
|
|
--! Función que devuelve una cadena de caracteres de un solo caracter con el valor de un bit std_logic
|
--! Función que devuelve una cadena de caracteres de un solo caracter con el valor de un bit std_logic
|
procedure ap_sl2string(l:inout line;s:std_logic);
|
procedure ap_sl2string(l:inout line;s:std_logic);
|
|
|
--! Procedure
|
--! Procedimiento para mostrar vectores en forma de arreglos de flotantes
|
procedure ap_xfp122string(l:inout line;vb12:in vectorblock12);
|
procedure ap_xfp122string(l:inout line;vb12:in vectorblock12);
|
procedure ap_xfp082string(l:inout line;vb08:in vectorblock08);
|
procedure ap_xfp082string(l:inout line;vb08:in vectorblock08);
|
procedure ap_xfp062string(l:inout line;vb06:in vectorblock06);
|
procedure ap_xfp062string(l:inout line;vb06:in vectorblock06);
|
procedure ap_xfp042string(l:inout line;vb04:in vectorblock04);
|
procedure ap_xfp042string(l:inout line;vb04:in vectorblock04);
|
|
procedure ap_xfp022string(l:inout line;vb02:in vectorblock02);
|
|
|
|
|
end package;
|
end package;
|
|
|
|
|
package body arithpack is
|
package body arithpack is
|
|
|
|
procedure ap_xfp022string(l:inout line; vb02:in vectorblock02) is
|
|
begin
|
|
for i in 01 downto 0 loop
|
|
write(l,string'(" ["&integer'image(i)&"]"));
|
|
write(l,string'(" "));
|
|
ap_slvf2string(l,vb02(i));
|
|
end loop;
|
|
|
|
end procedure;
|
procedure ap_xfp122string(l:inout line; vb12:in vectorblock12) is
|
procedure ap_xfp122string(l:inout line; vb12:in vectorblock12) is
|
|
|
begin
|
begin
|
write(l,string'("<< "));
|
|
for i in 11 downto 0 loop
|
for i in 11 downto 0 loop
|
write(l,string'(integer'image(i)));
|
write(l,string'(" ["&integer'image(i)&"]"));
|
write(l,string'(" "));
|
write(l,string'(" "));
|
ap_slvf2string(l,vb12(i));
|
ap_slvf2string(l,vb12(i));
|
end loop;
|
end loop;
|
write(l,string'(" >>"));
|
|
end procedure;
|
end procedure;
|
|
|
procedure ap_xfp082string(l:inout line; vb08:in vectorblock08) is
|
procedure ap_xfp082string(l:inout line; vb08:in vectorblock08) is
|
|
|
begin
|
begin
|
write(l,string'("<< "));
|
|
for i in 07 downto 0 loop
|
for i in 07 downto 0 loop
|
write(l,string'(" ["&integer'image(i)&"]"));
|
write(l,string'(" ["&integer'image(i)&"]"));
|
write(l,string'(" "));
|
write(l,string'(" "));
|
ap_slvf2string(l,vb08(i));
|
ap_slvf2string(l,vb08(i));
|
end loop;
|
end loop;
|
write(l,string'(" >>"));
|
|
end procedure;
|
end procedure;
|
|
|
procedure ap_xfp062string(l:inout line; vb06:in vectorblock06) is
|
procedure ap_xfp062string(l:inout line; vb06:in vectorblock06) is
|
|
|
begin
|
begin
|
write(l,string'("<< "));
|
|
for i in 05 downto 0 loop
|
for i in 05 downto 0 loop
|
write(l,string'(integer'image(i)));
|
write(l,string'(" ["&integer'image(i)&"]"));
|
write(l,string'(" "));
|
write(l,string'(" "));
|
ap_slvf2string(l,vb06(i));
|
ap_slvf2string(l,vb06(i));
|
end loop;
|
end loop;
|
write(l,string'(" >>"));
|
|
end procedure;
|
end procedure;
|
|
|
procedure ap_xfp042string(l:inout line; vb04:in vectorblock04) is
|
procedure ap_xfp042string(l:inout line; vb04:in vectorblock04) is
|
|
|
begin
|
begin
|
write(l,string'("<< "));
|
|
for i in 03 downto 0 loop
|
for i in 03 downto 0 loop
|
write(l,string'(integer'image(i)));
|
write(l,string'(" ["&integer'image(i)&"]"));
|
write(l,string'(" "));
|
write(l,string'(" "));
|
ap_slvf2string(l,vb04(i));
|
ap_slvf2string(l,vb04(i));
|
end loop;
|
end loop;
|
write(l,string'(" >>"));
|
|
end procedure;
|
end procedure;
|
|
|
|
|
procedure ap_sl2string(l:inout line; s:in std_logic)is
|
procedure ap_sl2string(l:inout line; s:in std_logic)is
|
variable tmp:string(1 to 1);
|
variable tmp:string(1 to 1);
|
Line 461... |
Line 461... |
when 'H' =>
|
when 'H' =>
|
tmp:="H";
|
tmp:="H";
|
when others =>
|
when others =>
|
tmp:="-"; -- Don't care
|
tmp:="-"; -- Don't care
|
end case;
|
end case;
|
write(l,string'("<< "));
|
write(l,string'(" "));
|
write(l,string'(tmp));
|
write(l,string'(tmp));
|
write(l,string'(" >>"));
|
write(l,string'(" "));
|
|
|
|
|
|
|
end procedure;
|
end procedure;
|
|
|
Line 516... |
Line 516... |
end function;
|
end function;
|
|
|
|
|
|
|
procedure ap_v3f2string(l:inout line;v:in v3f) is
|
procedure ap_v3f2string(l:inout line;v:in v3f) is
|
|
|
begin
|
begin
|
write(l,string'("<< "));
|
write(l,string'("[X]"));
|
for i in 02 downto 0 loop
|
|
write(l,string'(integer'image(i)));
|
|
write(l,string'(" "));
|
write(l,string'(" "));
|
ap_slvf2string(l,v(i));
|
ap_slvf2string(l,v(2));
|
end loop;
|
write(l,string'("[Y]"));
|
write(l,string'(" >>"));
|
write(l,string'(" "));
|
|
ap_slvf2string(l,v(1));
|
|
write(l,string'("[Z]"));
|
|
write(l,string'(" "));
|
|
ap_slvf2string(l,v(0));
|
end procedure;
|
end procedure;
|
|
|
procedure ap_iCtrlState2string(l:inout line;i:in iCtrlState) is
|
procedure ap_iCtrlState2string(l:inout line;i:in iCtrlState) is
|
variable tmp:string (1 to 9);
|
variable tmp:string (1 to 9);
|
begin
|
begin
|