VHDL设计出租车计价器

下面是本设计功能,功能可以增添修改。代码有详细注释。

适用于quartusII、vivado、ISE等环境。

---文件名:           texi_all.vhd
---功  能:          出租车计价器
---说  明:          三公里以内10元,以后每增加一公里加1.6元,2分钟以后每停一分钟加1.5元。         
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity texi_all is
    Port (clk : in std_logic;
        start : in std_logic;  --使能信号;
         dina  : in std_logic;    --停车信号;
        dinb  : in std_logic;  --公里脉冲信号;
        cs    : out std_logic_vector(1 downto 0);
        shift : out std_logic_vector(3 downto 0);
         switch : in std_logic_vector(3 downto 0);  --数码管的显示模式;
        dout  : out std_logic_vector(7 downto 0));
end texi_all;
 

本工程创建于vivado下

下面是工程截图:

猜你喜欢

转载自blog.csdn.net/QQ_778132974/article/details/115055678