地铁自动售票系统VHDL(8)

时间:2025-07-03

use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all;

entity subway is port( );

end subway;

architecture behave of subway is

begin

process(clk)

variable type_temp :std_logic;

--记录是否已选择出站口的变量 --记录是否已选择购票张数的变量

--记录票种的中间变量

type state_type is (initialize_state,select_state,insert_state,ticket_state,change_state);

--状态变量申明 --状态信号申明

clk

:in std_logic;

--系统时钟 --“开始选择”按钮 --“开始投币”按钮 --硬币入口 --纸币入口 --“取消”按钮 --出站口编号 --购票张数 --钱币“暂存杆” --购买的车票 --出票口 --找零口

select_start insert_start

:in std_logic; :in std_logic;

coin :in std_logic_vector(1 downto 0); note :in std_logic_vector(3 downto 0); cancel

:in std_logic;

ticket_stop :in std_logic_vector(3 downto 0);

ticket_account :in std_logic_vector(1 downto 0); money_gate :out std_logic_vector(1 downto 0); ticket_out ticket_gate

:out std_logic_vector(4 downto 0); :out std_logic;

change_gate :out std_logic

signal state:state_type;

variable account_temp :std_logic;

variable temp_type :std_logic_vector(4 downto 0);

variable temp_account :std_logic_vector(4 downto 0); --记录票数的中间变量 variable price :std_logic_vector(7 downto 0);

--记录单张票价的变量

地铁自动售票系统VHDL(8).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219