cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
5,809 Views
Registered: ‎02-18-2009

CPLD code not working

Hello,

 

 

I have XCR3032XL CPLD in my design. CPLD is mainly enabling/disabling latch signals (LEDIN, OEDO) based in chip enable (CE), write, read signals from CPU. Below is the code:

 

 process(Addr, Wr, Rd, Reset, CE)

begin

if(Reset = '0') then

LED1 <= '0';

LED2<= '0';

endif

 

if( CE = '0') then

    if( Wr='0') then

       case Addr

               when "00" LEDIN <= "1110";

               when others LEDIN <= "1111";

       end case;

   

    if( Rd='0') then

       case Addr

               when "00" LEDO <= "1110";

               when others LEDO <= "1111";

       end case;

end if;

 

end process;

 

Please let me know what steps I need to take to make it work.

 

Thanks,

Yatin

0 Kudos
2 Replies
Highlighted
Newbie
Newbie
5,803 Views
Registered: ‎02-18-2009

Re: CPLD code not working

I am using IRU1206-33CY as power supply. Does this has enough current to supply XCR3032XL??

 

 

Yatin

0 Kudos
Highlighted
5,304 Views
Registered: ‎03-17-2009

Re: CPLD code not working

looks like syntax error: Try the below code---

 

process(Addr, Wr, Rd, Reset, CE)

begin

if(Reset = '0') then

LED1 <= '0';

LED2<= '0';

endif

 

if( CE = '0') then

    if( Wr='0') then

       case Addr

               when "00" LEDIN <= "1110";

               when others LEDIN <= "1111";

       end case;

   

    elsif( Rd='0') then

       case Addr

               when "00" LEDO <= "1110";

               when others LEDO <= "1111";

       end case;

  end if;

end if;

 

end process

0 Kudos