- 2
- 0
- 约1.55千字
- 约 4页
- 2026-06-29 发布于云南
- 举报
EDA基于VHDL语言的出租车计价器课程设计
vhdl
libraryIEEE;
useIEEE.STD_LOGIC_1164.ALL;
useIEEE.STD_LOGIC_ARITH.ALL;
useIEEE.STD_LOGIC_UNSIGNED.ALL;
entityFare_Calculatoris
Port(Clk:inSTD_LOGIC;
Rst:inSTD_LOGIC;
Start:inSTD_LOGIC;
Distance:inSTD_LOGIC_VECTOR(7downto0);--单位:0.1公里
Total_Fare:outSTD_LOGIC_VECTOR(11downto0));--单位:0.1元,例如123表示12.3元
endFare_Calculator;
architectureBehavioralofFare_Calculatoris
--计费参数常量定义(可根据实际情况修改)
constantBASE_FARE:integer:=100;--起步价10.0元(100*0.1元)
constantINITIAL_DISTANCE:integer:=30;--起步里程3.0公里(30*0.1公里)
constantDI
原创力文档

文档评论(0)