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

gowin: Himbaechel. Specify the chip variant. #1218

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

yrabbit
Copy link
Contributor

@yrabbit yrabbit commented Sep 16, 2023

For GW2A-18 and GW1N-9 you need to specify the family in addition to partno.

For GW2A-18 and GW1N-9 you need to specify the family in addition to partno.

Signed-off-by: YRabbit <[email protected]>
@@ -81,16 +81,19 @@ void GowinImpl::init_database(Arch *arch)
if (args.options.count("family")) {
family = args.options.at("family");
} else {
bool GW2 = args.device == "GW2A-LV18PG256C8/I7";
bool GW2 = args.device.rfind("GW2A", 0) == 0;
Copy link
Member

Choose a reason for hiding this comment

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

nitpick - why rfind and not find?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

find() with pos parameter only looks in that position or later.
rfind() with pos parameter only looks in that position or earlier.
if pos == 0 then rfind is faster?

Copy link
Member

Choose a reason for hiding this comment

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

Right, makes sense, thanks for explaining

@gatecat gatecat merged commit 8e84006 into YosysHQ:master Sep 16, 2023
8 checks passed
@yrabbit yrabbit deleted the gowin-ui-0 branch September 16, 2023 08:38
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.

2 participants