匚诲电力学院
课程设计报告
课程设计名称: FPGA设计实践课程
设计课题名称: 出租车计费器
班级: 2008141 指导老师: 赵倩
姓名: 丁晓亮 学号: 20082614
成绩:设计时间:2011-6-27~1") then --路程超过 30 (3000M)
if (luf3<"0010") then --路费低于 20 元
if (luf1="1000" and luf0<="0110") then luf0<=luf0+"0010"; luf1<=〃0000〃;c1:=T'; elsif(luf1="1000” and luf0="1000") then luf0<=〃0000〃;luf1<=〃0001〃;c1:=T'; elsif(luf1="0111" and luf0="1000") then luf0<=〃0000〃;luf1<=〃0000〃;c1:=T'; elsif(luf1="1001" and luf0<="0110") then luf0<=luf0+〃0010〃;luf1<=〃0001〃;c1:=T'; elsif(luf1="1001" and luf0="1000") then luf0<=〃0000〃;luf1<=〃0010〃;c1:=T'; elsif(luf1<"0111" and luf0="1000") then luf0<=〃0000〃;luf1<=luf1+〃0011〃;c1:='0‘; else luf0<=luf0+〃0010〃;luf1<=luf1+〃0010〃;c1:='0‘; end if;
else --路费大于20元
if (luf0<="0110" and luf1="0111") then luf0<=luf0+〃0011〃;luf1<=〃0000〃;c1:=T'; elsif(luf0<="0110" and luf1="1000") then luf0<=luf0+〃0011〃;luf1<=〃0001〃;c1:=T'; elsif(luf0<="0110" and luf1="1001") then luf0<=luf0+〃0011〃;luf1<=〃0010〃;c1:=T'; elsif(luf0="0111" and luf1<="0101") then luf0<="0000" ; luf1<=luf1+〃0100〃;c1:='0‘; elsif(luf0="0111" and luf1="0110") then luf0<="0000" ;luf1<=〃0000〃;c1:=T'; elsif(luf0="0111" and luf1="0111") then luf0<="0000" ;luf1<=〃0001〃;c1:=T'; elsif(luf0="0111" and luf1="1000") then luf0<="0000" ; luf1<=〃0010〃;c1:=T'; elsif(luf0="0111" and luf1="1001") then luf0<="0000" ; luf1<=〃0011〃;c1:=T'; elsif(luf0="1000" and luf1<="0101") then luf0<="0001" ; lu
出租车计费器 来自淘豆网m.daumloan.com转载请标明出处.