Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass a list of all discovered cores to a generator
Generators now can be used to dynamically generate other cores depending on which cores were discovered during a fusesoc run. To enable this functionanlity, a list of all discovered cores is passed to the generator inside the GAPI file structure. This modifies the GAPI schema; but since it is a strict addition of a key which shouldn't affect users who did not use this functionality before, the GAPI version is not incremented. The motivating need for this work can be found in lowRISC/opentitan#1679. In short: RTL primitives, like a RAM module, exist in various specializations for different target technologies (e.g. one RAM implementation for Xilinx FPGAs, another one for Altera FPGAs). Such target-specific implementations of the RAM primitive are collected in a technology library. Not all users have access to all technology libraries, that's why these libraries need to be plug-and-play. A generator is now used to create a "wrapper primitive". The wrapper primitive is a simple RTL file with if/else blocks, choosing a target-specific implementation based on a parameter. To create this wrapper primitive, fusesoc searches through its list of core library paths, and passes all cores it found to a generator. The generator picks out (e.g. based on a standardized naming scheme) the implementations of a given primitive, and includes them in the "wrapper primitive".
- Loading branch information