| | 1 | = Functional Description = |
| | 2 | |
| | 3 | This VCI target is a memory mapped peripheral that can |
| | 4 | control up to 256 software controlled timers. |
| | 5 | Each timer can optionally generates an independent periodic interrupt. |
| | 6 | The memory segment allocated to this component must be aligned |
| | 7 | on 4K bytes boundary. |
| | 8 | The timer index i is defined by the ADDRESS[12:4] bits. |
| | 9 | This hardware component cheks for segmentation violation, and can be used |
| | 10 | as a default target. |
| | 11 | |
| | 12 | Each timer contains 4 memory mapped registers: |
| | 13 | |
| | 14 | * '''TIMER_VALUE''' : ADDRESS[3:0] = 0x0 |
| | 15 | This 32 bits register is unconditionnally incremented at each cycle. |
| | 16 | A read request returns the current time contained in this register. |
| | 17 | A write request sets a new value in this register. |
| | 18 | |
| | 19 | * '''TIMER_RUNNING''' : ADDRESS[3:0] = 0x4 |
| | 20 | When the Boolean value contained in this register is true, |
| | 21 | the corresponding interrupt is enabled. |
| | 22 | A write request of a zero gives resets this register. |
| | 23 | A write request of a non-zero value sets this registe. |
| | 24 | |
| | 25 | * '''TIMER_PERIOD''' : ADDRESS[3:0] = 0x8 |
| | 26 | This 32 bits register defines the period between two successive interrupts. |
| | 27 | A write request writes a new value in this register, and the TIMER_RUNNING |
| | 28 | register is set to false. |
| | 29 | A read request returns the current value in this register. |
| | 30 | |
| | 31 | * '''TIMER_RESETIRQ''' : ADDRESS[3:0] = 0xC |
| | 32 | Any write request in this Boolean register will reset the pending IRQ. |
| | 33 | A read request returns the zero value when there is no pending interrupt, |
| | 34 | and returns a non zero value if there is a pending interrupt. |
| | 35 | |
| | 36 | = CABA Implementation = |
| | 37 | |
| | 38 | The caba implementation is in |
| | 39 | * source:trunk/soclib/systemc/include/caba/target/vci_multi_timer.h |
| | 40 | * source:trunk/soclib/systemc/src/caba/target/vci_multi_timer.cc |
| | 41 | |
| | 42 | == Template parameters: == |
| | 43 | * The VCI parameters |
| | 44 | |
| | 45 | == Constructor parameters == |
| | 46 | * Component Name |
| | 47 | * Target index |
| | 48 | * MappingTable reference |
| | 49 | * Number of available timers |
| | 50 | |
| | 51 | == Ports == |
| | 52 | * p_vci: the VCI port |
| | 53 | * p_resetn: Global system reset |
| | 54 | * p_clk: Global system clock |