VHDL Newbie Stumped by Error 10380

  • Thread starter Thread starter Steve198402
  • Start date Start date
  • Tags Tags
    Error
Click For Summary

Discussion Overview

The discussion revolves around a VHDL coding error encountered by a beginner, specifically Error 10380, which relates to the use of the std_logic type. Participants explore the implications of this error and suggest potential corrections to the code.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses confusion regarding the error message related to std_logic not being declared as an array type and shares their VHDL code.
  • Another participant suggests checking the Help documentation for std_logic to understand its usage better.
  • A different participant proposes that the output type for Y should be changed to std_logic_vector instead of std_logic, indicating that std_logic is a single bit while std_logic_vector is an array.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the solution, but there is agreement on the need to use std_logic_vector for the output signal Y. The discussion reflects multiple viewpoints on how to address the error.

Contextual Notes

The discussion highlights the distinction between std_logic and std_logic_vector, but does not resolve the specific coding error or the implications of the proposed changes.

Who May Find This Useful

Newcomers to VHDL, educators teaching VHDL, and those troubleshooting similar coding errors in VHDL.

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)
 

Similar threads

Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K