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

Add pulp_cluster target #37

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

Add pulp_cluster target #37

wants to merge 9 commits into from

Conversation

luca-valente
Copy link
Contributor

  • Propagate ARCHI_NO_FC to enable the cluster to boot on its own
  • Add custom target for cluster standalone

print_summary(errors);

if(get_core_id() == 0)
print_summary(errors);

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 provide some reasoning to why this is necessary?

Copy link
Contributor Author

@luca-valente luca-valente Apr 9, 2023

Choose a reason for hiding this comment

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

It is not necessary. Right now, all the cores print the same exact summary and result, as they all get the number of cycles from the same timer and errors is a shared variable. That's why I thought to simply have one core printing it but I can remove the if(get_core_id()==0) 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bluewww, any inputs on this? 🚀

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this needs to be removed

kernel/cluster.c Outdated
@@ -43,16 +42,24 @@ static void cluster_core_init()
eu_bar_setup(eu_bar_addr(0), (1<<ARCHI_CLUSTER_NB_PE) - 1);
}


Copy link
Member

Choose a reason for hiding this comment

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

There are a few whitespace changes in this PR, some adding unneeded spaces. Can you remove these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hope I removed all the whitespaces!

Comment on lines 322 to 325
ifeq '$(pulp_chip)' 'pulp_cluster'
run:
vsim $(vsim-flags) -do "set VSIM_PATH $(VSIM_PATH); source $(VSIM_PATH)/scripts/start.tcl"
else
Copy link
Member

Choose a reason for hiding this comment

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

Is this completely separate target for pulp_cluster required? Is it possible to use the same flow as below? If not, I suggest to keep as much as possible aligned (e.g. using $(VSIM) instead of vsim to start vsim).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is a bit tricky: I didn't check the existing flow since the pulp cluster tb is very much different from pulp's tb. I could dig into the "baseline" scripts and modify the cluster's testbench to become compatible. However, I honestly think that the pulp flow is a bit convoluted and overkill for our needs, aligning new code to a legacy version maybe it's not the best approach, but I see why avoiding splitting into different targets.

Copy link
Collaborator

Choose a reason for hiding this comment

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

These is the default_rules.mk file which should apply, well, to things that should be default. Custom stuff should go into pulp_cluster.mk. You can just overwrite the run: target in pulp_cluster.mk with whatever else you want it to be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are right. This makes more sense!

Copy link
Contributor Author

@luca-valente luca-valente Apr 11, 2023

Choose a reason for hiding this comment

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

As you suggested, I am now overwriting the run target within the pulp_cluster.mk. No need to modify the default_rules.mk at all this way.

Comment on lines 31 to 32
else
vsim-flags = -c
Copy link
Member

Choose a reason for hiding this comment

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

This should already be added in the default flow, no? I see that it is needed in the custom flow for the cluster, but...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

runner_args is currently used only when the target platform is gvsoc. I can work only with runner_args and define it according to the target, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see above!

@luca-valente luca-valente force-pushed the lv/pulp_cluster branch 2 times, most recently from 3041646 to 594cf12 Compare April 11, 2023 17:23
Core 0 does the initialization as if it was the FC and then
all the cores enter the main with the proper stack initialization.
@luca-valente
Copy link
Contributor Author

Let me know if other changes are needed!

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