J
Jamin
Guest
Hello all,
After downloading the most recent version of fixed_pkg_c and
encountering many problems with synthesis, I started reading forum
posts and learned that the additions16 package was stable for '+' '-'
and '*' for many
Synthesis failed both using ISE 8.2 and also with ISE7.1, using XST for
synthesis. I tried synthesizing the following code with chipscope
implementation at the end of this post. I believe this test code is
okay, as I've followed examples done by other, any ideas or suggestions
to what may be wrong?
Thanks,
Jamin
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library ieee_proposed;
use ieee_proposed.fixed_pkg.all;
entity test_fixed is
port (
in1, in2 : in std_logic_vector(9 downto 0); -- inputs
clk : in STD_LOGIC;
starter : out STD_LOGIC;
out1 : out std_logic_vector(10 downto 0)); -- output:
end entity test_fixed;
architecture description of test_fixed is
-------------
--COMPONENTS*
-------------
component vio
port
(
control : in std_logic_vector(35 downto 0);
async_out : out std_logic_vector(20 downto 0)
);
end component;
component icon
port
(
control0 : out std_logic_vector(35 downto 0);
control1 : out std_logic_vector(35 downto 0)
);
end component;
component ila
port
(
control : in std_logic_vector(35 downto 0);
clk : in std_logic;
data : in std_logic_vector(10 downto 0);
trig0 : in std_logic_vector(0 downto 0)
);
end component;
----------
--SIGNALS*
----------
signal c : sfixed(5 downto -5);
signal resized_c : std_logic_vector(10 downto 0);
--ICON, ILA, VIO signals*
signal clk1 : std_logic;
signal trig0, temp_start : std_logic_vector(0 downto 0);
signal control_0,control_1 : std_logic_vector(35 downto 0);
signal async_out : std_logic_vector(20 downto 0);
begin -- architecture description
starter <= async_out(0);
temp_start(0) <= async_out(0);
process(clk,temp_start)
variable a,b : sfixed(4 downto -5);
begin
if temp_start(0) = '1' then
if (clk'Event and clk='1')then
a(4 downto -5) := to_sfixed(async_out(20 downto 11),4,-5);
b(4 downto -5) := to_sfixed(async_out(20 downto 11),4,-5);
c <= a + b;
end if;
else
c <= (others => '0');
a := (others => '0');
b := (others => '0');
end if;
end process;
out1 <= to_slv(c);
resized_c <= to_slv(c);
-- analyzer stuff
clk1 <= clk;
--------------
--virtual IO*
--------------
i_vio : vio
port map
(
control => control_0,
async_out => async_out
);
----------------------------
--integrated logic analyzer*
----------------------------
i_ila : ila
port map
(
control => control_1,
clk => clk1,
data => resized_c,
trig0 => temp_start
);
------------------------
--integrated controller*
------------------------
i_icon : icon
port map
(
control0 => control_0,
control1 => control_1
);
end architecture description;
After downloading the most recent version of fixed_pkg_c and
encountering many problems with synthesis, I started reading forum
posts and learned that the additions16 package was stable for '+' '-'
and '*' for many
Synthesis failed both using ISE 8.2 and also with ISE7.1, using XST for
synthesis. I tried synthesizing the following code with chipscope
implementation at the end of this post. I believe this test code is
okay, as I've followed examples done by other, any ideas or suggestions
to what may be wrong?
Thanks,
Jamin
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library ieee_proposed;
use ieee_proposed.fixed_pkg.all;
entity test_fixed is
port (
in1, in2 : in std_logic_vector(9 downto 0); -- inputs
clk : in STD_LOGIC;
starter : out STD_LOGIC;
out1 : out std_logic_vector(10 downto 0)); -- output:
end entity test_fixed;
architecture description of test_fixed is
-------------
--COMPONENTS*
-------------
component vio
port
(
control : in std_logic_vector(35 downto 0);
async_out : out std_logic_vector(20 downto 0)
);
end component;
component icon
port
(
control0 : out std_logic_vector(35 downto 0);
control1 : out std_logic_vector(35 downto 0)
);
end component;
component ila
port
(
control : in std_logic_vector(35 downto 0);
clk : in std_logic;
data : in std_logic_vector(10 downto 0);
trig0 : in std_logic_vector(0 downto 0)
);
end component;
----------
--SIGNALS*
----------
signal c : sfixed(5 downto -5);
signal resized_c : std_logic_vector(10 downto 0);
--ICON, ILA, VIO signals*
signal clk1 : std_logic;
signal trig0, temp_start : std_logic_vector(0 downto 0);
signal control_0,control_1 : std_logic_vector(35 downto 0);
signal async_out : std_logic_vector(20 downto 0);
begin -- architecture description
starter <= async_out(0);
temp_start(0) <= async_out(0);
process(clk,temp_start)
variable a,b : sfixed(4 downto -5);
begin
if temp_start(0) = '1' then
if (clk'Event and clk='1')then
a(4 downto -5) := to_sfixed(async_out(20 downto 11),4,-5);
b(4 downto -5) := to_sfixed(async_out(20 downto 11),4,-5);
c <= a + b;
end if;
else
c <= (others => '0');
a := (others => '0');
b := (others => '0');
end if;
end process;
out1 <= to_slv(c);
resized_c <= to_slv(c);
-- analyzer stuff
clk1 <= clk;
--------------
--virtual IO*
--------------
i_vio : vio
port map
(
control => control_0,
async_out => async_out
);
----------------------------
--integrated logic analyzer*
----------------------------
i_ila : ila
port map
(
control => control_1,
clk => clk1,
data => resized_c,
trig0 => temp_start
);
------------------------
--integrated controller*
------------------------
i_icon : icon
port map
(
control0 => control_0,
control1 => control_1
);
end architecture description;