Conversation
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au> Timer tests out with acacia Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au> Serial tests out with Acacia Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au> Refactor: acacia_sddf is now a python module that inherits all subfiles, sDDF itself is a python module for import! Needed for SDK Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au> Fix issues with i2c.py - maps were swapped. Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au> Further fixes to keep up with Acacia PR request changes Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
| blk: Optional[DriverDouble] = DriverDouble(None, None) | ||
| partition: int = 0 | ||
| baud_rate: Optional[int] = None | ||
|
|
There was a problem hiding this comment.
How does this work when you have multiple ethernet devices (of the same or different kinds) in the same board? I think these should be lists of DriverDouble
|
|
||
| # Keep this list in alphabetical order by board name | ||
| # TODO: convert to Dictionary | ||
| BOARDS: List[Board] = [ |
There was a problem hiding this comment.
I personally would prefer splitting these out one per supported board, then just importing the one you want.
There was a problem hiding this comment.
(I know the old sdfgen tooling did it this way)
| paddr_top=0xEC000000, | ||
| serial=DriverDouble("snps,dw-apb-uart", "serial@fe660000"), | ||
| timer=DriverDouble("rockchip,rk3568-timer", "rktimer@fe5f0000"), | ||
| ethernet=DriverDouble("", "ethernet@fe2a0000"), |
There was a problem hiding this comment.
This one has two ethernet ports
| arch=aarch64, | ||
| paddr_top=0x80000000, | ||
| timer=DriverDouble("cdns,ttc", "axi/timer@ff140000"), | ||
| serial=DriverDouble("xlnx,zynqmp-uart", "axi/serial@ff000000"), |
| from .sddf import sDDFDriverClass, DeviceResourcesFactory, RegionResourceFactory | ||
| from collections import defaultdict | ||
| from typing import List, Dict, Type, Union, Optional | ||
|
|
There was a problem hiding this comment.
rearrange imports to put standard ones first
| raise RuntimeError( | ||
| f"Multiple MRs with paddr={d_paddr}! -> {existing_mr}" | ||
| ) | ||
| else: |
There was a problem hiding this comment.
No need of else after a raise
|
|
||
|
|
||
| # pulp | ||
| add_driver_config( |
There was a problem hiding this comment.
I reckon these should be in per-driver files imported rather than enumerated here. So that the tooling can be used with third-party drivers without changing this file.
|
|
||
| SUPPORTED_BOARDS := \ | ||
| odroidc4 \ | ||
| maaxboard \ |
There was a problem hiding this comment.
separate change, different PR
| board = next(filter(lambda b: b.name == args.board, BOARDS)) | ||
| if board.arch != x86_64: | ||
| dtb = DeviceTreeBlob(args.dtb) | ||
| else: |
There was a problem hiding this comment.
An alternative would be to fudge up a DTS for the X86 systems we use. Linux X86 can use a DTB as an additional source of information (mainly to get the PCI and IOAPIC info)
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
Signed-off-by: Lesley Rossouw <lesley.rossouw@unsw.edu.au>
This PR introduces Acacia to the sDDF and reworks all of our meta tooling around it.
./acacia_sddf/driver_class.py. Common logic is in./acacia_sddf/sddf.pytools/metais removed and remaining Python like board.py is moved to./acacia_sddf. This is to allow all of the Python in the sDDF to sit in one module that can be imported all in one blast. I movedacacia_sddfto the root of the repository to reflect its significance, as this code is in fact critical to assemble anything in the sDDF (as opposed to being a "two generic subdirectories deep tool")board.pyhas been changed to get rid of some indirection, we now store compatible strings there for sanity.config.jsonsare redundant and replaced with new functionality indriver_manifest.py. This file offers an API to let this same information be stored globally, and I intend for this to be used by eachdriver_class.py... e.g. in i2c.py... i.e. we store the old config.json in
i2c.py.There's not too much to see otherwise besides the new Acacia subsystem generation in
i2c.py,serial.pyandtimer.py. Please let me know what you think about these.I am leaving this PR as a draft until we have merged Acacia, just in case API changes occur.
I've implemented these three classes as an exemplar for Acacia usage in advance of porting the other classes by others. These three are also mutually dependent and it isn't possible to do i2c without the other two.