This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ds:software:hdl [2016/02/08 10:26] pmiedzik [FMC] |
ds:software:hdl [2016/07/12 13:07] (current) pmiedzik [Register description] |
||
---|---|---|---|
Line 5: | Line 5: | ||
| 1 | '' | | 1 | '' | ||
| 2 | '' | | 2 | '' | ||
- | | 3 | '' | + | | 3 | '' |
- | | 4 | '' | + | | 4 | '' |
+ | | 4.1 | '' | ||
+ | | 4.2 | '' | ||
+ | | 4.3 | '' | ||
| 5 | '' | | 5 | '' | ||
+ | |||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Final design ===== | ||
+ | |||
+ | FIXME | ||
+ | {{: | ||
+ | ===== Initialization ===== | ||
+ | |||
+ | - configure inputs | ||
+ | * direction (**WB-GPIO-RAW=> | ||
+ | * termination (**WB-GPIO-RAW=> | ||
+ | - setup input map registers | ||
+ | * **WB-SCALER=> | ||
+ | * **WB-SCALER=> | ||
+ | * **WB-SCALER=> | ||
+ | - reset all counters by writing 1 to **WB-SCALER=> | ||
+ | - enable scaler (optional) by writing 1 to **WB-SCALER=> | ||
+ | |||
+ | ===== Data readout ===== | ||
+ | |||
+ | - Check status register (**empty** bit) if new data is available | ||
+ | - Latch new data into circular buffer (**WB-SCALER=> | ||
+ | - Read **OCounter** register four times. | ||
====== FMC ====== | ====== FMC ====== | ||
+ | * repository: LOBI IP Cores | ||
+ | * https:// | ||
+ | * http:// | ||
+ | * repository: FMC HDL | ||
+ | * https:// | ||
+ | * http:// | ||
===== FMC Dio 5ch TTL ===== | ===== FMC Dio 5ch TTL ===== | ||
Line 16: | Line 50: | ||
^ BusPath ^ VendorID ^ Product ^ BaseAddress(Hex) ^ Description ^ | ^ BusPath ^ VendorID ^ Product ^ BaseAddress(Hex) ^ Description ^ | ||
- | | 1 | '' | + | | 1 | '' |
- | | 2 | '' | + | | 2 | '' |
- | | 3 | '' | + | | 3 | '' |
- | | 4 | '' | + | | 4 | '' |
- | | 5 | '' | + | |
Line 28: | Line 62: | ||
===== WB Scaler ===== | ===== WB Scaler ===== | ||
- | master_mode | + | * master_mode |
- | + | | |
- | master_granularity => WORD | + | |
==== Register map ===== | ==== Register map ===== | ||
^ Register | ^ Register | ||
- | | SC | **0b000 | + | | SC | **0b000 |
- | | Countermap | + | | CounterMap |
- | | LatchMap | + | | LatchMap |
- | | StartStopMap | + | | StartStopMap |
| CCounter | | CCounter | ||
| LCounter | | LCounter | ||
Line 48: | Line 81: | ||
^ Bits ^ hex ^ Name ^ R/W ^ Description ^ | ^ Bits ^ hex ^ Name ^ R/W ^ Description ^ | ||
- | | 0 | (0x01) | empty | + | | 0 | (0x01) | empty/ |
| 1 | | full | r | | | 1 | | full | r | | ||
| 2 | | threshold | | 2 | | threshold | ||
- | | 3 | (0x08) | running | + | | 3 | (0x08) | running/ |
| 4 | (0x10) | stop | w | | | 4 | (0x10) | stop | w | | ||
| 5 | (0x20) | load_current | | 5 | (0x20) | load_current | ||
| 6 | (0x40) | load_fifo | | 6 | (0x40) | load_fifo | ||
+ | | 7 | (0x80) | software_latch | ||
| 11 - 8 | | counter_ovf | | 11 - 8 | | counter_ovf | ||
+ | | 12 | | load_current_auto | rw | FIXME | | ||
- | === Countermap | + | === CounterMap |
^ Bits ^ Name ^ R/W ^ Description ^ | ^ Bits ^ Name ^ R/W ^ Description ^ | ||
Line 70: | Line 105: | ||
* g_master_mode | * g_master_mode | ||
* g_master_granularity => WORD | * g_master_granularity => WORD | ||
+ | |||
+ | ==== Register map ==== | ||
^ Register | ^ Register | ||
- | | CODR | **0b000 | + | | CODR | **0b000 |
- | | SODR | **0b001 | + | | SODR | **0b001 |
- | | DDR | **0b010 | + | | DDR | **0b010 |
- | | PSR | **0b011 | + | | PSR | **0b011 |
- | | TR | **0b100 | + | | TR | **0b100 |
- | | AFR | **0b101 | + | | AFR | **0b101 |