clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
656bfdb819
commit
4111cc25d6
@ -20,8 +20,8 @@
|
||||
#include "mainwindow.h"
|
||||
#include <fstream>
|
||||
#include "bitstream.h"
|
||||
#include "log.h"
|
||||
#include "embed.h"
|
||||
#include "log.h"
|
||||
#include "machxo2_available.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
@ -49,7 +49,8 @@ MainWindow::~MainWindow() {}
|
||||
|
||||
void MainWindow::newContext(Context *ctx)
|
||||
{
|
||||
std::string title = "nextpnr-machxo2 - " + std::string(ctx->device_name) + " (" + std::string(ctx->package_name) + ") - Part : " + ctx->getChipName();
|
||||
std::string title = "nextpnr-machxo2 - " + std::string(ctx->device_name) + " (" + std::string(ctx->package_name) +
|
||||
") - Part : " + ctx->getChipName();
|
||||
setWindowTitle(title.c_str());
|
||||
}
|
||||
|
||||
@ -84,7 +85,7 @@ void MainWindow::new_proj()
|
||||
|
||||
std::stringstream ss(available_devices);
|
||||
std::string name;
|
||||
while(getline(ss, name, ';')){
|
||||
while (getline(ss, name, ';')) {
|
||||
std::string chipdb = stringf("machxo2/chipdb-%s.bin", name.c_str());
|
||||
auto db_ptr = reinterpret_cast<const RelPtr<ChipInfoPOD> *>(get_chipdb(chipdb));
|
||||
if (!db_ptr)
|
||||
@ -93,7 +94,8 @@ void MainWindow::new_proj()
|
||||
for (auto &pkg : chip.packages) {
|
||||
for (auto &speedgrade : chip.speed_grades) {
|
||||
for (auto &rating : chip.suffixes) {
|
||||
std::string devname = stringf("%s-%d%s%s", chip.name.get(), speedgrade.speed, pkg.short_name.get(), rating.suffix.get());
|
||||
std::string devname = stringf("%s-%d%s%s", chip.name.get(), speedgrade.speed,
|
||||
pkg.short_name.get(), rating.suffix.get());
|
||||
arch.append(QString::fromLocal8Bit(devname.c_str()));
|
||||
}
|
||||
}
|
||||
@ -105,7 +107,8 @@ void MainWindow::new_proj()
|
||||
QString item = QInputDialog::getItem(this, "Select new context", "Part:", arch, 0, false, &ok);
|
||||
if (ok && !item.isEmpty()) {
|
||||
ArchArgs chipArgs;
|
||||
chipArgs.device = item.toUtf8().constData();;
|
||||
chipArgs.device = item.toUtf8().constData();
|
||||
;
|
||||
|
||||
handler->clear();
|
||||
currentProj = "";
|
||||
|
@ -22,13 +22,13 @@
|
||||
#include <math.h>
|
||||
#include "embed.h"
|
||||
#include "gfx.h"
|
||||
#include "machxo2_available.h"
|
||||
#include "nextpnr.h"
|
||||
#include "placer1.h"
|
||||
#include "placer_heap.h"
|
||||
#include "router1.h"
|
||||
#include "router2.h"
|
||||
#include "util.h"
|
||||
#include "machxo2_available.h"
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
@ -45,11 +45,12 @@ void IdString::initialize_arch(const BaseCtx *ctx)
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
static void get_chip_info(std::string device, const ChipInfoPOD **chip_info, const PackageInfoPOD **package_info, const char **device_name, const char **package_name)
|
||||
static void get_chip_info(std::string device, const ChipInfoPOD **chip_info, const PackageInfoPOD **package_info,
|
||||
const char **device_name, const char **package_name)
|
||||
{
|
||||
std::stringstream ss(available_devices);
|
||||
std::string name;
|
||||
while(getline(ss, name, ';')){
|
||||
while (getline(ss, name, ';')) {
|
||||
std::string chipdb = stringf("machxo2/chipdb-%s.bin", name.c_str());
|
||||
auto db_ptr = reinterpret_cast<const RelPtr<ChipInfoPOD> *>(get_chipdb(chipdb));
|
||||
if (!db_ptr)
|
||||
@ -58,7 +59,8 @@ static void get_chip_info(std::string device, const ChipInfoPOD **chip_info, con
|
||||
for (auto &pkg : chip.packages) {
|
||||
for (auto &speedgrade : chip.speed_grades) {
|
||||
for (auto &rating : chip.suffixes) {
|
||||
std::string devname = stringf("%s-%d%s%s", chip.name.get(), speedgrade.speed, pkg.short_name.get(), rating.suffix.get());
|
||||
std::string devname = stringf("%s-%d%s%s", chip.name.get(), speedgrade.speed,
|
||||
pkg.short_name.get(), rating.suffix.get());
|
||||
if (device == devname) {
|
||||
*chip_info = db_ptr->get();
|
||||
*package_info = nullptr;
|
||||
@ -118,7 +120,7 @@ void Arch::list_devices()
|
||||
log("Supported devices: \n");
|
||||
std::stringstream ss(available_devices);
|
||||
std::string name;
|
||||
while(getline(ss, name, ';')){
|
||||
while (getline(ss, name, ';')) {
|
||||
std::string chipdb = stringf("machxo2/chipdb-%s.bin", name.c_str());
|
||||
auto db_ptr = reinterpret_cast<const RelPtr<ChipInfoPOD> *>(get_chipdb(chipdb));
|
||||
if (!db_ptr)
|
||||
@ -127,7 +129,8 @@ void Arch::list_devices()
|
||||
for (auto &pkg : chip.packages) {
|
||||
for (auto &speedgrade : chip.speed_grades) {
|
||||
for (auto &rating : chip.suffixes) {
|
||||
log(" %s-%d%s%s\n", chip.name.get(), speedgrade.speed, pkg.short_name.get(), rating.suffix.get());
|
||||
log(" %s-%d%s%s\n", chip.name.get(), speedgrade.speed, pkg.short_name.get(),
|
||||
rating.suffix.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -428,8 +431,8 @@ std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decal) const
|
||||
GfxTileWireId src_id = GfxTileWireId(tile_info(src_wire)->wire_data[src_wire.index].tile_wire);
|
||||
GfxTileWireId dst_id = GfxTileWireId(tile_info(dst_wire)->wire_data[dst_wire.index].tile_wire);
|
||||
GraphicElement::style_t style = decal.active ? GraphicElement::STYLE_ACTIVE : GraphicElement::STYLE_HIDDEN;
|
||||
gfxTilePip(ret, x, chip_info->height - y - 1, chip_info->width, chip_info->height, src_wire, getWireType(src_wire), src_id, dst_wire,
|
||||
getWireType(dst_wire), dst_id, style);
|
||||
gfxTilePip(ret, x, chip_info->height - y - 1, chip_info->width, chip_info->height, src_wire,
|
||||
getWireType(src_wire), src_id, dst_wire, getWireType(dst_wire), dst_id, style);
|
||||
} else if (decal.type == DecalId::TYPE_BEL) {
|
||||
BelId bel;
|
||||
bel.index = decal.z;
|
||||
|
@ -129,13 +129,9 @@ NPNR_PACKED_STRUCT(struct PackageSupportedPOD {
|
||||
RelPtr<char> short_name;
|
||||
});
|
||||
|
||||
NPNR_PACKED_STRUCT(struct SuffixeSupportedPOD {
|
||||
RelPtr<char> suffix;
|
||||
});
|
||||
NPNR_PACKED_STRUCT(struct SuffixeSupportedPOD { RelPtr<char> suffix; });
|
||||
|
||||
NPNR_PACKED_STRUCT(struct SpeedSupportedPOD {
|
||||
int32_t speed;
|
||||
});
|
||||
NPNR_PACKED_STRUCT(struct SpeedSupportedPOD { int32_t speed; });
|
||||
|
||||
NPNR_PACKED_STRUCT(struct VariantInfoPOD {
|
||||
RelPtr<char> name;
|
||||
|
@ -195,7 +195,7 @@ void write_bitstream(Context *ctx, std::string text_config_file)
|
||||
{
|
||||
ChipConfig cc;
|
||||
IdString base_id = ctx->id(ctx->chip_info->device_name.get());
|
||||
//IdString device_id = ctx->id(ctx->device_name);
|
||||
// IdString device_id = ctx->id(ctx->device_name);
|
||||
if (base_id == ctx->id("LCMXO2-1200"))
|
||||
BaseConfigs::config_empty_lcmxo2_1200(cc);
|
||||
else
|
||||
|
@ -23,7 +23,7 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
const float slice_x1 = 0.800;
|
||||
const float slice_x2_comb = 0.927;
|
||||
//const float slice_x1_ff = 0.933;
|
||||
// const float slice_x1_ff = 0.933;
|
||||
const float slice_x2 = 0.94;
|
||||
const float slice_y1 = 0.60;
|
||||
const float slice_y2 = 0.65 + 0.1 / 4;
|
||||
@ -37,7 +37,6 @@ const float io_cell_h_x1 = 0.05;
|
||||
const float io_cell_h_y1 = 0.05;
|
||||
const float io_cell_h_y2 = 0.24;
|
||||
|
||||
|
||||
void gfxTileBel(std::vector<GraphicElement> &g, int x, int y, int z, int w, int h, IdString bel_type,
|
||||
GraphicElement::style_t style)
|
||||
{
|
||||
@ -50,12 +49,12 @@ void gfxTileBel(std::vector<GraphicElement> &g, int x, int y, int z, int w, int
|
||||
el.y1 = y + slice_y1 + z * slice_pitch;
|
||||
el.y2 = y + slice_y2 + z * slice_pitch;
|
||||
g.push_back(el);
|
||||
/* } else if (bel_type == id_FACADE_FF) {
|
||||
el.x1 = x + slice_x1_ff;
|
||||
el.x2 = x + slice_x2;
|
||||
el.y1 = y + slice_y1 + z * slice_pitch;
|
||||
el.y2 = y + slice_y2 + z * slice_pitch;
|
||||
g.push_back(el);*/
|
||||
/* } else if (bel_type == id_FACADE_FF) {
|
||||
el.x1 = x + slice_x1_ff;
|
||||
el.x2 = x + slice_x2;
|
||||
el.y1 = y + slice_y1 + z * slice_pitch;
|
||||
el.y2 = y + slice_y2 + z * slice_pitch;
|
||||
g.push_back(el);*/
|
||||
} else if (bel_type.in(id_FACADE_IO)) {
|
||||
bool top_bottom = (y == 0 || y == (h - 1));
|
||||
if (top_bottom) {
|
||||
@ -88,7 +87,6 @@ void gfxTileWire(std::vector<GraphicElement> &g, int x, int y, int w, int h, IdS
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, int w, int h, WireId src, IdString src_type,
|
||||
GfxTileWireId src_id, WireId dst, IdString dst_type, GfxTileWireId dst_id,
|
||||
GraphicElement::style_t style)
|
||||
|
Loading…
Reference in New Issue
Block a user