(other >= '0') Questo sconosciuto...

Sezione dedicata alle logiche programmabili

(other >= '0') Questo sconosciuto...

Postby Janos » 14 Dec 2012, 08:48

Salve a tutti...

Mi spieghereste il significato del costrutto "(other >= '0')"?

L'ho trovato in questo esempio

Code: Select all
library ieee; use ieee.std_logic_1164.all;
entity reg16 is
port(clk, reset, set, en : in std_logic;
d : in std_logic_vector(15 downto 0);
q : out std_logic_vector(15 downto 0) );
end;
architecture beh of reg16 is
begin
process (clk,reset,set)
begin
if (reset=’1’) then
q <= ( others => ‘0’);
elsif (set=’1’) then
q <= ( others => ‘1’);
elsif rising_edge(clk) then
if (en=’1’) then
q <= d;
end if;
end if;
end process;
end beh;
Janos
 
Posts: 16
Joined: 10 Aug 2012, 09:27

Re: (other >= '0') Questo sconosciuto...

Postby flz47655 » 14 Dec 2012, 11:27

In pratica setta tutti i bit a 0 indipendentemente dal loro numero, molto utile quando il numero dei bit è ad esempio un parametro o sarà cambiato in futuro

Ciao
flz47655
 
Posts: 639
Joined: 19 Jan 2012, 21:16


Return to FPGA & CPLD

Who is online

Users browsing this forum: No registered users and 1 guest

cron