The following are the functions of this design, which can be added and modified. The code has detailed comments.
It is suitable for quartusII, vivado, ISE and other environments.
---File name: texi_all.vhd
---Function: Taxi meter
---Description: 10 yuan within three kilometers, 1.6 yuan for each additional kilometer thereafter, and 1.5 yuan for each minute after 2 minutes.
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
;
--enable signal; dina: in std_logic; --stop signal; dinb: in std_logic; --km pulse signal;
cs: out std_logic_vector(1 downto 0 );
shift: out std_logic_vector(3 downto 0);
switch: in std_logic_vector(3 downto 0); --The display mode of the digital tube;
dout: out std_logic_vector(7 downto 0));
end texi_all;
This project was created under vivado
The following is a screenshot of the project: