div.v
646 Bytes
module div(CLK, Reset_l, OpCode, OpCodeValid, VT, DivOut);
input CLK;
input Reset_l;
input [5:0] OpCode;
input OpCodeValid;
input [15:0] VT; // Scalar Value
output [15:0] DivOut;
/******************************************************/
wire [15:0] ROMData;
wire [9:0] RADDR;
wire ROMCLK;
div_rom udivrom(.clk(ROMCLK), .a(RADDR), .out(ROMData));
divctl udivctl(.CLK(CLK),
.Reset_l(Reset_l),
.OpCode(OpCode),
.OpCodeValid(OpCodeValid),
.VT(VT),
.ROMData(ROMData),
.RADDR(RADDR),
.DivOut(DivOut),
.ROMCLK(ROMCLK)
);
endmodule