S
Sushma
Guest
Below is my VHDL code. I am unable to have any success with signals
like CA0,CA1 and CA2.S0,S1 and S2. What am I doing wrong?
library IEEE ;
use IEEE.std_logic_1164.all ;
use IEEE.std_logic_arith.all ;
use IEEE.std_logic_unsigned.all ;
ENTITY gates_backup1 IS
PORT
(
SWRESET :INOUT STD_LOGIC;
SER_EN :INOUT STD_ULOGIC;
MCLK :IN std_ulogic;
CLK_100 :IN STD_LOGIC;
CLK_IN :IN STD_LOGIC;
HOLD_EN :INOUT STD_LOGIC;
POST_EN :INOUT STD_LOGIC;
SD_CLK :OUT STD_LOGIC;
SD_IN :OUT STD_LOGIC;
SD_LOAD :OUT STD_LOGIC;
DISGCLK :INOUT STD_LOGIC;
CLK_OUT :INOUT
STD_LOGIC;
A0 :INOUT STD_LOGIC;
A1 :INOUT STD_LOGIC;
A2 :INOUT STD_LOGIC;
A3 :INOUT STD_LOGIC;
A10 :INOUT STD_LOGIC;
A11 :INOUT STD_LOGIC;
A12 :INOUT STD_LOGIC;
TEST01 :INOUT STD_LOGIC;
TEST02 :INOUT STD_LOGIC;
TEST03 :INOUT STD_LOGIC;
TEST04 :INOUT STD_LOGIC;
TEST05 :INOUT STD_LOGIC;
TEST06 :INOUT STD_LOGIC;
TEST07 :INOUT STD_LOGIC;
AD1 :INOUT STD_LOGIC;
CLK_SRC :INOUT STD_LOGIC;
IO_WR :INOUT STD_LOGIC;
AD3 :INOUT STD_LOGIC;
IO_RD :INOUT STD_LOGIC;
D12 :INOUT STD_LOGIC
);
END gates_backup1;
ARCHITECTURE behavior OF gates_backup1 IS
SIGNAL P12 :STD_LOGIC;
SIGNAL CA0 :STD_LOGIC;
SIGNAL TC_128 :STD_LOGIC;
SIGNAL LOAD_CNT :STD_LOGIC;
SIGNAL LOAD_ZER :STD_LOGIC;
SIGNAL LOAD_SEL :STD_LOGIC;
SIGNAL CA1 :STD_LOGIC;
SIGNAL CA2 :STD_LOGIC;
SIGNAL TC_1K :STD_LOGIC;
SIGNAL TC_2K :STD_LOGIC;
SIGNAL TC_4K :STD_LOGIC;
SIGNAL CH_EN :STD_LOGIC;
SIGNAL ST_CLK :STD_LOGIC;
SIGNAL CH_SEL :STD_LOGIC;
SIGNAL IO_EN :STD_LOGIC;
SIGNAL SWRESET_CLK :STD_LOGIC;
SIGNAL S0 :STD_LOGIC;
SIGNAL S1 :STD_LOGIC;
SIGNAL S2 :STD_LOGIC;
SIGNAL RD_BUSY :STD_LOGIC;
BEGIN
---------------------------------------------------------------
PROCESS(CA0,A0,A1,A2,A3)
BEGIN
CA0 <= A0 AND A1 AND A2 AND A3;
TC_1K <= CA0 AND CA1 AND CA2;
TC_2K <= A10 AND TC_1K;
TC_4K <= A10 AND A11 AND TC_1K;
TEST01 <= CA0;
TEST02 <= CA1;
TEST03 <= CA2;
TEST04 <= TC_1K;
TEST05 <= TC_2K;
TEST06 <= TC_4K;
END PROCESS;
------------------------------------------------------------------
PROCESS(SWRESET,MCLK,S2,S1,S0,HOLD_EN,POST_EN,CA0,CA1)
BEGIN
IF(SWRESET='0')THEN
P12 <='0';
ELSIF(MCLK'EVENT AND MCLK='1')THEN
P12 <= D12;
END IF;
LOAD_SEL <= NOT(S2) AND NOT(S1) AND HOLD_EN;
LOAD_ZER <= (NOT(S2) AND NOT(S1) AND HOLD_EN)OR(S2 AND S1 AND
NOT(S0))OR(POST_EN);
TC_128 <= CA0 AND CA1;
END PROCESS;
process(MCLK)
begin
if MCLK = '1' and MCLK'event then
TEST07 <= P12;
end if;
end process;
------------------------------------------------------------------------
PROCESS(D8,SWRESET_CLK,CH_SEL,AD3,IO_WR,IO_RD)
BEGIN
IF(SWRESET_CLK'EVENT AND SWRESET_CLK='1')THEN
SWRESET <= D8;
END IF;
ST_CLK <= NOT(CH_SEL AND NOT(AD3) AND NOT(IO_WR));
IO_EN <= (NOT(IO_RD) AND CH_SEL AND AD3) OR (NOT(IO_WR) AND CH_SEL
AND AD3);
SWRESET_CLK <= NOT(CH_SEL AND NOT(AD3) AND NOT(IO_WR));
RD_BUSY <= NOT(IO_RD) AND NOT(AD3) AND CH_SEL;
END PROCESS;
END behavior;
like CA0,CA1 and CA2.S0,S1 and S2. What am I doing wrong?
library IEEE ;
use IEEE.std_logic_1164.all ;
use IEEE.std_logic_arith.all ;
use IEEE.std_logic_unsigned.all ;
ENTITY gates_backup1 IS
PORT
(
SWRESET :INOUT STD_LOGIC;
SER_EN :INOUT STD_ULOGIC;
MCLK :IN std_ulogic;
CLK_100 :IN STD_LOGIC;
CLK_IN :IN STD_LOGIC;
HOLD_EN :INOUT STD_LOGIC;
POST_EN :INOUT STD_LOGIC;
SD_CLK :OUT STD_LOGIC;
SD_IN :OUT STD_LOGIC;
SD_LOAD :OUT STD_LOGIC;
DISGCLK :INOUT STD_LOGIC;
CLK_OUT :INOUT
STD_LOGIC;
A0 :INOUT STD_LOGIC;
A1 :INOUT STD_LOGIC;
A2 :INOUT STD_LOGIC;
A3 :INOUT STD_LOGIC;
A10 :INOUT STD_LOGIC;
A11 :INOUT STD_LOGIC;
A12 :INOUT STD_LOGIC;
TEST01 :INOUT STD_LOGIC;
TEST02 :INOUT STD_LOGIC;
TEST03 :INOUT STD_LOGIC;
TEST04 :INOUT STD_LOGIC;
TEST05 :INOUT STD_LOGIC;
TEST06 :INOUT STD_LOGIC;
TEST07 :INOUT STD_LOGIC;
AD1 :INOUT STD_LOGIC;
CLK_SRC :INOUT STD_LOGIC;
IO_WR :INOUT STD_LOGIC;
AD3 :INOUT STD_LOGIC;
IO_RD :INOUT STD_LOGIC;
D12 :INOUT STD_LOGIC
);
END gates_backup1;
ARCHITECTURE behavior OF gates_backup1 IS
SIGNAL P12 :STD_LOGIC;
SIGNAL CA0 :STD_LOGIC;
SIGNAL TC_128 :STD_LOGIC;
SIGNAL LOAD_CNT :STD_LOGIC;
SIGNAL LOAD_ZER :STD_LOGIC;
SIGNAL LOAD_SEL :STD_LOGIC;
SIGNAL CA1 :STD_LOGIC;
SIGNAL CA2 :STD_LOGIC;
SIGNAL TC_1K :STD_LOGIC;
SIGNAL TC_2K :STD_LOGIC;
SIGNAL TC_4K :STD_LOGIC;
SIGNAL CH_EN :STD_LOGIC;
SIGNAL ST_CLK :STD_LOGIC;
SIGNAL CH_SEL :STD_LOGIC;
SIGNAL IO_EN :STD_LOGIC;
SIGNAL SWRESET_CLK :STD_LOGIC;
SIGNAL S0 :STD_LOGIC;
SIGNAL S1 :STD_LOGIC;
SIGNAL S2 :STD_LOGIC;
SIGNAL RD_BUSY :STD_LOGIC;
BEGIN
---------------------------------------------------------------
PROCESS(CA0,A0,A1,A2,A3)
BEGIN
CA0 <= A0 AND A1 AND A2 AND A3;
TC_1K <= CA0 AND CA1 AND CA2;
TC_2K <= A10 AND TC_1K;
TC_4K <= A10 AND A11 AND TC_1K;
TEST01 <= CA0;
TEST02 <= CA1;
TEST03 <= CA2;
TEST04 <= TC_1K;
TEST05 <= TC_2K;
TEST06 <= TC_4K;
END PROCESS;
------------------------------------------------------------------
PROCESS(SWRESET,MCLK,S2,S1,S0,HOLD_EN,POST_EN,CA0,CA1)
BEGIN
IF(SWRESET='0')THEN
P12 <='0';
ELSIF(MCLK'EVENT AND MCLK='1')THEN
P12 <= D12;
END IF;
LOAD_SEL <= NOT(S2) AND NOT(S1) AND HOLD_EN;
LOAD_ZER <= (NOT(S2) AND NOT(S1) AND HOLD_EN)OR(S2 AND S1 AND
NOT(S0))OR(POST_EN);
TC_128 <= CA0 AND CA1;
END PROCESS;
process(MCLK)
begin
if MCLK = '1' and MCLK'event then
TEST07 <= P12;
end if;
end process;
------------------------------------------------------------------------
PROCESS(D8,SWRESET_CLK,CH_SEL,AD3,IO_WR,IO_RD)
BEGIN
IF(SWRESET_CLK'EVENT AND SWRESET_CLK='1')THEN
SWRESET <= D8;
END IF;
ST_CLK <= NOT(CH_SEL AND NOT(AD3) AND NOT(IO_WR));
IO_EN <= (NOT(IO_RD) AND CH_SEL AND AD3) OR (NOT(IO_WR) AND CH_SEL
AND AD3);
SWRESET_CLK <= NOT(CH_SEL AND NOT(AD3) AND NOT(IO_WR));
RD_BUSY <= NOT(IO_RD) AND NOT(AD3) AND CH_SEL;
END PROCESS;
END behavior;