[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [[oc] Help::]
There are many ways to describe this.
You might try something like this
----------------------------------------------------------
constant c_maxpower: integer := 5; -- just an example
signal Ns : integer range 0 to c_maxpower;
signal N : std_logic_vector(c_maxpower downto 0); -- left is c_maxpower
-- or something bigger
p_power : process (Ns) is
begin -- process p_power
for i in N(N'left) to N(N'right) loop
if i = Ns then
N(i) <= '1';
else
N(i) <= '0';
end if;
end loop; -- i
end process p_power;
------------------------------------------------
Hope this helps.
Andras
"Dharmeshbhai PATEL" <dpatel@ifrance.com> wrote:
> Hi list,
>
> I want to do this operation in VHDL
>
> N = 2**Ns.
>
> Where Ns is programable...
>
> How can i write a synthetizable vhdl code.
>
>
> Thanks in advance.
>
>
> _____________________________________________________________________
> Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
> http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
>
> --
> To unsubscribe from cores mailing list please visit
http://www.opencores.org/mailinglists.shtml
> --
> To unsubscribe from cores mailing list please visit
http://www.opencores.org/mailinglists.shtml
--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml