| | 1 | [wiki:Component SocLib Components General Index] |
| | 2 | |
| | 3 | = !VciMultiTty Functional Description = |
| | 4 | |
| | 5 | This VCI target is a TTY terminal controller. This hardware component controls |
| | 6 | up to 256 terminals, emulated as XTERM windows. The number of emulated |
| | 7 | terminals is defined by the arguments in the constructor. |
| | 8 | The constructor creates as many UNIX XTERM processes as the number N of emulated terminals. |
| | 9 | It creates N PTY pseudo-terminals (one for each XTERM process), to support the bidirectional |
| | 10 | communication between the TTY controller process and the XTERM processes. |
| | 11 | Each terminal is acting both as a character display, and a keyboard interface. |
| | 12 | For each terminal, a specific IRQ is activated when a character is entered at the keyboard. |
| | 13 | The terminal index i is defined by the ADDRESS![12:4] bits. |
| | 14 | This hardware component cheks for segmentation violation, and can be used |
| | 15 | as a default target. |
| | 16 | |
| | 17 | Each TTY controller contains 3 memory mapped registers: |
| | 18 | |
| | 19 | * '''TTY_DISPLAY''' : ADDRESS![3:0] = 0x0 |
| | 20 | This 8 bits pseudo-register is write only. |
| | 21 | Any write request will interpret the 8 LSB bits of the WDATA field |
| | 22 | as an ASCII character, and this character will be displayed on the addressed terminal. |
| | 23 | |
| | 24 | * '''TTY_KEY_STS''' : ADDRESS![3:0] = 0x4 |
| | 25 | This Boolean status register is read-only. |
| | 26 | A read request returns the zero value if there is no pending character. |
| | 27 | It returns a non zero value if there is a pending character in the keyboard buffer. |
| | 28 | |
| | 29 | * '''TTY_KEY_BUF''' : ADDRESS![3:0] = 0x8 |
| | 30 | This 8 bits register contains one single ASCII character. |
| | 31 | This register is read-only. A read request returns the ACSII character |
| | 32 | in the 8 LSB bits of the RDATA field, and reset the status register |
| | 33 | |
| | 34 | = !VciMultiTty CABA Implementation = |
| | 35 | |
| | 36 | The caba implementation is in |
| | 37 | * source:trunk/soclib/systemc/include/caba/target/vci_multi_ram.h |
| | 38 | * source:trunk/soclib/systemc/src/caba/target/vci_multi_ram.cc |
| | 39 | |
| | 40 | == Template parameters: == |
| | 41 | * The VCI parameters |
| | 42 | |
| | 43 | == Constructor parameters == |
| | 44 | {{{ |
| | 45 | VciMultiTty( |
| | 46 | sc_module_name name, // Instance name |
| | 47 | const soclib::common::IntTab &index, // Target index |
| | 48 | const soclib::common::MappingTable &mt, // Mapping Table |
| | 49 | const char *first_tty_name, // TTY names (as many names as terminals) |
| | 50 | ...); |
| | 51 | }}} |
| | 52 | |
| | 53 | == Ports == |
| | 54 | |
| | 55 | * sc_in<bool> '''p_resetn''' : Global system reset |
| | 56 | * sc_in<bool> '''p_clk''' : Global system clock |
| | 57 | * soclib::common::!VciiTarget<vci_param> '''p_vci''' : The VCI port |
| | 58 | * sc_out<bool> '''*p_irq''' : Pointer on the interrupt ports array. |