ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
map.c File Reference
#include "espresso.h"
Include dependency graph for map.c:

Go to the source code of this file.

Macros

#define POWER2(n)
 

Functions

pset minterms (pcover T)
 
void explode (int var, int z)
 
void map (pcover T)
 

Macro Definition Documentation

◆ POWER2

#define POWER2 ( n)
Value:
(1 << n)

Definition at line 74 of file map.c.

Function Documentation

◆ explode()

void explode ( int var,
int z )

Definition at line 36 of file map.c.

38{
39 int i, last = cube.last_part[var];
40 for(i=cube.first_part[var], z *= cube.part_size[var]; i<=last; i++, z++)
41 if (is_in_set(Gcube, i))
42 {
43 if (var == 0)
44 set_insert(Gminterm, z);
45 else
46 explode(var-1, z);
47 }
48}
void explode()
#define is_in_set(set, e)
Definition espresso.h:170
#define set_insert(set, e)
Definition espresso.h:172
unsigned short var
Definition giaNewBdd.h:35
Definition exor.h:123
Here is the call graph for this function:

◆ map()

void map ( pcover T)

Definition at line 75 of file map.c.

77{
78 int j, k, l, other_input_offset, output_offset, outnum, ind;
79 int largest_input_ind, numout;
80 char c;
81 pset m;
82 bool some_output;
83
84 m = minterms(T);
85 largest_input_ind = POWER2(cube.num_binary_vars);
86 numout = cube.part_size[cube.num_vars-1];
87
88 for(outnum = 0; outnum < numout; outnum++) {
89 output_offset = outnum * largest_input_ind;
90 printf("\n\nOutput space # %d\n", outnum);
91 for(l = 0; l <= MAX(cube.num_binary_vars - 8, 0); l++) {
92 other_input_offset = l * 256;
93 for(k = 0; k < 16; k++) {
94 some_output = FALSE;
95 for(j = 0; j < 16; j++) {
96 ind = mapindex[k][j] + other_input_offset;
97 if (ind < largest_input_ind) {
98 c = is_in_set(m, ind+output_offset) ? '1' : '.';
99 putchar(c);
100 some_output = TRUE;
101 }
102 if ((j+1)%4 == 0)
103 putchar(' ');
104 if ((j+1)%8 == 0)
105 printf(" ");
106 }
107 if (some_output)
108 putchar('\n');
109 if ((k+1)%4 == 0) {
110 if (k != 15 && mapindex[k+1][0] >= largest_input_ind)
111 break;
112 putchar('\n');
113 }
114 if ((k+1)%8 == 0)
115 putchar('\n');
116 }
117 }
118 }
119 set_free(m);
120}
#define TRUE
Definition abcBm.c:38
#define FALSE
Definition abcBm.c:37
#define MAX(a, b)
Definition avl.h:23
#define set_free(r)
Definition espresso.h:167
pset minterms()
unsigned int * pset
Definition espresso.h:73
#define POWER2(n)
Definition map.c:74
Here is the call graph for this function:

◆ minterms()

pset minterms ( pcover T)

Definition at line 18 of file map.c.

20{
21 int size, var;
22 register pcube last;
23
24 size = 1;
25 for(var = 0; var < cube.num_vars; var++)
26 size *= cube.part_size[var];
27 Gminterm = set_new(size);
28
29 foreach_set(T, last, Gcube)
30 explode(cube.num_vars-1, 0);
31
32 return Gminterm;
33}
#define set_new(size)
Definition espresso.h:164
#define pcube
Definition espresso.h:261
#define foreach_set(R, last, p)
Definition espresso.h:135
unsigned long long size
Definition giaNewBdd.h:39
Here is the call graph for this function: