ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
place_io.c File Reference
#include <stdlib.h>
#include <limits.h>
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include "place_base.h"
Include dependency graph for place_io.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void writeBookshelfNodes (const char *filename)
 
void writeBookshelfPl (const char *filename)
 
void writeBookshelf (const char *filename)
 

Function Documentation

◆ writeBookshelf()

void writeBookshelf ( const char * filename)

Definition at line 94 of file place_io.c.

94 {
95 writeBookshelfNodes("out.nodes");
96 writeBookshelfPl("out.pl");
97}
void writeBookshelfPl(const char *filename)
Definition place_io.c:66
ABC_NAMESPACE_IMPL_START void writeBookshelfNodes(const char *filename)
Definition place_io.c:26
Here is the call graph for this function:

◆ writeBookshelfNodes()

ABC_NAMESPACE_IMPL_START void writeBookshelfNodes ( const char * filename)

Definition at line 26 of file place_io.c.

26 {
27
28 int c = 0;
29 int numNodes, numTerms;
30
31 FILE *nodesFile = fopen(filename, "w");
32 if (!nodesFile) {
33 printf("ERROR: Could not open .nodes file\n");
34 exit(1);
35 }
36
37 numNodes = numTerms = 0;
38 for(c=0; c<g_place_numCells; c++) if (g_place_concreteCells[c]) {
39 numNodes++;
40 if (g_place_concreteCells[c]->m_parent->m_pad)
41 numTerms++;
42 }
43
44
45
46 fprintf(nodesFile, "UCLA nodes 1.0\n");
47 fprintf(nodesFile, "NumNodes : %d\n", numNodes);
48 fprintf(nodesFile, "NumTerminals : %d\n", numTerms);
49
50 for(c=0; c<g_place_numCells; c++) if (g_place_concreteCells[c]) {
51 fprintf(nodesFile, "CELL%d %f %f %s\n",
52 g_place_concreteCells[c]->m_id,
53 g_place_concreteCells[c]->m_parent->m_width,
54 g_place_concreteCells[c]->m_parent->m_height,
55 (g_place_concreteCells[c]->m_parent->m_pad ? " terminal" : ""));
56 }
57
58 fclose(nodesFile);
59}
char * filename
Definition globals.c:40
ConcreteCell ** g_place_concreteCells
Definition place_base.c:33
ABC_NAMESPACE_IMPL_START int g_place_numCells
Definition place_base.c:26
VOID_HACK exit()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeBookshelfPl()

void writeBookshelfPl ( const char * filename)

Definition at line 66 of file place_io.c.

66 {
67
68 int c = 0;
69
70 FILE *plFile = fopen(filename, "w");
71 if (!plFile) {
72 printf("ERROR: Could not open .pl file\n");
73 exit(1);
74 }
75
76 fprintf(plFile, "UCLA pl 1.0\n");
77 for(c=0; c<g_place_numCells; c++) if (g_place_concreteCells[c]) {
78 fprintf(plFile, "CELL%d %f %f : N %s\n",
79 g_place_concreteCells[c]->m_id,
82 (g_place_concreteCells[c]->m_fixed ? "\\FIXED" : ""));
83 }
84
85 fclose(plFile);
86
87}
Here is the call graph for this function:
Here is the caller graph for this function: