VHDL Newbie Stumped by Error 10380

  • Thread starter Thread starter Steve198402
  • Start date Start date
  • Tags Tags
    Error
AI Thread Summary
The user is encountering Error 10380 in their VHDL code, which indicates that the std_logic type is incorrectly used as an array type. The code defines an output Y as STD_LOGIC (9 downto 0), but it should be declared as STD_LOGIC_VECTOR (9 downto 0) to represent an array. The discussion highlights the user's confusion as a beginner in VHDL and their attempts to resolve the issue. The suggested solution emphasizes the need to correctly define Y as an array type. Understanding the distinction between std_logic and std_logic_vector is crucial for resolving this error.
Steve198402
Messages
1
Reaction score
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
Steve198402 said:
std_logic

I inserted code tags for readability.

When you search Help for std_logic, what comes up?
 
Just looking at it,
perhaps you should use
Y: OUT std_logic_vector(9 downto 0));
 
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)
 
Thread 'I need a concave mirror with a focal length length of 150 feet'
I need to cut down a 3 year old dead tree from top down so tree causes no damage with small pieces falling. I need a mirror with a focal length of 150 ft. 12" diameter to 36" diameter will work good but I can't think of any easy way to build it. Nothing like this for sale on Ebay. I have a 30" Fresnel lens that I use to burn stumps it works great. Tree service wants $2000.
Hi all, i have some questions about the tesla turbine: is a tesla turbine more efficient than a steam engine or a stirling engine ? about the discs of the tesla turbine warping because of the high speed rotations; does running the engine on a lower speed solve that or will the discs warp anyway after time ? what is the difference in efficiency between the tesla turbine running at high speed and running it at a lower speed ( as fast as possible but low enough to not warp de discs) and: i...
Back
Top