Skip to content

Features to be added to add_ip_from_fusesoc function ? #203

@mtravaillard

Description

@mtravaillard

For now, the add_ip_from_fusesoc function can be used to read a .core file and convert it to a .cmake file by reading the vlnv and the filesets part only. .core file seems to be widely used in the open-source community and of we want to get some bigger IPs using it, we might face the limits of the current function.


The conditional line can not be handled, condition about the target or the tool seems to be the most common ones, we could try to support those 2 ?
they usually look like this :

filesets:
  - files_rtl
  - tool_verilator? (tb-

verilator)
  - tool_modelsim? (tb-sv)

About the other feature, We are currently only parsing the filesets, but sometimes, it contains parameters and scripts elements, in the top level .core, which i think might not useful for us.
And what we might be mostly missing is the use of the targets element, it's what fusesoc use to know what to do with the .core file, so which different elelment will be used depending on your target.
I will include a file, based on x-heep core-v-mini-mcu.core, that have been simplified to show the different possibilities with this type of file.
example_struct.txt (it has been "converted" to .txt for compatibilty with github but the data stay the same).


I don't know how much we should support this "target" feature from .core of if we just keep taking all the filesets...
So far from, what i have seen, it's mostly big top level .core files (like in x-heep), individuals IPs usually only have basic filesets and a default target that index them. And reading the targets informations might leads to reading 2 times all the .core files (or just the top one), if we don't find a way to do it in 1 reading with python...
About the conditional line one, i think it will be needed to support it has it can be found in any type of .core file.
Also, i don't think we should aim to support all the features of this type of file, but maybe we can make our .core support a bit better with those features ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions