]> rtime.felk.cvut.cz Git - fpga/pwm.git/blob - README
Sinus LUT 1000 points per revolution
[fpga/pwm.git] / README
1 //==============================================================================
2 // DUAL-PORT RAM MAPPING
3 //==============================================================================
4 // This memory is an interface to the master MCU. Here is brief memory map
5
6
7 // b'0000xxxx' - general registers of 1 axis
8 // b'0001ppxx' - registers of all phases (pp - phase number)
9
10 // address line width for 1 axis is 5 bits
11
12 0x00 : MCC enable flags
13 0x01 : IRC
14 0x02 : IRC base
15 0x03 : IRC max
16 0x04 : Angle
17 0x05 : Action
18 0x06 : reserved (Angle scale)
19 0x07 : reserved (Scaled Angle)
20 0x08 : reserved (Table base)
21 0x09 : reserved (P2 offset)
22 0x0A : reserved (P3 offset)
23 0x0B : reserved (Table index mask)
24 0x0C : reserved (PWM PID - P)
25 0x0D : reserved (PWM PID - I)
26 0x0E : reserved (PWM PID - D)
27
28 // Phase 1
29 0x10 : Phase1
30 0x11 : PWM1   // PWMx = Phasex * Action
31
32 // Phase 2
33 0x14 : Phase2
34 0x15 : PWM2
35
36 // Phase 3
37 0x18 : Phase3
38 0x19 : PWM3
39
40
41 //==============================================================================
42 // MOTION-CONTROL-CHAIN COMPONENTS
43 //==============================================================================
44 // Positions of all units in MCC. Each unit handle specific task. They can be
45 // enable/disabled by 0x00 register (MCC enable flags) - bits correspond to
46 // indexes in this table.
47
48  0 : IRC dump
49  1 : ICR angle decoder
50  2 : Vector generator
51  3 : Reference value generator (PWM value)
52  4 : reserved (PID controller)
53  5 : PWM dump
54