File: new_fp.c

package info (click to toggle)
fpgatools 0.0%2B201212-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,176 kB
  • sloc: ansic: 25,528; makefile: 284; sh: 119; awk: 75
file content (45 lines) | stat: -rw-r--r-- 855 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// Author: Wolfgang Spraul
//
// This is free and unencumbered software released into the public domain.
// For details see the UNLICENSE file at the root of the source tree.
//

#include "model.h"
#include "floorplan.h"

int main(int argc, char** argv)
{
	struct fpga_model model;
	int no_conns, rc;

	if ((rc = fpga_build_model(&model, XC6SLX9, TQG144)))
		goto fail;

	no_conns = 0;
	if (argc > 1 && !strcmp(argv[1], "--no-conns"))
		no_conns = 1;

	printf_version(stdout);

	rc = printf_tiles(stdout, &model);
	if (rc) goto fail;

	rc = printf_devices(stdout, &model, /*config_only*/ 0);
	if (rc) goto fail;

	rc = printf_ports(stdout, &model);
	if (rc) goto fail;

	if (!no_conns) {
		rc = printf_conns(stdout, &model);
		if (rc) goto fail;
	}

	rc = printf_switches(stdout, &model);
	if (rc) goto fail;

	return EXIT_SUCCESS;
fail:
	return rc;
}