I'm a relative Verilog noob, and stuck on the following, not sure if I'm structuring the problem wrongly or if it's just a case of bad coding. BTW, this is not homework, I'm 40 years too old to be involved
There is a mode register and a man/auto switch. There's also a second input called Pump. The mode follows the switch, which is trivial, in addition, on posedge of Pump, the mode has to transition to auto. Hence, edge triggering is required.
The applicable Verilog code is like this:
input Switch ; // man/auto switch input Pump ; reg Mode ;
always @ (posedge Switch) Mode