OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1200/] [rtl/] [verilog/] [or1200_alu.v] - Diff between revs 802 and 804

Show entire file | Details | Blame | View Log

Rev 802 Rev 804
Line 167... Line 167...
`endif
`endif
`endif
`endif
assign {cy_sum, result_sum} = (a + b_mux) + carry_in;
assign {cy_sum, result_sum} = (a + b_mux) + carry_in;
// Numbers either both +ve and bit 31 of result set
// Numbers either both +ve and bit 31 of result set
assign ov_sum = ((!a[width-1] & !b_mux[width-1]) & result_sum[width-1]) |
assign ov_sum = ((!a[width-1] & !b_mux[width-1]) & result_sum[width-1]) |
 
`ifdef OR1200_IMPL_SUB
 
                // Subtract larger negative from smaller positive
 
                ((!a[width-1] & b_mux[width-1]) & result_sum[width-1] &
 
                 alu_op==`OR1200_ALUOP_SUB) |
 
`endif
// or both -ve and bit 31 of result clear
// or both -ve and bit 31 of result clear
                ((a[width-1] & b_mux[width-1]) & !result_sum[width-1]);
                ((a[width-1] & b_mux[width-1]) & !result_sum[width-1]);
assign result_and = a & b;
assign result_and = a & b;
 
 
//
//

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.