top.v 241 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
module top
(
 input x,
 input y,
 input cin,

 output A,
 output cout
 );

 wire pow,p,n;

`ifndef BUG
assign {cout,A} =  cin % y / x;

assign pow =  y ** x;

assign p =  +x;
assign n =  -x;
`else
assign {cout,A} =  2'bZZ;
`endif

endmodule