minor cleanup
This commit is contained in:
parent
3487a8ad7b
commit
86dc27efd5
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -27,4 +27,6 @@ autotest.o
|
|||
bits.o
|
||||
fp2bit
|
||||
fp2bit.o
|
||||
bit2fp
|
||||
bit2fp.o
|
||||
autotest.tmp/
|
||||
|
|
16
Makefile
16
Makefile
|
@ -17,20 +17,25 @@ LDLIBS += `pkg-config libxml-2.0 --libs`
|
|||
|
||||
MODEL_OBJ = model_main.o model_tiles.o model_devices.o model_ports.o model_conns.o model_switches.o model_helper.o
|
||||
|
||||
all: autotest bit2txt draw_svg_tiles new_fp fp2bit hstrrep sort_seq merge_seq
|
||||
all: new_fp fp2bit bit2fp draw_svg_tiles \
|
||||
autotest bit2txt hstrrep sort_seq merge_seq pair2net
|
||||
|
||||
autotest: autotest.o $(MODEL_OBJ) floorplan.o control.o helper.o model.h
|
||||
|
||||
autotest.c: model.h floorplan.h control.h
|
||||
|
||||
new_fp: new_fp.o $(MODEL_OBJ) floorplan.o helper.o
|
||||
new_fp: new_fp.o $(MODEL_OBJ) floorplan.o helper.o control.o
|
||||
|
||||
new_fp.o: new_fp.c floorplan.h model.h helper.h
|
||||
new_fp.o: new_fp.c floorplan.h model.h helper.h control.h
|
||||
|
||||
fp2bit: fp2bit.o $(MODEL_OBJ) floorplan.o control.o bits.o helper.o
|
||||
|
||||
fp2bit.o: fp2bit.c model.h floorplan.h bits.h helper.h
|
||||
|
||||
bit2fp: bit2fp.o $(MODEL_OBJ) floorplan.o control.o bits.o helper.o
|
||||
|
||||
bit2fp.o: bit2fp.c model.h floorplan.h bits.h helper.h
|
||||
|
||||
floorplan.o: floorplan.c floorplan.h model.h control.h
|
||||
|
||||
bits.o: bits.c bits.h model.h
|
||||
|
@ -124,7 +129,10 @@ clean:
|
|||
helper.o $(MODEL_OBJ) hstrrep hstrrep.o \
|
||||
sort_seq sort_seq.o \
|
||||
merge_seq merge_seq.o \
|
||||
autotest.o control.o floorplan.o \
|
||||
autotest autotest.o control.o floorplan.o \
|
||||
fp2bit fp2bit.o \
|
||||
bit2fp bit2fp.o \
|
||||
pair2net pair2net.o \
|
||||
xc6slx9_empty.fp xc6slx9.svg \
|
||||
xc6slx9_empty.tiles xc6slx9_empty.devs xc6slx9_empty.conns \
|
||||
xc6slx9_empty.ports xc6slx9_empty.sw xc6slx9_empty.nets \
|
||||
|
|
13
README
13
README
|
@ -14,14 +14,19 @@ Libraries
|
|||
- libfpga-bits reads and writes .bit bitstream files
|
||||
- libfpga-floorplan reads and writes .fp floorplan files
|
||||
- libfpga-control programmatic access to libfpga-model
|
||||
- libfpga-design larger design elements on top of libfpga-control
|
||||
- libfpga-test test harness for libfpga-model and libfpga-control
|
||||
|
||||
Utilities
|
||||
Design Utilities
|
||||
|
||||
- new_fp creates empty .fp floorplan file
|
||||
- fp2bit converts .fp floorplan into .bit bitstream
|
||||
- bit2fp converts .bit bitstream into .fp floorplan
|
||||
- draw_svg_tiles draws a simple .svg showing tile types
|
||||
|
||||
fpgatools Development Utilities
|
||||
|
||||
- autotest executes test suite
|
||||
- new_fp creates empty .fp floorplan file
|
||||
- draw_svg_tiles draws a simple .svg showing tile types
|
||||
- fp2bit converts .fp floorplan into .bit bitstream
|
||||
- bit2txt dumps .bit bitstream as text
|
||||
- hstrrep high-speed hashed array based search and replace util
|
||||
- sort_seq sorts line-based text file by sequence numbers in strings
|
||||
|
|
5
bits.c
5
bits.c
|
@ -8,6 +8,11 @@
|
|||
#include "model.h"
|
||||
#include "bits.h"
|
||||
|
||||
int read_bits(struct fpga_model* model, FILE* f)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_bits(FILE* f, struct fpga_model* model)
|
||||
{
|
||||
return 0;
|
||||
|
|
1
bits.h
1
bits.h
|
@ -5,4 +5,5 @@
|
|||
// For details see the UNLICENSE file at the root of the source tree.
|
||||
//
|
||||
|
||||
int read_bits(struct fpga_model* model, FILE* f);
|
||||
int write_bits(FILE* f, struct fpga_model* model);
|
||||
|
|
|
@ -757,3 +757,8 @@ next_line: ;
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_floorplan(FILE* f, struct fpga_model* model)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
|
||||
int read_floorplan(struct fpga_model* model, FILE* f);
|
||||
int write_floorplan(FILE* f, struct fpga_model* model);
|
||||
|
||||
void printf_version(FILE* f);
|
||||
int printf_tiles(FILE* f, struct fpga_model* model);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#define ALLOC_INCREMENT 16
|
||||
|
||||
int add_entry(uint32_t** net, uint32_t new_idx)
|
||||
static int add_entry(uint32_t** net, uint32_t new_idx)
|
||||
{
|
||||
if (!*net) {
|
||||
*net = malloc(ALLOC_INCREMENT*sizeof(**net));
|
||||
|
@ -44,7 +44,7 @@ int add_entry(uint32_t** net, uint32_t new_idx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int print_nets(uint32_t** nets, struct hashed_strarray* connpt_names)
|
||||
static int print_nets(uint32_t** nets, struct hashed_strarray* connpt_names)
|
||||
{
|
||||
int i, j, num_connpoints, num_nets, largest_net, total_net_connpoints;
|
||||
const char* str;
|
||||
|
@ -82,7 +82,7 @@ int print_nets(uint32_t** nets, struct hashed_strarray* connpt_names)
|
|||
|
||||
struct hashed_strarray* g_sort_connpt_names;
|
||||
|
||||
int sort_net(const void* a, const void* b)
|
||||
static int sort_net(const void* a, const void* b)
|
||||
{
|
||||
const uint32_t* _a, *_b;
|
||||
const char* a_str, *b_str;
|
||||
|
@ -99,7 +99,7 @@ int sort_net(const void* a, const void* b)
|
|||
return strcmp(a_str, b_str);
|
||||
}
|
||||
|
||||
int sort_nets(uint32_t** nets, struct hashed_strarray* connpt_names)
|
||||
static int sort_nets(uint32_t** nets, struct hashed_strarray* connpt_names)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user