For those on the ecos-discuss mailing list that may not be familiar with the issue, Robert is referring to the fact that the OpenRISC processor is a "synthesizable soft-core" CPU. It is distributed in the form of code that can be customized and then compiled into hardware of different types. Cache size, number and width of registers, whether or not MMUs are present or certain instructions are implemented, are all choices made available to the CPU designer. In fact, there are dozens of options permitted by the OpenRISC architecture document, not to mention support for adding custom instructions and memory units. That creates, effectively, the potential for a near-infinite number of CPU variants.1) What's the best way to approach configuration for a 'soft' processor like this whose architecture can be configured? My thoughts are that you could either:
I think the eCos variant system isn't as useful with a synthesizable CPU architecture as with conventional architectures, where the menu of CPU variants is comparitively small. Rather than picking the single HAL variant corresponding to the features of CPU model xyz, a developer configuring eCos for OpenRISC must add a variant package for each implemented hardware option (cache, floating point support, MMU, 64-bit regs, etc.) and set the value of CDL parameters for each of those variant packages, e.g. cache size, number of registers. In this case, the CPU "variants" are really just HAL architecture options that can be mixed-and-matched almost arbitrarily. So, I think the issue boils down to whether or not the code for an option lives in a separate HAL variant subdir or in the HAL's arch subdir.a) Include support for everything in the arch and have them selectable via cdl_packages/cdl_options b) Properly define variants and platforms and use cdl_interface to indicate the options variants/platforms export. (a) seems acceptable for now, but (b) seems to be the 'proper' solution based on the tenet of configurability promoted by eCos. However, given the configurability of the OpenRISC CPU, I guess (b) could potentially give you a large number of combinations - I'm not sure if this would be a problem.
This all goes to the issue you raise above as to whether or not variant subdirs are appropriate for OpenRISC, but the short answer is that, since there was only one variant at the time I ported eCos, I didn't make the effort to create a separate variant for the feature. Also,2) Looking at the ARM HAL, cache support is in the platform subdirectory, whereas for OpenRISC it is in the 'arch' subdirectory. Shouldn't it be in the platform subdirectory?
I picked out useful chunks mostly from MIPS and a little from PowerPC and ARM..Out of interest, what template did you use for the port?