-
Notifications
You must be signed in to change notification settings - Fork 792
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
WIP: Uniquify core VLNVs + promote englishbreakfast to full topgen #25747
base: master
Are you sure you want to change the base?
Conversation
That's great! /cc @pamaury also for SW |
Just FYI, I had the ok from @vogelpi to break English Breakfast in master if we need to, in particular if we want to first turn EB into a proper top and later fix the SW for it. In #24453 I was able to make it work but it required many small changes to the SW and required multitop. It might be a good idea to discuss EB in the relevant WG and try to sync the multitop SW and EB work so that we don't break it for too long (also we would need to make an announcement). |
8fbaa54
to
44811cc
Compare
One interesting unsolved problem (which again would make adding VLNVs on the command line nice...): The ipgen'd tops need definitions from packages from other ipgen'd IPs to be complete for lint checks. The block-level for clkmgr needs a pwrmgr to also be generated. |
7ae3ea5
to
37c4fc5
Compare
The fileset_top and fileset_topgen flags are now completely unused, since all the IPs that once depended on them have been reimplemented as ipgen cores. Remove the cruft. Signed-off-by: Alexander Williams <[email protected]>
…TL files Signed-off-by: Andreas Kurth <[email protected]>
padring scan_role_pkg top_pkg jtag_id_pkg ibex_pmp_reset_pkg physical_pads ast ast_pkg sensor_ctrl sensor_ctrl_pkg sensor_ctrl_reg chip_env chip_test chip_sim chip_verilator_sim clkmgr_sim clkmgr_env clkmgr_test pwrmgr_rstmgr_sva_if clkmgr_pwrmgr_sva_if clkmgr_sva_ifs pwrmgr_sva clkmgr_sva pwrmgr_component pwrmgr_sim pwrmgr_env pwrmgr_test pwrmgr_unit_only_sva rstmgr_cnsty_chk rstmgr_cnsty_chk_sim rstmgr_sim rstmgr_env rstmgr_sva_ifs rstmgr_sva rstmgr_test pinmux_pkg pinmux_fpv pinmux_common_fpv rv_plic_component alert_handler_component alert_handler_cov Signed-off-by: Andreas Kurth <[email protected]>
Signed-off-by: Andreas Kurth <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
43371c2
to
e66a5b7
Compare
@pamaury The goal for this PR would be to merely align the englishbreakfast hardware with the topgen flows we use regularly (and adjust topgen and ipgen'd cores to make that possible). So, the Some of the changes here are also relevant to darjeeling, since the VLNV bits for ipgen'd cores are likely needed to have multiple tops at all. Random aside (not directed at anyone in particular): Perhaps someday in the future, |
b02c5dd
to
a9b4833
Compare
Now I find myself fiddling with make_new_dif and friends, and... it strikes me that our software really needs to go in an obvious opentitan-specific prefix. Otherwise, out-of-tree usage gets annoying. Even so, I'm not sure some of the test generation for make_new_dif is going to scale properly--At least to me, right now, it feels really awkward with all the assumptions. This investigation started with darjeeling's soc_proxy not having DIFs yet, since the autogen'd PLIC tests started referring to non-existent bazel targets. |
67ede0b
to
97775c3
Compare
Avoid dependency cycles by moving constants to a separate package file. Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
e431979
to
ae6066e
Compare
I think I may need to actually propose and implement that fusesoc change to add VLNVs via the command line. It's become very tedious to gather all the required cores that implement virtual VLNVs for every "top" core that is part of ipgen outputs. This is all before we get rid of primgen, which merely adds yet another core to the list. The dependency hell comes from a weaving of different pieces from different IPs, several of which are the output of ipgen, and there are dependencies that aren't even part of the What that command-line option can do much better than core files is avoid dependency cycles. Core files alone can get the job done, as shown in this PR, but to avoid the possibility of cycles, you have to be very disciplined and only include the virtual provider cores in non-default targets. The core files are also less flexible for swapping prims, and this PR reveals we have many different top modules across the various targets, so need all of those core files to pull in the expected virtual provider cores. |
Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
The providing template uses the instance VLNVs throughout, and the "external" cores that depend on them use the virtual VLNVs. Signed-off-by: Alexander Williams <[email protected]>
Darjeeling's software tests only avoided overwriting the earlgrey tests by nature of sorting earlier alphabetically. Move autogenerated tests to the top-specific output directories. Fix up paths to match. Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
Symlink all required files for shared IPs. Conditionally generate alert_handler cross-reference links for clkmgr and rstmgr, depending on whether a top actually has an alert_handler. This should fix lint failures. Signed-off-by: Alexander Williams <[email protected]>
These cores collect the relevant cross-referenced virtual core implementations into the dependency list, so lint is run on the earlgrey-specific configuration for ipgen'd and reggen_top cores. Also fix up the references in the lint configs. Also add top_englishbreakfast to lint targets for englishbreakfast's hjson file. Signed-off-by: Alexander Williams <[email protected]>
clkmgr, flash_ctrl, pwrmgr, and rstmgr all reference other ipgen cores. To enable simulating with the correct dependencies, have topgen add the correct prefixes for the implementing modules for those virtual references. This *still* isn't complete, since there are other virtual references that are *NOT* ipgen cores. Signed-off-by: Alexander Williams <[email protected]>
Signed-off-by: Alexander Williams <[email protected]>
Finally all green! Here's the strategy that led to it:
That last bullet was very tedious to get right. English Breakfast hardware was pretty straightforward to bring up (for the existing Verilator and CW305 applications). Software test target generation was cut for any top that isn't Earl Grey, since this was broken for other tops, and fixing that is part of the multi-top SW effort (i.e. not relevant to the hardware work here). |
Some TODOs:
|
I don't think this restriction is needed. With the support of unmanaged external clocks and resets, you can run MCUs without that IPs. In fact, I see some some running ;-)
An easy fix might to make the alerts outgoing and tie them off at the uncore. |
Ah, fair enough--That probably wasn't a complete enough sentence. By "a" topgen-supported subsystem, I meant that it is one clear admissible architecture. Currently, clkmgr and rstmgr depend on pwrmgr, though, so to have either of the former two, you would need the latter. Otherwise, we need to do more development / fixing. In general, though, it would be good to be able to readily explain what topgen expects and what it will generate from the input. We can expand capabilities from there. :)
You mean in addition to the items I have listed? English Breakfast already doesn't have an alert_handler, but pwrmgr and rstmgr call it out as a dependency unnecessarily, so that line item was just about dealing with the current IP organization. |
I'll note also that this restriction is one that forecloses having multiple outputs of ipgen with different parameterizations in the same type:
To move away from this, we'd have to make topgen / ipgen aware of inter-IP dependencies and not use virtual VLNV references, since there can be only one provider for a virtual VLNV. Then the direct dependencies would have to be generated in fusesoc core files (as well as ensuring there are no clashes with names in the global namespace). I feel like virtual cores are a kludge for inter-IP dependencies, but removing the limit of having only one use of a template is a bit of a project of its own. |
Not done yet. Just seeing the errors in CI for the VLNV changes.