M
Max
Guest
On 18 Sep 2003 00:17:46 -0700
cialdi@firenze.net (Max) wrote:
Here is the report:
=======================================================================
== HDL Synthesis Report
Macro Statistics
# Comparators : 1
5-bit comparator less : 1
thanks
cialdi@firenze.net (Max) wrote:
especting?I tried to implement a decoder in two differnet way:
--------------8<-------------------------
entity main is
Generic (w : integer := 12);
Port ( addr : in std_logic_vector(3 downto 0);
ce : in std_logic;
y : out std_logic_vector(w-1 downto 0));
end main;
architecture Behavioral of main is
begin
-- first way
process (addr, ce)
begin
y <= (others => '0');
if (addr < w and ce = '1') then
y(to_integer(unsigned(addr))) <= '1';
end if;
end process;
[...]
I prefer the firsr version since I don't need to rewrite the code if
generic 'w' changes.
After synthesis the device utilization is exacly the same, but looking
at rtl schematics (I use xilinx webpack ise) there is a differce:
in the first way is synthetized a comparator. This is correct but
useless since the other logic can provide its function.
there is another way to avoid the presence of comparator?
And why the tool synthetize a 5bit comparator instead of 4bit as I am
Here is the report:
=======================================================================
== HDL Synthesis Report
Macro Statistics
# Comparators : 1
5-bit comparator less : 1
thanks