VHDL Newbie Stumped by Error 10380

  • Thread starter Steve198402
  • Start date
  • Tags
    Error
In summary, the conversation revolves around the confusion and error that the person is experiencing while working with VHDL code. They have tried various solutions but are stuck and their error message indicates the use of std_logic type without declaring it as an array type. The code they have provided shows the use of std_logic and std_logic_vector and the suggestion is made to use std_logic_vector for Y as well. The person also mentions that they are new to VHDL and are still learning.
  • #1
Steve198402
1
0
I'm super confused on why I keep getting an error on this code. I feel like I've tried everything but now I've run into mental block lol. My error message is:
Error (10380): VHDL error at lab2.vhd(6): std_logic type is used but not declared as an array type

Here is the code I came up with.
Code:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY lab2 IS
PORT(
  A: IN BIT_VECTOR (3 downto 0);
  Y: OUT STD_LOGIC (9 downto 0));
END lab2;
ARCHITECTURE CIRCUIT OF lab2 IS
BEGIN
WITH A SELECT
   Y<= "1111110" WHEN "0000",
     "0110000" WHEN "0001",
    "1101101" WHEN "0010",
    "1111001" WHEN "0011",
    "0110011" WHEN "0100",
    "1011011" WHEN "0101",
    "1011111" WHEN "0110",
    "1110000" WHEN "0111",
    "1111111" WHEN "1000",
    "1110011" WHEN "1001";

END CIRCUIT;
Mind you, I started on VHDL last week so I know there is a lot I still need to grasp for this language.
 
Last edited by a moderator:
Engineering news on Phys.org
  • #2
Steve198402 said:
std_logic

I inserted code tags for readability.

When you search Help for std_logic, what comes up?
 
  • #3
Just looking at it,
perhaps you should use
Y: OUT std_logic_vector(9 downto 0));
 
  • #4
Hello Steve,

std_logic is a signal or variable which contains one bit.
std_logic_vector is a sigal or variable which contains an array
you have to do the same for you Y (Y: OUT STD_LOGIC_VECTOR(9 downto 0)
 

1. What does "VHDL Newbie Stumped by Error 10380" mean?

"VHDL Newbie Stumped by Error 10380" is a common error message that is encountered by beginners in the field of VHDL programming. It indicates that there is an issue with the syntax or structure of the VHDL code, which is preventing the code from being successfully compiled.

2. What causes Error 10380 in VHDL?

Error 10380 is typically caused by a mistake in the VHDL code, such as a missing semicolon, incorrect use of keywords, or a mismatch in data types. It can also occur due to a problem with the VHDL compiler or simulator being used.

3. How can I fix Error 10380 in VHDL?

To fix Error 10380, carefully review your VHDL code and check for any syntax errors. Make sure all keywords and punctuation are used correctly, and that data types are properly declared and assigned. If the code appears to be correct, try using a different VHDL compiler or simulator to see if the error persists.

4. Are there any common mistakes that can lead to Error 10380 in VHDL?

Yes, some common mistakes that can result in Error 10380 include forgetting to use a semicolon at the end of a line, incorrectly declaring a signal or variable, and using the wrong data type in an assignment statement. It is important to carefully review your code for these types of errors.

5. Is there a way to prevent Error 10380 in VHDL?

While it is impossible to completely prevent errors in programming, there are some steps you can take to minimize the likelihood of encountering Error 10380 in VHDL. These include double-checking your code for syntax errors, using proper coding conventions, and testing your code regularly as you write it to catch any errors early on.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top