URL
https://opencores.org/ocsvn/idea/idea/trunk
Subversion Repositories idea
[/] [idea/] [trunk/] [behavioral/] [inout_port/] [dec1to2.vbe] - Rev 11
Go to most recent revision | Compare with Previous | Blame | View Log
-- File Name : dec1to2.vbe --
-- Description : The 32-bit 1-to-2 decoder --
-- Purpose : To be used by ASIMUT and SCMAP --
-- Date : Aug 30, 2001 --
-- Version : 1.1 --
-- Author : Martadinata A. --
-- Address : VLSI RG, Dept. of Electrical Engineering --
-- ITB, Bandung, Indonesia --
-- E-mail : marta@vlsi.itb.ac.id --
entity dec1to2 is
port(
a : in bit_vector(31 downto 0);
sel : in bit;
clk : in bit;
rst : in bit;
o1,o2 : out bit_vector(31 downto 0);
vdd : in bit;
vss : in bit
);
end dec1to2;
architecture vbe of dec1to2 is
signal reg1 : reg_vector(31 downto 0) register;
signal reg2 : reg_vector(31 downto 0) register;
signal o11 : bit_vector(31 downto 0);
signal o22 : bit_vector(31 downto 0);
begin
assert ((vdd and not (vss)) = '1')
report "power supply is missing on dec1to2"
severity warning;
o11 <= a when(sel='0') else not reg1;
o22 <= a when(sel='1') else not reg2;
REG1 : BLOCK ((clk = '1') and not clk'STABLE)
BEGIN
reg1 <= GUARDED X"1111_1111" when(rst='1') else not o11;
END BLOCK REG1;
REG2 : BLOCK ((clk = '1') and not clk'STABLE)
BEGIN
reg2 <= GUARDED X"1111_1111" when(rst='1') else not o22;
END BLOCK REG2;
o1 <= not reg1;
o2 <= not reg2;
end;
Go to most recent revision | Compare with Previous | Blame | View Log