kapaa
Newbie level 4
I want to design module in which outputs are sequential and are displayed with the interval of count of the counter. for example: if count is from 1 to 5, we are getting y0, y1,y2,y7 & y10 as output in the flow, and when count is from 2 to 9 we get y15 as output and y0, y1,y2,y7 & y10 = low or '0' Under is the code that I framed, but I am getting errors, I am not sure how to frame the correct module for the same, as I just started using Verilog.
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 module stage_1 (x0, clock_1, reset_1, y0, y1, y2, y3, y5, y7, y10, y15 ); input x0; // input value from the proximity sensor input clock_1; input reset_1; output y0; // output of a pin connected to the close function of the mold output y1; // output of a pin connected to the chain function of the mold output y2; // output of a pin connected to the slide function of the mold output y3; // output of a pin connected to the fill function of material in mold output y5; // output of a pin connected to the boost function of material in mold output y7; // output of a pin connected to the water drain function of the mold output y10; // output of a pin connected to the top heat function of the mold output y15; // output of a pin connected to the vacuum function of the mold reg count; always @(posedge clock_1 or posedge reset_1) begin if (reset_1) begin count<=count+1; end else begin if (x0);strong text if (count >= 1); begin y0; end if (count >=2); begin y1; end if (count >=3); begin y2; end if (count >=4); begin y7; end if (count ==5); begin y10; end end end endmodule
Last edited by a moderator: