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 50
| module calctop(clk, reset, push, ce, plus, minus, mult, div, equal, switch, inverse, sign, ledh, ledg, ledf, lede, ledd, ledc, ledb, overflow, state, rega, regb, count, opr, game); input plus, minus, equal, ce, reset, clk; input mult, div, switch, inverse; input game; input [9:0] push; output overflow, sign; output [7:0] ledh, ledg, ledf, lede, ledd, ledc, ledb;
output [1:0] state; output [24:0] regb; output [24:0] rega; output [3:0] count; output [3:0] opr;
wire plusout, minusout, equalout, ceout; wire multout, divout; wire switchout, inverseout; wire [9:0] pushout; wire [24:0] wout;
calc calc(pushout, plusout, minusout, multout, divout, equalout, switchout, inverseout, clk, reset, ceout, sign, overflow, wout, state, rega, regb, count, opr, gameout);
binled binled(wout, ledh, ledg, ledf, lede, ledd, ledc, ledb);
syncro syncroce(ceout, ce, clk, reset); syncro syncropuls(plusout, plus, clk, reset); syncro syncrominus(minusout, minus, clk, reset); syncro syncroequal(equalout, equal, clk, reset); syncro syncromult(multout, mult, clk, reset); syncro syncrodiv(divout, div, clk, reset); syncro syncroswitch(switchout, switch, clk, reset); syncro syncroinverse(inverseout, inverse, clk, reset); syncro syncrogame(gameout, game, clk, reset); syncro10 syncropush(pushout, push, clk, reset);
endmodule
|