-
Notifications
You must be signed in to change notification settings - Fork 0
Memory Access
The RedPitaya uses shared memory for communication between the FPGA and the ARM processor. The memory is aligned to 4 bytes and has a width of 32 bits. This means that if you tell the processor to read address 0x40000000 it will read four bytes starting with address 0x40000000. Hence, it will read the addresses 0x40000000, 0x40000001, 0x40000002 and 0x40000003. Direct access to the unaligned addresses 0x4000000(1..3) is disallowed because no matter what address is given to the processor, it will always read four addresses starting with the one given. This would open up the possibility for a process to write and read from memory that is owned by another process which leads to huge security and stability risks.
The RedPitaya developers created the following register map that is largely
followed by pyrpl. The original RedPitaya map can be viewed here
(https://redpitaya.readthedocs.io/en/latest/developerGuide/fpga.html#register-map).
| Start | End | Module Name | Usage in pyrpl
|
|
|---|---|---|---|---|
| CS[0] | 0x40000000 | 0x400FFFFF | Housekeeping | Housekeeping |
| CS[1] | 0x40100000 | 0x401FFFFF | Oscilloscope | Oscilloscope |
| CS[2] | 0x40200000 | 0x402FFFFF | Arbitrary signal generator (ASG) | Arbitrary signal generator (ASG) |
| CS[3] | 0x40300000 | 0x403FFFFF | PID controller | Dsp module (interconnects modules) |
| CS[4] | 0x40400000 | 0x404FFFFF | Analog mixed signals (AMS) | Analog mixed signals (AMS) |
| CS[5] | 0x40500000 | 0x405FFFFF | Daisy chain | FREE |
| CS[6] | 0x40600000 | 0x406FFFFF | FREE | Was free, now used for FADS by me |
| CS[7] | 0x40700000 | 0x407FFFFF | Power test | FREE |
pyrpl is using its own simplified system bus architecture. Usually when using
the Zynq FPGA series, the AXI bus is used to exchange data between different
parts of the processing system (the ARM processor, PS) and the programmable
logic (the FPGA, PL). However, the AXI protocol is quite complex so the pyrpl
developers opted to create their own system bus structure. To use the system
bus, both a read and write interface have to be implemented and the module
needs to be connected to the bus in the top level module. There, the base
address (0x40?00000, ? replaced by 0..7 for the respective module) is also
given to the module instance.