Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding NanoXplore NG-Ultra support #1397

Open
wants to merge 140 commits into
base: master
Choose a base branch
from
Open

Adding NanoXplore NG-Ultra support #1397

wants to merge 140 commits into from

Conversation

mmicko
Copy link
Member

@mmicko mmicko commented Nov 27, 2024

This PR includes work done in longer period that adds support for NG-Ultra architecture of NanoXplore using Himbaechel API.
It was done as part of Project Beyond and files needed for building chip database are now available at https://github.com/YosysHQ-GmbH/prjbeyond-db/.
Bitstream is exported in JSON format that is supported by Impulse tool from NanoXplore and it is used to generate binary bitstreams or additionally modify design.

@mmicko mmicko requested a review from gatecat November 27, 2024 12:41
Copy link
Member

@gatecat gatecat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, some review comments that I think would get this up to mergeable quality.


void add_net(std::set<std::string> &nets, std::string src_tile, std::string src_name, std::string dst_tile, std::string dst_name, IdString src_type, IdString dst_type)
{
if (src_type.in(ctx->id("LUT_PERMUTATION_WIRE"), ctx->id("MUX_WIRE"), ctx->id("INTERCONNECT_INPUT"))) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you ran a clangformat over the new uarch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will run that as last commit. will first cover rest of comments

himbaechel/uarch/ng-ultra/bitstream.cc Outdated Show resolved Hide resolved
himbaechel/uarch/ng-ultra/bitstream.cc Outdated Show resolved Hide resolved
himbaechel/uarch/ng-ultra/bitstream.cc Outdated Show resolved Hide resolved
void constrain_location(CellInfo *cell);
void extract_lowskew_signals(CellInfo *cell, dict<IdString,dict<IdString,std::vector<PortRef>>> &lowskew_signals);
// Cell creating
std::unique_ptr<CellInfo> create_cell(IdString type, IdString name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency, it would be better to have only one of these, probably just create_cell_ptr and refactor the few places where you want to create cells while iterating over them to also build a list and then iterate over that

}

BelId NgUltraPacker::getCSC(Loc l, int row)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like it could be written in a cleaner way

}
const auto &bel_data = chip_bel_info(ctx->chip_info, bel);
const auto &extra_data = *reinterpret_cast<const NGUltraBelExtraDataPOD *>(bel_data.extra_data.get());
std::string type = str_or_default(cell->params, ctx->id("type"), "");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make this faster than copying a string, this could well be in the critical path

himbaechel/uarch/ng-ultra/ng_ultra.cc Outdated Show resolved Hide resolved
himbaechel/uarch/ng-ultra/ng_ultra.cc Outdated Show resolved Hide resolved
himbaechel/uarch/ng-ultra/gen/arch_gen.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants