clangformat
This commit is contained in:
parent
528eddcaf7
commit
287fe7e894
@ -404,8 +404,7 @@ WireId Arch::getWireByName(IdString name) const
|
||||
IdString Arch::getWireType(WireId wire) const
|
||||
{
|
||||
NPNR_ASSERT(wire != WireId());
|
||||
switch (chip_info->wire_data[wire.index].type)
|
||||
{
|
||||
switch (chip_info->wire_data[wire.index].type) {
|
||||
case WireInfoPOD::WIRE_TYPE_NONE:
|
||||
return IdString();
|
||||
case WireInfoPOD::WIRE_TYPE_GLB2LOCAL:
|
||||
@ -582,8 +581,7 @@ std::vector<GroupId> Arch::getGroups() const
|
||||
group.type = GroupId::TYPE_LOCAL_SW;
|
||||
ret.push_back(group);
|
||||
|
||||
if (type == TILE_LOGIC)
|
||||
{
|
||||
if (type == TILE_LOGIC) {
|
||||
group.type = GroupId::TYPE_LC0_SW;
|
||||
ret.push_back(group);
|
||||
|
||||
|
@ -230,7 +230,8 @@ static BelPin get_one_bel_pin(const Context *ctx, WireId wire)
|
||||
}
|
||||
|
||||
// Permute LUT init value given map (LUT input -> ext input)
|
||||
unsigned permute_lut(unsigned orig_init, const std::unordered_map<int, int> &input_permute) {
|
||||
unsigned permute_lut(unsigned orig_init, const std::unordered_map<int, int> &input_permute)
|
||||
{
|
||||
unsigned new_init = 0;
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
|
@ -29,13 +29,11 @@ void ice40DelayFuzzerMain(Context *ctx)
|
||||
{
|
||||
std::vector<WireId> srcWires, dstWires;
|
||||
|
||||
for (int i = 0; i < ctx->chip_info->num_wires; i++)
|
||||
{
|
||||
for (int i = 0; i < ctx->chip_info->num_wires; i++) {
|
||||
WireId wire;
|
||||
wire.index = i;
|
||||
|
||||
switch (ctx->chip_info->wire_data[i].type)
|
||||
{
|
||||
switch (ctx->chip_info->wire_data[i].type) {
|
||||
case WireInfoPOD::WIRE_TYPE_LUTFF_OUT:
|
||||
srcWires.push_back(wire);
|
||||
break;
|
||||
@ -55,8 +53,7 @@ void ice40DelayFuzzerMain(Context *ctx)
|
||||
int index = 0;
|
||||
int cnt = 0;
|
||||
|
||||
while (cnt < NUM_FUZZ_ROUTES)
|
||||
{
|
||||
while (cnt < NUM_FUZZ_ROUTES) {
|
||||
if (index >= int(srcWires.size()) || index >= int(dstWires.size())) {
|
||||
index = 0;
|
||||
ctx->shuffle(srcWires);
|
||||
@ -103,7 +100,8 @@ void ice40DelayFuzzerMain(Context *ctx)
|
||||
|
||||
namespace {
|
||||
|
||||
struct model_params_t {
|
||||
struct model_params_t
|
||||
{
|
||||
int neighbourhood;
|
||||
|
||||
int model0_offset;
|
||||
@ -125,26 +123,14 @@ struct model_params_t {
|
||||
|
||||
static const model_params_t &get(ArchArgs args)
|
||||
{
|
||||
static const model_params_t model_hx8k = {
|
||||
588, 129253, 8658,
|
||||
118333, 23915, -73105, 57696,
|
||||
-86797, 89, 3706,
|
||||
-316, -575, -158, -296
|
||||
};
|
||||
static const model_params_t model_hx8k = {588, 129253, 8658, 118333, 23915, -73105, 57696,
|
||||
-86797, 89, 3706, -316, -575, -158, -296};
|
||||
|
||||
static const model_params_t model_lp8k = {
|
||||
867, 206236, 11043,
|
||||
191910, 31074, -95972, 75739,
|
||||
-309793, 30, 11056,
|
||||
-474, -856, -363, -536
|
||||
};
|
||||
static const model_params_t model_lp8k = {867, 206236, 11043, 191910, 31074, -95972, 75739,
|
||||
-309793, 30, 11056, -474, -856, -363, -536};
|
||||
|
||||
static const model_params_t model_up5k = {
|
||||
1761, 305798, 16705,
|
||||
296830, 24430, -40369, 33038,
|
||||
-162662, 94, 4705,
|
||||
-1099, -1761, -418, -838
|
||||
};
|
||||
static const model_params_t model_up5k = {1761, 305798, 16705, 296830, 24430, -40369, 33038,
|
||||
-162662, 94, 4705, -1099, -1761, -418, -838};
|
||||
|
||||
if (args.type == ArchArgs::HX1K || args.type == ArchArgs::HX8K)
|
||||
return model_hx8k;
|
||||
|
@ -717,7 +717,8 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId src,
|
||||
return;
|
||||
}
|
||||
|
||||
if (TILE_WIRE_LUTFF_0_IN_0_LUT <= src && src <= TILE_WIRE_LUTFF_7_IN_3_LUT && TILE_WIRE_LUTFF_0_OUT <= dst && dst <= TILE_WIRE_LUTFF_7_OUT) {
|
||||
if (TILE_WIRE_LUTFF_0_IN_0_LUT <= src && src <= TILE_WIRE_LUTFF_7_IN_3_LUT && TILE_WIRE_LUTFF_0_OUT <= dst &&
|
||||
dst <= TILE_WIRE_LUTFF_7_OUT) {
|
||||
int lut_idx = (src - TILE_WIRE_LUTFF_0_IN_0_LUT) / 4;
|
||||
int in_idx = (src - TILE_WIRE_LUTFF_0_IN_0_LUT) % 4;
|
||||
|
||||
@ -732,7 +733,8 @@ void gfxTilePip(std::vector<GraphicElement> &g, int x, int y, GfxTileWireId src,
|
||||
return;
|
||||
}
|
||||
|
||||
if (TILE_WIRE_LUTFF_0_IN_0 <= src && src <= TILE_WIRE_LUTFF_7_IN_3 && TILE_WIRE_LUTFF_0_IN_0_LUT <= dst && dst <= TILE_WIRE_LUTFF_7_IN_3_LUT) {
|
||||
if (TILE_WIRE_LUTFF_0_IN_0 <= src && src <= TILE_WIRE_LUTFF_7_IN_3 && TILE_WIRE_LUTFF_0_IN_0_LUT <= dst &&
|
||||
dst <= TILE_WIRE_LUTFF_7_IN_3_LUT) {
|
||||
int lut_idx = (src - TILE_WIRE_LUTFF_0_IN_0) / 4;
|
||||
int in_idx = (src - TILE_WIRE_LUTFF_0_IN_0) % 4;
|
||||
int out_idx = (dst - TILE_WIRE_LUTFF_0_IN_0_LUT) % 4;
|
||||
|
Loading…
Reference in New Issue
Block a user