VHDL HC237 3-8 Decoder with latches

Discussion in 'Embedded Systems and Microcontrollers' started by yoamocuy, Jul 8, 2011.

  1. yoamocuy

    Thread Starter Active Member

    Oct 7, 2009
    View attachment 31957 Hello, I'm trying to write the VHDL code for chip HC237. I think I have something written that will work for the most part, but my problem is in dealing with pin GL. Basically what this chip does is outputs all low if G1 is low or G2 is high. When GL is low everything runs normally, when GL is high the output is dependent upon what the last inputs (A,B, and C) were when GL was low. If my description doesn't make since you can check the truth table and it should be cleared up. Well I have something written that should work for every situation except for when GL goes high. I know in assembly you can make most anything a subroutine and just jump to that subroutine. Is it possible to do that in VHDL? Could I have an if statement that says if GL='1' then jump to this subroutine? I've attached the code as a .txt file.
    Last edited: Jul 8, 2011