I would like to have a different approach here.
Currently, we have two files that describes the hardware (resources) and the instructions. These are the two main ArchC files. Latter, these files get transformed into several .cpp files for simulation, compilers, etc.
Whenever we need to change the cache configuration, we need to change the main resource file. The same will happen for frequency. I think that the best approach is to create a configuration file. Maybe
mips-config.ac and move all those configurations there. Maybe even considering this configuration as the main ArchC file. Doing so, we could have several configurations with varying cache sizes, and frequencies, and so on. All of them pointing to the same resource and ISA files.
But this will also have a drawback:
For each new addendum to ArchC, new files are created, including some with fixed names. So you can create
mips.ac, them you create
mips-isa.ac and tell ArchC that you are using
mips-isa.ac as the ISA. But you do not give such information to compilers, gdb, syscalls and other tools. You just include your file with the correct name and call the specific tool. It will find your file through a preset naming convention.
In this way, our goal should be to tie all files together. Currently we already have support for #include in ArchC. We could think about new files being added as organized contents without any restrictions from our point of view. We just provide best practices (like you should split your C code into .h and .c).
Overall, I this is what I think:
1) acsim and other tools should receive a configuration file. This configuration should be similar or even equal to the current
mips.ac,
sparc.ac, etc.
2) It should be possible to create several configuration files by pointing them to the same resource/isa files
3) No file should be required if not specified in the source code (we should not issue an error if the user did not provide gdb information but did not included this in any of our source codes).
Rodolfo