0493774ワット発電中さん
2017/02/26(日) 07:37:36.28ID:xXmYr/+lassingn {dumy_cy, madd} = (maddx >= 13'd3600) ? maddx - 13'd3600 : maddx[12:0];
module add_out(run, phase, ct3600, madd);
input run;
input [11:0] phase;
input [11:0] ct3600;
output [11:0] madd;
reg [12:0] maddx;
wire dumy_cy;
assign madx = run ? {1'b0, phase} + {1'b0, ct3600}
: {1'b0, ct3600};
assign {dumy_cy, madd} = (maddx >= 13'd3600) ? maddx - 13'd3600 : maddx[12:0];
endmodule