An automobile controller receives several sensor inputs from various engine systems. Four of the sensors are: Coolant Temperature (CT) that outputs a “1” when the coolant temperature exceeds 200 degrees; Coolant Low (CL) that outputs a “1” when the coolant level falls below 60% of capacity; Oil Temperature (OT) that outputs a “1” when the oil temperature exceeds 180 degrees, and Oil Low (OL) that outputs a “1” when the oil level falls below 75% capacity. Design and implement a warning light system that: 1) illuminates a yellow light whenever the Coolant or Oil levels are low by themselves, or when the Oil Temperature is too high and the Oil Level is OK, or when the Coolant Temperature is too high and the Oil Level to too low; and 2) illuminates a Red light (in the same LED package) whenever the Coolant temperature is too high and the Coolant level is too low, or when the Oil Temperature is too high and the Oil Level is too low, or when the Coolant and Oil Temperatures are too high at the same time, or when the Coolant and Oil levels are too low at the same time the Coolant Temperature is too high and the Oil Level is OK.
Create a Verilog description of a circuit that meets these requirements, and implement the circuit on your Blackboard. Use four slide switches for the sensor inputs and a single 3-color LED for outputs.
// Four sensor of automobile
// sensor 1 CT = 1 : coolant Temp>200
// sensor 2 CL = 1: coolant Capacity <60%
// sensor 3 OT = 1: Oil Temp > 180
// sensor 4 OL = 1: Oil capacity < 75%
module automobile controller (ct,cl,ot,ol,red,yellow);
input ct,cl,ot,ol;
output reg red, yellow;
always @(*)
begin
if (cl == 1 || ol == 1 || (ot == 1 && ol == 0) || (ct == 1 && ol == 1) )
yellow = 1;
else yellow = 0;
if ((cl==1 && cl==1 ) || (ot == 1 && ol == 1) || (ct == 1 && ot == 1) || (cl == 1 && ol == 1) || (ct== 1 && ol ==0))
red = 1;
else red =0;
end
endmodule
Get Answers For Free
Most questions answered within 1 hours.