OpenCores
URL https://opencores.org/ocsvn/8bit_vedic_multiplier/8bit_vedic_multiplier/trunk

Subversion Repositories 8bit_vedic_multiplier

[/] [8bit_vedic_multiplier/] [trunk/] [rtl/] [vedic2x2.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 DragonStar
module vedic2x2(input [1:0] a,b, output [3:0] prod);
2
 
3
        wire a1b1 = a[1] & b[1];
4
        wire a0b1 = a[0] & b[1];
5
        wire a1b0 = a[1] & b[0];
6
        wire a0b0 = a[0] & b[0];
7
        wire carry;
8
 
9
        assign prod[0] = a0b0;
10
 
11
        half_adder HA0(a0b1,a1b0,prod[1],carry);
12
        half_adder HA1(a1b1,carry,prod[2],prod[3]);
13
 
14
endmodule

powered by: WebSVN 2.1.0

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