Move sw device code into sw/device folder
Based on offline discussion between @asb, @tjaychen and @moidx. The proposed directory structure for software shall be as shown below. The device directory contains chip firmware, whereas host contains support tools.
├── device
│ ├── benchmarks
│ ├── boot_rom
│ ├── exts
│ ├── libs
│ ├── examples
│ └── tests
└── host
└── spiflash
Would it make sense to further divide device with subfolders for boot_rom and the rest to show the separation between the stages?
Would it make sense to further divide
devicewith subfolders forboot_romand the rest to show the separation between the stages?
SGTM. Perhaps it is a good idea to also add a test folder now and limit the proliferation of hello_
PR lowRISC/stwg-base#806 is also brining an useful embedded library that can be used in both device and host targets. Perhaps we should also add a sw/third_party folder as well? In the long term this mapping can be used to satisfy hermetic build requirements.
I think sw/vendor would be consistent with the rest of the repo. After all, we might vendor in some lowRISC software project for convenience.
We will need to later consider policy for when it makes sense to vendor something in vs rely on it as an external dep. We could for instance vendor in all Python libraries we depend on, but it doesn't seem particularly worthwhile given pip does a reasonable job (and we can always pin particular versions).
@sriyerg
Sri pointed out that there is not currently a lot of thought on how we would support multiple tops simultaneously. We should open a separate PR to track this on how to modularize between common things and things specific to top.
Do we imagine there being different toolsets for different toplevels in, say, the next 6-12 months? Unless we have something specific in mind I think we're better off keeping things simple and revisiting if the requirements change later.
Hard to say, but I would guess no.
#469 is pending on resolving this (or at least @moidx's review of #469). Can we get
a resolution on this? I think the original proposal makes a lot of sense; a test/ subdir
under device/ is probably also wise. Any objections so that we can get #469 moving?
Updated initial comment. No objections from my part. I can submit an PR to start making progress.
yeah i havent' started the move because there are a pile of docs with build instructions relying on sw/tests instead of sw/device/test so I was going to wait for those docs to land then start editing.
On Fri, Oct 18, 2019 at 6:13 PM Miguel Osorio [email protected] wrote:
Updated initial comment. No objections from my part. I can submit an PR to start making progress.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/27?email_source=notifications&email_token=AAH2RSQOPVNVKA25LZXQL3LQPJNKVA5CNFSM4ISTJR2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBWVF3Y#issuecomment-544035567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH2RSQNCW3B4QNKYEU5TTLQPJNKVANCNFSM4ISTJR2A .
Ok, went all out trying to make this into an atomic change #535.
Addressed by PR lowRISC/opentitan#535.