[util/topgen] Error handling: Absence of RV_PLIC Hjson
If rv_plic.hjson doesn't exist, the topgen will fail. The user shall manually generate rv_plic.hjson inside the top then run topgen.
Revise the topgen flow as below to solve this issue:
- Reads IPs and ignore rv_plic at first.
- Add interrupt to the top (up to
amend_interruptfunction in themerge_topfunction) - Generate RV_PLIC
- Read RV_PLIC hjson object (returned value from
generate_plicfunction) and add relative informations to the module list (rerunamend_ipfor rv_plic only) - continue the rest of the topgen code.
This is related to lowRISC/stwg-base#743 lowRISC/stwg-base#802
@eunchan is this done?
No. Still pending but we can punt it.
This is a very old issue and it seems to be related to https://github.com/lowRISC/opentitan/pull/4944#pullrequestreview-575245310. @eunchan , do you want to check if this is done or still needed?
Still need this IMO. Pirmin, do you see any error on secondary topgen? The secondary topgen does not have rv_plic.hjson at the beginning. I assume the topgen errors out , how did you solve?
I think the following code section in topgen.py solves this issue:
https://github.com/lowRISC/opentitan/blob/650bd0434abb173a568126f5e04a27685543f181/util/topgen.py#L1019-L1029
Basically, if the rv_plic.hjson in hw/{top_name}/ip/rv_plic is not available for the initial validation (this is the case for the secondary top levels), we use the one from hw/ip/rv_plic. The newly generated rv_plic.hjson is then validated again inside generate_plic().
Ah.. thanks for pointing out Pirmin.
Then, we can close. :)
On Jan 26, 2021, at 11:40 PM, Pirmin Vogel [email protected] wrote:
I think the following code section in topgen.py solves this issue: https://github.com/lowRISC/opentitan/blob/650bd0434abb173a568126f5e04a27685543f181/util/topgen.py#L1019-L1029 https://github.com/lowRISC/opentitan/blob/650bd0434abb173a568126f5e04a27685543f181/util/topgen.py#L1019-L1029 Basically, if the rv_plic.hjson in hw/{top_name}/ip/rv_plic is not available for the initial validation (this is the case for the secondary top levels), we use the one from hw/ip/rv_plic. The newly generated rv_plic.hjson is then validated again inside generate_plic().
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/28#issuecomment-768098665, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDG3SYJ26G3EMRCJGT2SDS367NTANCNFSM4ISTJR5A.