ttl-fpga/sw/kousaten/src/main.c

37 lines
674 B
C

#include <stdio.h>
#include "fpga_cell.h"
#include "fpga_fdef_loader.h"
#include "fpga_global.h"
#include "fpga.h"
#define E_FDEF 1
#define E_BITSTREAM 2
int development_test_main(int argc, char *argv[])
{
struct fpga_cell *entry_cell;
set_log_level(LL_DEBUG);
entry_cell = fpga_fdef_loader_load("fdef/4x4.fdef");
if (!entry_cell) {
report(LL_CRITICAL, "Error loading FDEF.");
return E_FDEF;
}
report(LL_INFO, "FDEF loaded.");
if (!fpga_isp_chain_new(entry_cell)) {
report(LL_CRITICAL, "Critical error during bitstream generation.");
return E_BITSTREAM;
}
return 0;
}
int main(int argc, char *argv[])
{
return development_test_main(argc, argv);
}