ketanlad_18
Newbie level 4
Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity post_normalize is
generic(wE:positive:=6;
wF:positive:=13);
Port ( ck,rst:in std_logic;
a : in STD_LOGIC_VECTOR (wF-1 downto 0);
nAe : in STD_LOGIC_VECTOR (wE-1 downto 0);
nBe : in STD_LOGIC_VECTOR (wE-1 downto 0);
c1 : in std_logic;
b : out STD_LOGIC_VECTOR (wF-1 downto 0);
nA_e_final : out STD_LOGIC_VECTOR (wE-1 downto 0));
end post_normalize;
architecture Behavioral of post_normalize is
type state is (zero,one,two);
--attribute KEEP : string;
signal comb1:state;
signal s:std_logic_vector(wF-1 downto 0):=(others=>'0');
signal nAe_d : STD_LOGIC_VECTOR (wE-1 downto 0):=(others=>'0');
--attribute FSM_ENCODING : string;
--attribute FSM_ENCODING of comb1: signal is "ONE-HOT";
--attribute KEEP of comb1 :signal is "TRUE";
begin
process(a,c1,ck,s,nAe,nBe,nAe_d,rst,comb1)
begin
if rst='1' or (ck='0')then
comb1<=zero;
else
if c1='1' then
comb1<=one;
else comb1<=two;
end if;
end if;
case comb1 is
when zero=>
nAe_d<="000000";
s(wF-1 downto 0)<="0000000000000";
when one=>
nAe_d<=nAe+'1';
if (nAe=nBe) and nAe/="000000" and nBe/="000000"then
s(wF-1 downto 0) <= '1'& a(wF-1 downto 1);
else s(wF-1 downto 0) <= '0'& a(wF-1 downto 1);
-- nAe_d<=nAe+'1';
end if;
when two=>
if (nAe=nBe) and nAe/="000000" and nBe/="000000"then
s(wF-1 downto 0) <= '0'& a(wF-1 downto 1);
nAe_d<=nAe+'1';
else
s(wF-1 downto 0) <= a;
nAe_d<=nAe;
end if;
when others=>
nAe_d<="000000";
s<="0000000000000";
end case;
b<=s(wF-1 downto 0);
nA_e_final<=nAe_d;
end process;
end Behavioral;
[warnings]
[LEFT][TABLE="class: bash syntaxHighlighter expand"]
[TR]
[TD="colspan: 2"][/TD]
[/TR]
[TR="class: li1"]
[TD]
1
[/TD]
[TD][/TD]
[/TR]
[/TABLE]
[/LEFT]
INFO:Xst:1767 - HDL ADVISOR - Resource sharing has identified that some arithmetic operations in this design can share the same physical resources for reduced device utilization. For improved clock frequency you may try to disable resource sharing.
please give me suggestion to solve these warning and info.