Transaction-Level Modeling Framework for Space Applications
The APBUART model creates an UART device, which is mapped to a TCP port on the host system. The class inherits from the classes gs::reg::gr_device
, APBDevice
and CLKDevice
. This model can be used as a serial console for exchanging data or printing debug information. The model has several registers which are listed in table 45. Further information can be found in GRLIB IP Core User’s Manual (chapter 16).
APB address offset | Register |
---|---|
0x0 | UART Data register |
0x4 | UART Status register |
0x8 | UART Control register |
0xC | UART Scaler register |
The GRLIB VHDL model of the APBUART is configured using Generics. For the implementation of the TLM model most of these Generics were refactored to constructor parameters of class AHBUART
. An overview about the available parameters is given in table 46.
Parameter | Description |
---|---|
name | SystemC name of the module |
backend | Selects the IO backend to be used, currently only TCP available |
pindex | APB slave index |
paddr | ADDR field of the APB BAR |
pmask | MASK field of the APB BAR |
pirq | Index of the interrupt line |
console | Prints output from the UART on console during VHDL simulation and speeds up simulation by always returning ‘1’ for Data Ready bit of UART Status register. Does not effect synthesis. |
powmon | Enable power monitoring |
This example shows how to instantiate the module APBUART
. In line 873 the constructor is called to create the new object. In line 882 the module is connected to the bus and in line 886 the clock is set. In line 884 the interrupts are connected via Signalkit.