Commit Graph

10 Commits

Author SHA1 Message Date
Peter McGoron 2e98c0229d Upsilon standard library; integrate waveform; overhaul code generation
1. Add a new Upsilon MicroPython standard library in the linux/
   subdirectory. This puts all the submodules into classes with methods
   for ease of access.
2. Totally rewrite mmio.py code generation. Instead of just dumping
   registers, the build system now instantiates classes which
   encapsulate the module in question.
3. Split the PicoRV32 special register interface away from the PicoRV32.
   It is now the PeekPokeInterface, which will be used in the future to
   implement register control for Waveform and SPI.
4. Integrate Waveform into the design. Has not been tested yet.
2024-03-11 04:31:30 +00:00
Peter McGoron 223d2f98c6 add pre_finalize() to PreemptiveInterface
CSR scans run *before* do_finalize() is called. This is a silent
failure: The signals get generated but the CSR is not in the csr.json
file or the generated verilog.

pre_finalize() is a function that must be called when all masters are
added to the module. This will generate the CSR before finalization,
(hopefully) ensuring that the CSR is added to the CSR bus.

I need to figure out a way to excise manual use of the CSR bus from the
design. Future options may include having a PreemptiveInterface
control module sitting in front of the PreemptiveInterfaces that exposes
the control lines as a Wishbone register.
2024-03-07 15:59:08 +00:00
Peter McGoron 487d638aa5 Integrate Waveform into SoC; Rework PreemptiveInterface
New master buses can be added to PreemptiveInterface throughout the
code, simplifying the main SoC code. This removes the requirement that
the amount of masters to the interface needs to be known at
instantiation time.
2024-03-06 21:17:51 +00:00
Peter McGoron 35f55c8e1d swic.py: Fix generation of constants for control loop parameters 2024-02-28 13:37:50 +00:00
Peter McGoron 75d7f298e2 Documentation and register location generation 2024-02-28 13:28:06 +00:00
Peter McGoron da1e9238ab unify region generation and added SPI to PicoRV32 2024-02-27 03:48:22 +00:00
Peter McGoron 6f61d7db7a Documentation, fix parameter passing
1. Started writing a lot of documentation on how Upsilon is
   structured. This will replace the very outdated documentation.
2. Fixed parameter access and writing. This is also a more generic
   interface that can be used for Pico CPUs that implement different
   routines.
2024-02-26 06:02:48 +00:00
Peter McGoron 6b9e594b50 Successfully read PicoRV32 registers 2024-02-26 00:47:43 +00:00
Peter McGoron 88e3d15dd8 Get PicoRV32 to execute code
1. Update LiteX to 2023.12. This update adds wishbone bus addressing
   modes. Before this update, all wishbone buses used word addressing.
   For example, 0x0 mapped to word 0, 0x0 mapped to word 1, etc. This
   caused problems with the PicoRV32 and other modules, which are byte
   addressed.
2. Use adapter to convert between byte and word addressing. The SRAM is
   word addressed. The PicoRV32 shifts the address down by two bits to
   address the correct word. The PicoRV32 core seems to expect this.
3. Add debug register output. This is not working yet.
4. Use LiteX PicoRV32 wishbone adapter instead of PicoRV32 default. This
   seems to be simpler (combinatorial not synchronous).
5. Add some documentation.
6. Seperate config to new config file.
2024-02-25 18:58:34 +00:00
Peter McGoron 3785e3498d reorganize litex code 2024-02-22 15:35:31 +00:00