URL
https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk
[/] [xulalx25soc/] [trunk/] [rtl/] [cpu/] [cpuops.v] - Diff between revs 21 and 46
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 21 |
Rev 46 |
Line 94... |
Line 94... |
// A 4-way multiplexer can be done in one 6-LUT.
|
// A 4-way multiplexer can be done in one 6-LUT.
|
// A 16-way multiplexer can therefore be done in 4x 6-LUT's with
|
// A 16-way multiplexer can therefore be done in 4x 6-LUT's with
|
// the Xilinx multiplexer fabric that follows.
|
// the Xilinx multiplexer fabric that follows.
|
// Given that we wish to apply this multiplexer approach to 33-bits,
|
// Given that we wish to apply this multiplexer approach to 33-bits,
|
// this will cost a minimum of 132 6-LUTs.
|
// this will cost a minimum of 132 6-LUTs.
|
|
wire w_illegal;
|
generate
|
generate
|
if (IMPLEMENT_MPY == 0)
|
if (IMPLEMENT_MPY == 0)
|
begin
|
begin
|
always @(posedge i_clk)
|
always @(posedge i_clk)
|
if (i_ce)
|
if (i_ce)
|
Line 124... |
Line 125... |
endcase
|
endcase
|
end
|
end
|
|
|
assign o_busy = 1'b0;
|
assign o_busy = 1'b0;
|
|
|
|
assign w_illegal = (i_ce)&&((i_op == 4'h3)||(i_op == 4'h4));
|
reg r_illegal;
|
reg r_illegal;
|
always @(posedge i_clk)
|
always @(posedge i_clk)
|
r_illegal <= (i_ce)&&((i_op == 4'h3)||(i_op == 4'h4));
|
r_illegal <= w_illegal;
|
assign o_illegal = r_illegal;
|
assign o_illegal = r_illegal;
|
end else begin
|
end else begin
|
//
|
//
|
// Multiply pre-logic
|
// Multiply pre-logic
|
//
|
//
|
Line 179... |
Line 181... |
r_busy <= (~i_rst)&&(i_ce)&&(i_valid)
|
r_busy <= (~i_rst)&&(i_ce)&&(i_valid)
|
&&(i_op[3:1] == 3'h5);
|
&&(i_op[3:1] == 3'h5);
|
|
|
assign o_busy = r_busy;
|
assign o_busy = r_busy;
|
|
|
|
assign w_illegal = 1'b0;
|
assign o_illegal = 1'b0;
|
assign o_illegal = 1'b0;
|
end endgenerate
|
end endgenerate
|
|
|
assign z = (o_c == 32'h0000);
|
assign z = (o_c == 32'h0000);
|
assign n = (o_c[31]);
|
assign n = (o_c[31]);
|
Line 193... |
Line 196... |
initial o_valid = 1'b0;
|
initial o_valid = 1'b0;
|
always @(posedge i_clk)
|
always @(posedge i_clk)
|
if (i_rst)
|
if (i_rst)
|
o_valid <= 1'b0;
|
o_valid <= 1'b0;
|
else
|
else
|
o_valid <= (i_ce)&&(i_valid)&&(i_op[3:1] != 3'h5)
|
o_valid <= (i_ce)&&(i_valid)&&(i_op[3:1] != 3'h5)&&(~w_illegal)
|
||(o_busy);
|
||(o_busy);
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.