I need a VHDL guru and a GAL guru

  • Thread starter Number2Pencil
  • Start date
In summary: GALsIn summary, the conversation discusses the use of a GAL22V10 with VHDL to create a password system with storing and testing modes and LED indicators. The code and block diagram for the system are attached. The main issue is that the design requires more inputs, outputs, and flip-flops than what one GAL can provide, leading to the use of three separate GALs. The conversation also mentions a redesign that allows for the use of one GAL and mentions potential future improvements.
  • #1
Number2Pencil
208
1
This is my first time trying to program a GAL22V10 w/ VHDL and I'm having troubles. I'm trying to make a password system with a storing mode and a testing mode, and LEDs to tell you which mode you're in. The user inputs are a reset switch, a test-mode switch, and store-mode switch, 3 switches to represent your password, and an enter button. There's also a time-out input which will take you out of your mode if you take too long to do anything (called "16 count"). The outputs are 3 LEDs, a "Wrong" pin, and a "Correct" pin.

I've attached a block diagram of how I want the processes to work. The code is also attached because it's hard to read on as posted

The problem is I think one GAL should be enough to execute this, as it has enough inputs, outputs and flip-flops, yet the only way I could get it to fit is to use a GAL for EACH process (total of 3). Why is this, and what can I do about it?




Now for some Code:

Architecture PasswordSystem of GAL is
signal memory: std_logic_vector(2 downto 0);
signal test_mode: std_logic;
signal store_mode: std_logic;
signal password_attempted: std_logic;
signal password_set: std_logic;

begin

Mode: Process (test_input, store_input, sixteen_count, password_attempted, password_set, reset)
begin
if (reset = '1' or sixteen_count = '0' or password_attempted = '1' or password_set = '1') then
test_mode <= '0';
store_mode <= '0';
elsif (store_input = '1' and test_input = '0') then
test_mode <= '0';
store_mode <= '1';
elsif (store_input = '0' and test_input = '1') then
test_mode <= '1';
store_mode <= '0';
end if;
end process;

testingLED <= test_mode;
storingLED <= store_mode;
ten_secondsLED <= store_mode or test_mode;


Store: Process (enter, reset)
begin
if (reset = '1') then
memory <= "000";
password_set <= '0';
elsif (rising_edge(enter)) then
if (store_mode = '1') then
memory <= password_inputs;
password_set <= '1'; --password is set, takes out of mode
end if;
end if;
end process;


Test: Process (enter, reset)
begin
if (reset = '1') then
wrong <= '0';
correct <= '0';
elsif (rising_edge(enter)) then
if (test_mode = '1') then
if (inputs = memory) then --correct
password_attempted <= '1';
correct <= '1';
wrong <= '0';
else --wrong
password_attempted <= '1';
correct <= '0';
wrong <= '1';
end if;
end if;
end if;
end process;
 

Attachments

  • password schematicA.GIF
    password schematicA.GIF
    24.9 KB · Views: 542
  • password code.doc
    23.5 KB · Views: 320
Last edited:
Engineering news on Phys.org
  • #2
here's that block diagram
 

Attachments

  • password schematicB.JPG
    password schematicB.JPG
    22.8 KB · Views: 515
  • #3
well the block diagram isn't appearing for me, maybe it is for you
 
  • #4
Well I think I've come to the "Why" of my question, maybe someone could verify for me.

There's 10 outputs which can be either combinational or registered, but not both..So my design needed 9 flip-flops (2 of which would feed direct outputs), and 3 more combinational outputs, so I just had too many needs.

So am I just stuck with using more than one? It seems like most digital devices that do...a TON of stuff with very few of these...and I'm doing something that seems simple and small, yet I need 3 of them. What's up?
 
  • #5
Well I've changed my design around a bit to save some room in the GAL. The LEDs get taken care of outside the GAL (frees up 3 outputs/flip-flops), the mode switches are now a single switch (frees up a whole process of determining which mode it should be in...2 flip flops), took out the signals "Password_set" and "Password_attempted" and put in an output that will go to an LED to show that the password is set.

That totals to 3 ouputs, 3 flip-flops, and 8 inputs used...i think that leaves enough room to maybe do something else if I wanted (bigger password?).

I'll let you know how it goes just incase anyone is curious
 
  • #6
Yup, that fit on a single GAL...much better than using 3
 

1. What is VHDL and GAL?

VHDL (VHSIC Hardware Description Language) is a programming language used to describe digital and mixed-signal systems. GAL (Generic Array Logic) is a type of programmable logic device (PLD) used for implementing digital logic circuits.

2. Why do I need a VHDL guru and a GAL guru?

Hiring a VHDL guru and a GAL guru can be beneficial for designing and implementing complex digital systems using these languages. These experts have extensive knowledge and experience in VHDL and GAL, which can help ensure the success of your project.

3. What skills should a VHDL guru and a GAL guru have?

A good VHDL guru and GAL guru should have a strong understanding of digital logic design, experience with VHDL and GAL languages, knowledge of hardware description languages, and proficiency in using simulation and synthesis tools.

4. How can a VHDL guru and a GAL guru help with my project?

A VHDL guru and GAL guru can assist with designing and coding digital systems, testing and debugging code, optimizing designs for efficiency and performance, and providing guidance and expertise throughout the project development process.

5. Where can I find a VHDL guru and a GAL guru?

You can find VHDL and GAL experts through online job platforms, professional networking sites, or by reaching out to companies that specialize in digital system design and development. You can also consider hiring a freelance VHDL and GAL guru for your project.

Similar threads

  • Electrical Engineering
Replies
2
Views
27K
  • Electrical Engineering
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
5
Views
10K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
11K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
8K
  • Electrical Engineering
Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
5K
Back
Top