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

Subversion Repositories idea

[/] [idea/] [trunk/] [structural_c/] [idea_machine/] [mul17.c] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 marta
/* File Name      : mul17.c                                       */
2
/* Description    : The 17x17 bit multiplier                      */
3
/* Date           : Aug 21, 2001                                  */
4
/* Version        : 1.1                                           */
5
/* Author         : Martadinata A.                                */
6
/* Adress         : VLSI RG, Dept. Electrical of Engineering ITB, */
7
/*                  Bandung, Indonesia                            */
8
/* E-mail         : marta@ic.vlsi.itb.ac.id                       */
9
 
10
#include <genlib.h>
11
 
12
main()
13
{
14
 int i;
15
 
16
 DEF_LOFIG ("mul17");
17
 
18
 LOCON ("a[16:0]", IN, "a[16:0]");
19
 LOCON ("b[16:0]", IN, "b[16:0]");
20
 LOCON ("sum[31:0]", OUT, "sum[31:0]");
21
 LOCON ("vdd", IN, "vdd");
22
 LOCON ("vss", IN, "vss");
23
 
24
 
25
 LOINS("leftshifter_glopg","lshifter", "a[16:0]",
26
                "b[15:0]", "r0[31:0]","r1[31:0]","r2[31:0]","r3[31:0]","r4[31:0]",
27
                "r5[31:0]","r6[31:0]","r7[31:0]","r8[31:0]","r9[31:0]","r10[31:0]",
28
                "r11[31:0]","r12[31:0]","r13[31:0]","r14[31:0]","r15[31:0]","r16[31:0]",
29
                "vdd", "vss", 0);
30
 
31
 for(i=0;i<=31;i++)
32
    LOINS ("zero_x0", NAME("zero%d",i), NAME("o_zero[%d]",i), "vdd", "vss", 0);
33
 
34
 LOINS ("m32adder_glopg", "m32add_1", "o_zero[31:0]", "r0[31:0]", "sum1[31:0]", "vdd", "vss", 0);
35
 
36
 for (i = 2; i <= 17; i++)
37
    LOINS("m32adder_glopg", NAME("m32add_%d", i), NAME("sum%d[31:0]", i-1),
38
                NAME("r%d[31:0]", i-1), NAME("sum%d[31:0]", i), "vdd", "vss", 0);
39
 
40
 for (i = 0; i <=31 ;i++)
41
    LOINS ("o2_x2", NAME("or2_%d",i),"b[16]",NAME("sum17[%d]",i),NAME("sum[%d]",i),
42
    "vdd", "vss", 0);
43
 SAVE_LOFIG();
44
 exit(0);
45
}

powered by: WebSVN 2.1.0

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