Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL code modification help!

Status
Not open for further replies.

wallywall

Newbie level 3
Joined
Apr 3, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
hello, i wrote a code to convert bcd to 7 segment. i want to simulate my code in TINA but when the block diagram is displayed, it only has 1 input and 1 output instead of 4 inputs and 7 ouputs, i know this is because i used logic vectors but how do i modify my code so that the block diagram shows the 4 inputs and 7 outputs? my code is below


Code:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY BCD IS
PORT (
          bcd : In STD_LOGIC_VECTOR (3 DOWNTO 0);
          sevenseg   : OUT STD_LOGIC_VECTOR ( 1 TO 7));
END BCD;

ARCHITECTURE Behavior OF BCD IS
BEGIN
	PROCESS (bcd)
	BEGIN
		CASE bcd IS				   --abcdefg
			 When "0000" => sevenseg <= "0000001";
			 When "0001" => sevenseg <= "1001111";
			 When "0010" => sevenseg <= "0010010";
                                       When "0011" => sevenseg <= "0000110";
			 When "0100" => sevenseg <= "1001100";
			 When "0101" => sevenseg <= "0100100";
			 When "0110" => sevenseg <= "0100000";
			 When "0111" => sevenseg <= "0001111";
			 When "1000" => sevenseg <= "0000000";
			 When "1001" => sevenseg <= "0001100";
			 When OTHERS => sevenseg <= "1111111"; --NOTHING SHOWING
END CASE;
END PROCESS;
END BEHAVIOR;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top