litex icon indicating copy to clipboard operation
litex copied to clipboard

Support of MIPS cores

Open FlyGoat opened this issue 1 year ago • 1 comments

Hi all,

I'm trying to implement support for MIPS cores in LiteX, My initial target cores are

  • microAptiv UP from MIPSOpen (Origin download link is down, but we've got some copies around internet, like https://github.com/TheMozg/spi-amba-simulation/tree/master/MIPSfpga-nexys4ddr-project-v2.0/MIPSfpga/rtl_up)
  • CDIM

Both of them are Linux capable by default.

However, I'm running into an immediate problem, on MIPS our address mapping at boot time is not exactly the same as physical address. We do have KSEG0 and KSEG1, which is capable of accessing a 256MB window of physical address memory uncached/cached. That means we have to adjust Linker script to Link BIOS ROM into KSEG1, as well as modify generated CSR/MMIO accessors.

I'm not sure how I'm going to implement it, for now I'm hijacking generate functions to append offsets, which will break other arches. Please advise a proper way for me to achieve this functionality.

Thanks.

FlyGoat avatar Mar 07 '24 20:03 FlyGoat

Hi @FlyGoat,

feel free to share the modification you have to do to the project to achieve your goals, it would allow us to have a better understanding of your needs/requirements and try to see if there is an build-in approach that could fit or if that's a real limitation and project would need to improved on this aspect.

enjoy-digital avatar Jun 13 '24 09:06 enjoy-digital