ipxact-ruby 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +15 -0
- data/.gitignore +2 -0
- data/README.html +89 -0
- data/README.mdown +91 -0
- data/Rakefile +31 -0
- data/VERSION +1 -0
- data/autotest/discover.rb +17 -0
- data/lib/ipxact.rb +263 -0
- data/lib/ipxact/component.rb +235 -0
- data/lib/ipxact/parser.rb +27 -0
- data/lib/ipxact/parser/bus_data_parser.rb +229 -0
- data/lib/ipxact/parser/component_data_parser.rb +309 -0
- data/lib/ipxact/parser/platform_data_parser.rb +63 -0
- data/lib/ipxact/pathfinder/graph_pathfinder.rb +191 -0
- data/lib/ipxact/platform.rb +43 -0
- data/schemas/abstractionDefinition.xsd +332 -0
- data/schemas/abstractor.xsd +156 -0
- data/schemas/autoConfigure.xsd +226 -0
- data/schemas/busDefinition.xsd +99 -0
- data/schemas/busInterface.xsd +640 -0
- data/schemas/commonStructures.xsd +189 -0
- data/schemas/component.xsd +253 -0
- data/schemas/configurable.xsd +82 -0
- data/schemas/constraints.xsd +283 -0
- data/schemas/design.xsd +105 -0
- data/schemas/designConfig.xsd +144 -0
- data/schemas/file.xsd +560 -0
- data/schemas/fileType.xsd +86 -0
- data/schemas/generator.xsd +240 -0
- data/schemas/identifier.xsd +93 -0
- data/schemas/index.xsd +67 -0
- data/schemas/memoryMap.xsd +1007 -0
- data/schemas/model.xsd +291 -0
- data/schemas/port.xsd +441 -0
- data/schemas/signalDrivers.xsd +220 -0
- data/schemas/simpleTypes.xsd +90 -0
- data/schemas/subInstances.xsd +256 -0
- data/spec/integration/bus_data_extraction_spec.rb +105 -0
- data/spec/integration/data_calculation_spec.rb +133 -0
- data/spec/integration/data_construction_spec.rb +52 -0
- data/spec/integration/general_spec.rb +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_initiator_port.h +135 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_initiator_port.tpp +247 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_initiator_port_base.h +189 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_router.h +205 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_router.tpp +278 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_slave_base.h +115 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_slave_base.tpp +126 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_target_port.h +168 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_target_port_base.h +133 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/pv_tlm_if.h +280 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/PV/user_types.h +38 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/Leon2Platform/Leon2Platform.xml +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/Leon2Platform/design_Leon2Platform.xml +156 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/Leon2Platform/tlmsrc/Leon2Platform.h +149 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/apbSubSystem/apbSubSystem.xml +406 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/apbSubSystem/design_apbSubSystem.xml +135 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM1/apbSubSystem/tlmsrc/apbSubSystem.h +133 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/Leon2Platform/Leon2Platform.xml +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/Leon2Platform/design_Leon2Platform.xml +157 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/Leon2Platform/tlmsrc/Leon2Platform.h +150 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/apbSubSystem.xml +422 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/designConfig_apbSubSystem.xml +79 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/design_apbSubSystem.xml +184 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM2/apbSubSystem/tlmsrc/apbSubSystem.h +164 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/Leon2Platform/Leon2Platform.xml +105 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/Leon2Platform/design_Leon2Platform.xml +157 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/Leon2Platform/tlmsrc/Leon2Platform.h +152 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/apbSubSystem.xml +429 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/designConfig_apbSubSystem.xml +64 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/design_apbSubSystem.xml +150 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/SystemTLM3/apbSubSystem/tlmsrc/apbSubSystem.h +167 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbbus/1.4/ahbbus22.xml +236 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbbus/1.4/tlmsrc/ahbbus.h +52 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbram/1.4/ahbram.xml +184 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbram/1.4/tlmsrc/ahbram.cc +93 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/ahbram/1.4/tlmsrc/ahbram.h +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbbus/1.4/apbbus8.xml +544 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbbus/1.4/tlmsrc/apbbus.h +55 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbmst/1.4/apbmst.xml +209 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbmst/1.4/tlmsrc/apbmst.h +53 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/apbram.xml +395 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.cc +89 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.h +69 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.v +82 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/apbram/1.0/hdlsrc/apbram.vhd +132 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.4/cgu.xml +686 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.4/tlmsrc/cgu.cc +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.4/tlmsrc/cgu.h +81 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.5/cgu.xml +707 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.5/tlmsrc/cgu.cc +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/cgu/1.5/tlmsrc/cgu.h +81 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/dma/1.4/dma.xml +272 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/dma/1.4/tlmsrc/dma.cc +230 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/dma/1.4/tlmsrc/dma.h +116 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/irqctrl/1.4/irqctrl.xml +530 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/irqctrl/1.4/tlmsrc/irqctrl.cc +211 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/irqctrl/1.4/tlmsrc/irqctrl.h +108 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/processor/1.4/processor.xml +423 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/processor/1.4/tlmsrc/processor.cc +331 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/processor/1.4/tlmsrc/processor.h +121 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2apb/1.0/pv2apb.xml +240 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2apb/1.0/tlmsrc/pv2apb.cc +153 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2apb/1.0/tlmsrc/pv2apb.h +77 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2tac/1.0/pv2tac.xml +154 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2tac/1.0/tlmsrc/pv2tac.cc +114 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/pv2tac/1.0/tlmsrc/pv2tac.h +67 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/rgu/1.4/rgu.xml +766 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/rgu/1.4/tlmsrc/rgu.cc +126 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/rgu/1.4/tlmsrc/rgu.h +105 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/scmlAdaptor/1.0/scmlAdaptor.xml +154 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/scmlAdaptor/1.0/tlmsrc/scmladaptor.cc +100 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/scmlAdaptor/1.0/tlmsrc/scmladaptor.h +62 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/serial_device/1.0/serial_device.xml +151 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/serial_device/1.0/tlmsrc/serial_device.h +85 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/timers/1.4/timers.xml +460 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/timers/1.4/tlmsrc/timers.cc +201 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/timers/1.4/tlmsrc/timers.h +102 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart.h +152 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart_fifo.h +113 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart_memory_map.h +96 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/inc/uart_types.h +60 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart.cc +125 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_interrupt_handler.cc +136 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_register_bank.cc +129 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_serial_tx_rx.cc +145 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/uart_scml.xml +372 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/Leon2_uart.h +216 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/def_Leon2_uart.h +34 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/tlm_field.h +72 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/tlm_register.h +129 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/include/tlmreg_Leon2_uart.h +133 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/src/Leon2_uart.cc +316 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/src/tlmreg_Leon2_uart.cc +197 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/tlmsrc/src/user_specific_Leon2_uart.cc +146 -0
- data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_tac/1.0/uart_tac.xml +222 -0
- data/spec/unit/component_spec.rb +98 -0
- data/spec/unit/graph_pathfinder_spec.rb +128 -0
- data/spec/unit/interconnect_spec.rb +177 -0
- data/spec/unit/ipxact_spec.rb +69 -0
- data/spec/unit/platform_spec.rb +34 -0
- metadata +225 -0
data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_register_bank.cc
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
//
|
2
|
+
// Revision: $Revision: 1506 $
|
3
|
+
// Date: $Date: 2009-04-26 01:51:56 -0500 (Sun, 26 Apr 2009) $
|
4
|
+
//
|
5
|
+
// Copyright (c) 2005, 2006, 2007, 2008, 2009 The SPIRIT Consortium.
|
6
|
+
//
|
7
|
+
// This work forms part of a deliverable of The SPIRIT Consortium.
|
8
|
+
//
|
9
|
+
// Use of these materials are governed by the legal terms and conditions
|
10
|
+
// outlined in the disclaimer available from www.spiritconsortium.org.
|
11
|
+
//
|
12
|
+
// This source file is provided on an AS IS basis. The SPIRIT
|
13
|
+
// Consortium disclaims any warranty express or implied including
|
14
|
+
// any warranty of merchantability and fitness for use for a
|
15
|
+
// particular purpose.
|
16
|
+
//
|
17
|
+
// The user of the source file shall indemnify and hold The SPIRIT
|
18
|
+
// Consortium and its members harmless from any damages or liability.
|
19
|
+
// Users are requested to provide feedback to The SPIRIT Consortium
|
20
|
+
// using either mailto:feedback@lists.spiritconsortium.org or the forms at
|
21
|
+
// http://www.spiritconsortium.org/about/contact_us/
|
22
|
+
//
|
23
|
+
// This file may be copied, and distributed, with or without
|
24
|
+
// modifications; this notice must be included on any copy.
|
25
|
+
|
26
|
+
// uart_register_bank.cpp
|
27
|
+
|
28
|
+
//***************************
|
29
|
+
//* Includes *
|
30
|
+
//***************************
|
31
|
+
#include "uart.h"
|
32
|
+
|
33
|
+
//***********************************************************************************
|
34
|
+
//* UART Module: Register Call-backs *
|
35
|
+
//* These functions are bound to the register aliases of the register bank. *
|
36
|
+
//***********************************************************************************
|
37
|
+
// Non Blocking Write callback bound to RBR/THR register. A Write will access the THR
|
38
|
+
void uart::RegCB_RBR_THR_Write(DATA_TYPE WriteData, unsigned int AccessSize, unsigned int Offset) {
|
39
|
+
if (bFCR_FIFOE == 1) // If FIFOs are enabled...
|
40
|
+
TX_FIFO.write(WriteData); // Write data to the Transmit FIFO
|
41
|
+
else {
|
42
|
+
rTHR = WriteData; // Write data to the Transmit Holding Register
|
43
|
+
}
|
44
|
+
bLSR_THRE = 0; // Clear the THR Empty bit
|
45
|
+
TransmitEvent.notify(); // Trigger the Transmitter
|
46
|
+
InterruptEvent.notify(); // Check for Interrupts
|
47
|
+
};
|
48
|
+
// Non Blocking Read callback bound to RBR/THR register. A Read will access the RBR
|
49
|
+
DATA_TYPE uart::RegCB_RBR_THR_Read(unsigned int AccessSize, unsigned int Offset) {
|
50
|
+
DATA_TYPE ReturnValue;
|
51
|
+
if (bFCR_FIFOE == 1) { // If FIFOs are enabled...
|
52
|
+
ReturnValue = RX_FIFO.read(); // Read data from the Receive FIFO
|
53
|
+
if (RX_FIFO.IsBelowTriggerLevel()) // If Receive FIFO is below the trigger level...
|
54
|
+
Clear_RX_Interrupt = true; // Clear the Receive buffer full interrupt
|
55
|
+
if (RX_FIFO.IsEmpty()) { // If Receive FIFO is empty...
|
56
|
+
bLSR_DR = 0; // Clear the Data Ready bit
|
57
|
+
}
|
58
|
+
} else {
|
59
|
+
ReturnValue = rRBR; // Read data from the Receive Buffer Register
|
60
|
+
rRBR = 0; // Clear the RBR
|
61
|
+
bLSR_DR = 0; // Clear the Data Ready bit
|
62
|
+
Clear_RX_Interrupt = true; // Clear the Receive buffer full interrupt
|
63
|
+
}
|
64
|
+
InterruptEvent.notify(); // Update interrupts
|
65
|
+
return ReturnValue; // Return the value
|
66
|
+
};
|
67
|
+
// Non Blocking Write callback bound to IIR/FCR register. A Write will access the FCR
|
68
|
+
void uart::RegCB_IIR_FCR_Write(DATA_TYPE WriteData, unsigned int AccessSize, unsigned int Offset) {
|
69
|
+
if (WriteData & 1) { // If the first bit (FIFO Enable bit) is set...
|
70
|
+
switch ((WriteData >> 6) & 0x03) { // Set the Receive FIFO trigger level
|
71
|
+
case 0x01:
|
72
|
+
RX_FIFO.SetTriggerLevel(RX_FIFO_SIZE/4);
|
73
|
+
break;
|
74
|
+
case 0x02:
|
75
|
+
RX_FIFO.SetTriggerLevel(RX_FIFO_SIZE/2);
|
76
|
+
break;
|
77
|
+
case 0x03:
|
78
|
+
RX_FIFO.SetTriggerLevel(RX_FIFO_SIZE-2);
|
79
|
+
break;
|
80
|
+
default:
|
81
|
+
RX_FIFO.SetTriggerLevel(1);
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
switch ((WriteData >> 4) & 0x03) { // Set the Transmit FIFO trigger level
|
85
|
+
case 0x01:
|
86
|
+
TX_FIFO.SetTriggerLevel(TX_FIFO_SIZE/4);
|
87
|
+
break;
|
88
|
+
case 0x02:
|
89
|
+
TX_FIFO.SetTriggerLevel(TX_FIFO_SIZE/2);
|
90
|
+
break;
|
91
|
+
case 0x03:
|
92
|
+
TX_FIFO.SetTriggerLevel(TX_FIFO_SIZE-2);
|
93
|
+
break;
|
94
|
+
default:
|
95
|
+
TX_FIFO.SetTriggerLevel(1);
|
96
|
+
break;
|
97
|
+
}
|
98
|
+
} else { // If FIFOs are (being) disabled...
|
99
|
+
if (!RX_FIFO.IsEmpty()) // If the Receive FIFO is not empty...
|
100
|
+
rRBR = RX_FIFO.read(); // Transfer the top item of the Receive FIFO to the RBR
|
101
|
+
cout << sc_time_stamp() << ": " << name() << ": FIFOs Disabled." << endl;
|
102
|
+
}
|
103
|
+
rFCR = WriteData; // Store the data word in the Fifo Control Register
|
104
|
+
};
|
105
|
+
// Non Blocking Read callback bound to IIR/FCR register. A Read will access the IIR
|
106
|
+
DATA_TYPE uart::RegCB_IIR_FCR_Read(unsigned int AccessSize, unsigned int Offset) {
|
107
|
+
DATA_TYPE ReturnValue = rIIR;
|
108
|
+
|
109
|
+
if ((ReturnValue & 0x0F) == UART_IRQ_TX) { // If a Transmit buffer empty interrupt is returned...
|
110
|
+
Clear_TX_Interrupt = true; // Clear the Transmit buffer empty interrupt
|
111
|
+
}
|
112
|
+
|
113
|
+
InterruptEvent.notify(); // Update interrupts
|
114
|
+
ReturnValue |= ((bFCR_FIFOE << 7) | (bFCR_FIFOE << 6)); // Set bit 6 and 7 to the same value as the FIFO Enable bit.
|
115
|
+
return ReturnValue; // Return the value of Interrupt Identification Register
|
116
|
+
};
|
117
|
+
// Non Blocking Read callback bound to LSR register.
|
118
|
+
DATA_TYPE uart::RegCB_LSR_Read(unsigned int AccessSize, unsigned int Offset) {
|
119
|
+
DATA_TYPE ReturnValue = rLSR;
|
120
|
+
Clear_LS_Interrupt = true; // Clear the Line Status Interrupt
|
121
|
+
InterruptEvent.notify(); // Update interrupts
|
122
|
+
return ReturnValue; // Return the value of Line Status Register
|
123
|
+
};
|
124
|
+
// Non Blocking Write callback bound to IER register.
|
125
|
+
void uart::RegCB_IER_Write(DATA_TYPE WriteData, unsigned int AccessSize, unsigned int Offset) {
|
126
|
+
rIER = WriteData; // Write data word to Interrupt Enable Register
|
127
|
+
InterruptEvent.notify(); // Update interrupts
|
128
|
+
};
|
129
|
+
|
data/spec/test_data/spiritconsortium.org/Leon2TLM/uart_scml/1.0/tlmsrc/src/uart_serial_tx_rx.cc
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
//
|
2
|
+
// Revision: $Revision: 1506 $
|
3
|
+
// Date: $Date: 2009-04-26 01:51:56 -0500 (Sun, 26 Apr 2009) $
|
4
|
+
//
|
5
|
+
// Copyright (c) 2005, 2006, 2007, 2008, 2009 The SPIRIT Consortium.
|
6
|
+
//
|
7
|
+
// This work forms part of a deliverable of The SPIRIT Consortium.
|
8
|
+
//
|
9
|
+
// Use of these materials are governed by the legal terms and conditions
|
10
|
+
// outlined in the disclaimer available from www.spiritconsortium.org.
|
11
|
+
//
|
12
|
+
// This source file is provided on an AS IS basis. The SPIRIT
|
13
|
+
// Consortium disclaims any warranty express or implied including
|
14
|
+
// any warranty of merchantability and fitness for use for a
|
15
|
+
// particular purpose.
|
16
|
+
//
|
17
|
+
// The user of the source file shall indemnify and hold The SPIRIT
|
18
|
+
// Consortium and its members harmless from any damages or liability.
|
19
|
+
// Users are requested to provide feedback to The SPIRIT Consortium
|
20
|
+
// using either mailto:feedback@lists.spiritconsortium.org or the forms at
|
21
|
+
// http://www.spiritconsortium.org/about/contact_us/
|
22
|
+
//
|
23
|
+
// This file may be copied, and distributed, with or without
|
24
|
+
// modifications; this notice must be included on any copy.
|
25
|
+
|
26
|
+
|
27
|
+
// uart_serial_tx_rx.cpp
|
28
|
+
|
29
|
+
//***************************
|
30
|
+
//* Includes *
|
31
|
+
//***************************
|
32
|
+
#include "uart.h"
|
33
|
+
|
34
|
+
//***********************************************************************************
|
35
|
+
//* UART Module: put Interface Method *
|
36
|
+
//* This method is bound to the 'tlm_blocking_put_if' of the pSerialIn export. *
|
37
|
+
//* It handles the incomming serial data. *
|
38
|
+
//***********************************************************************************
|
39
|
+
void uart::put(const SERIAL_DATA_STRUCTURE &DataStruct) {
|
40
|
+
DATA_TYPE ReceiveShiftRegister;
|
41
|
+
unsigned short NrOfDataBits = 5 + ((bLCR_WLS1 << 1) | bLCR_WLS0); // Number of data bits in character frame
|
42
|
+
unsigned short WordMask = (0x1F << (NrOfDataBits-5)) | 0x07; // Mask that has the lowest 'NrOfDataBits' set to 1
|
43
|
+
|
44
|
+
if (bFCR_FIFOE) { // If the FIFOs are enabled...
|
45
|
+
if (RX_FIFO.IsFull()) { // If the receive FIFO is full...
|
46
|
+
bLSR_OE = 1; // Set the Overflow Error flag
|
47
|
+
cout << sc_time_stamp() << ": " << name() << ": RX FIFO Full! Discarding received character frame." << endl;
|
48
|
+
} else {
|
49
|
+
ReceiveShiftRegister = DataStruct.Data & WordMask; // Store the data in 'ReceiveShiftRegister'
|
50
|
+
RX_FIFO.write(ReceiveShiftRegister); // Write data to the FIFO
|
51
|
+
}
|
52
|
+
} else {
|
53
|
+
if (bLSR_DR) { // If data is avialable in RBR...
|
54
|
+
bLSR_OE = 1; // Set the Overflow Error flag
|
55
|
+
cout << sc_time_stamp() << ": " << name() << ": RBR Full! Discarding received character frame." << endl;
|
56
|
+
} else {
|
57
|
+
ReceiveShiftRegister = DataStruct.Data & WordMask; // Store the data in 'ReceiveShiftRegister'
|
58
|
+
|
59
|
+
rRBR = ReceiveShiftRegister; // Write data to the Receive Buffer Register
|
60
|
+
}
|
61
|
+
}
|
62
|
+
if (!bLSR_OE) { // If there was no Overflow Error...
|
63
|
+
bLSR_DR = 1; // Set the Data Ready flag
|
64
|
+
if (DataStruct.StartBit != 1) // If Start Bit is invalid...
|
65
|
+
bLSR_BI = 1; // Set the Break Indicator flag
|
66
|
+
|
67
|
+
if (bLCR_PEN) { // If Parity is ENabled...
|
68
|
+
if (bLCR_SP) { // If Stick Parity is enabled...
|
69
|
+
if (DataStruct.Parity == (bool)bLCR_EPS) // If Parity bit does not match...
|
70
|
+
bLSR_PE = 1; // Set Parity Error flag
|
71
|
+
} else {
|
72
|
+
// Check the parity of data bits + parity bit
|
73
|
+
bool ParityCheck = 1; // 0 = odd, 1 = even
|
74
|
+
for (int i = 0; i < NrOfDataBits; i++) {
|
75
|
+
ParityCheck = ParityCheck ^ (ReceiveShiftRegister & 0x01);
|
76
|
+
ReceiveShiftRegister >>= 1;
|
77
|
+
}
|
78
|
+
ParityCheck = ParityCheck ^ DataStruct.Parity;
|
79
|
+
if (ParityCheck != (bool)bLCR_EPS) // If the parity does not match...
|
80
|
+
bLSR_PE = 1; // Set Parity Error flag
|
81
|
+
}
|
82
|
+
}
|
83
|
+
if (DataStruct.StopBit != 1) // If Stop Bit is invalid...
|
84
|
+
bLSR_FE = 1; // Set Framing Error flag
|
85
|
+
|
86
|
+
cout << sc_time_stamp() << ": " << name() << ": Serial Character received: " << DataStruct.Data << "." << endl;
|
87
|
+
}
|
88
|
+
InterruptEvent.notify(); // Trigger the Interrupt handler to check for interrupts.
|
89
|
+
}
|
90
|
+
|
91
|
+
//***********************************************************************************
|
92
|
+
//* UART Module: Serial_Transmit() *
|
93
|
+
//* This method is triggered by the 'TransmitEvent' event. *
|
94
|
+
//* It sends a serial data frame to the 'pSerialOut' port. *
|
95
|
+
//***********************************************************************************
|
96
|
+
void uart::Serial_Transmit() {
|
97
|
+
unsigned char TransmitShiftRegister;
|
98
|
+
SERIAL_DATA_STRUCTURE CharacterFrame;
|
99
|
+
unsigned short NrOfDataBits = 5 + ((bLCR_WLS1 << 1) | bLCR_WLS0); // Number of data bits in character frame
|
100
|
+
unsigned short WordMask = (0x1F << (NrOfDataBits-5)) | 0x07; // Mask that has the lowest 'NrOfDataBits' set to 1
|
101
|
+
|
102
|
+
if (bFCR_FIFOE == 1) { // If FIFOs are enabled...
|
103
|
+
if (TX_FIFO.IsEmpty()) { // If the transmit FIFO is empty...
|
104
|
+
cout << sc_time_stamp() << ": " << name() << ": TX FIFO Empty. Stopping Transmission" << endl;
|
105
|
+
return; // Don't transmit anything
|
106
|
+
}
|
107
|
+
TransmitShiftRegister = TX_FIFO.read() & WordMask; // Get character from the transmit FIFO
|
108
|
+
if (TX_FIFO.IsBelowTriggerLevel()) { // If the transmit FIFO is below the trigger level...
|
109
|
+
bLSR_THRE = 1; // Set the THR Empty bit
|
110
|
+
}
|
111
|
+
} else {
|
112
|
+
if (bLSR_THRE == 1) { // If THR is empty....
|
113
|
+
cout << sc_time_stamp() << ": " << name() << ": THR Empty. Stopping Transmission" << endl;
|
114
|
+
return; // Don't transmit anything
|
115
|
+
}
|
116
|
+
TransmitShiftRegister = rTHR & WordMask; // Get character from the THR
|
117
|
+
rTHR = 0; // Clear the THR
|
118
|
+
bLSR_THRE = 1; // Set the THR Empty bit
|
119
|
+
}
|
120
|
+
cout << sc_time_stamp() << ": " << name() << ": Writing " << TransmitShiftRegister << " to pSerialOut" << endl;
|
121
|
+
|
122
|
+
CharacterFrame.StartBit = ~bLCR_SB; // If Set Break bit is set, the Start Bit becomes 0, otherwise it is 1
|
123
|
+
CharacterFrame.Data = TransmitShiftRegister; // Put the data from the 'TransmitShiftRegister' in the character frame
|
124
|
+
if (bLCR_PEN) { // If Parity is ENabled...
|
125
|
+
if (bLCR_SP) { // If Stick Parity is enabled...
|
126
|
+
CharacterFrame.Parity = !bLCR_EPS; // Set parity bit to 1 if 'bLCR_EPS' == 0, and to 0 otherwise
|
127
|
+
} else {
|
128
|
+
// Calculate parity of data character
|
129
|
+
bool ParityCalc = 1; // 0 = odd, 1 = even
|
130
|
+
for (int i = 0; i < NrOfDataBits; i++) {
|
131
|
+
ParityCalc = ParityCalc ^ (TransmitShiftRegister & 0x01);
|
132
|
+
TransmitShiftRegister >>= 1;
|
133
|
+
}
|
134
|
+
ParityCalc = ParityCalc ^ bLCR_EPS;
|
135
|
+
CharacterFrame.Parity = ParityCalc; // Set the parity bit to match the selected (odd or even) parity
|
136
|
+
}
|
137
|
+
|
138
|
+
}
|
139
|
+
CharacterFrame.StopBit = 1; // Set the stop bit
|
140
|
+
|
141
|
+
pSerialOut->put(CharacterFrame); // Put the character frame on the 'pSerialOut' port
|
142
|
+
|
143
|
+
TransmitEvent.notify(); // Trigger this function again, there may be more data to send
|
144
|
+
InterruptEvent.notify(); // Trigger the interrupt handler to check for interrupt conditions
|
145
|
+
}
|
@@ -0,0 +1,372 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
//
|
4
|
+
// Revision: $Revision: 1506 $
|
5
|
+
// Date: $Date: 2009-04-26 01:51:56 -0500 (Sun, 26 Apr 2009) $
|
6
|
+
//
|
7
|
+
// Copyright (c) 2005, 2006, 2007, 2008, 2009 The SPIRIT Consortium.
|
8
|
+
//
|
9
|
+
// This work forms part of a deliverable of The SPIRIT Consortium.
|
10
|
+
//
|
11
|
+
// Use of these materials are governed by the legal terms and conditions
|
12
|
+
// outlined in the disclaimer available from www.spiritconsortium.org.
|
13
|
+
//
|
14
|
+
// This source file is provided on an AS IS basis. The SPIRIT
|
15
|
+
// Consortium disclaims any warranty express or implied including
|
16
|
+
// any warranty of merchantability and fitness for use for a
|
17
|
+
// particular purpose.
|
18
|
+
//
|
19
|
+
// The user of the source file shall indemnify and hold The SPIRIT
|
20
|
+
// Consortium and its members harmless from any damages or liability.
|
21
|
+
// Users are requested to provide feedback to The SPIRIT Consortium
|
22
|
+
// using either mailto:feedback@lists.spiritconsortium.org or the forms at
|
23
|
+
// http://www.spiritconsortium.org/about/contact_us/
|
24
|
+
//
|
25
|
+
// This file may be copied, and distributed, with or without
|
26
|
+
// modifications; but this notice must be included on any copy.
|
27
|
+
-->
|
28
|
+
<spirit:component xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5 http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5/index.xsd">
|
29
|
+
<spirit:vendor>spiritconsortium.org</spirit:vendor>
|
30
|
+
<spirit:library>Leon2TLM</spirit:library>
|
31
|
+
<spirit:name>uart_scml</spirit:name>
|
32
|
+
<spirit:version>1.0</spirit:version>
|
33
|
+
<spirit:busInterfaces>
|
34
|
+
<spirit:busInterface>
|
35
|
+
<spirit:name>ambaAPB</spirit:name>
|
36
|
+
<spirit:busType spirit:library="AMBA2" spirit:name="APB" spirit:vendor="amba.com" spirit:version="r2p0_4"/>
|
37
|
+
<spirit:abstractionType spirit:library="SCML" spirit:name="APB_PV" spirit:vendor="coware.com" spirit:version="1.1"/>
|
38
|
+
<spirit:slave>
|
39
|
+
<spirit:memoryMapRef spirit:memoryMapRef="uartScmlMemoryMap"/>
|
40
|
+
</spirit:slave>
|
41
|
+
<spirit:portMaps>
|
42
|
+
<spirit:portMap>
|
43
|
+
<spirit:logicalPort>
|
44
|
+
<spirit:name>PV</spirit:name>
|
45
|
+
</spirit:logicalPort>
|
46
|
+
<spirit:physicalPort>
|
47
|
+
<spirit:name>pPVTargetPort</spirit:name>
|
48
|
+
</spirit:physicalPort>
|
49
|
+
</spirit:portMap>
|
50
|
+
</spirit:portMaps>
|
51
|
+
</spirit:busInterface>
|
52
|
+
<spirit:busInterface>
|
53
|
+
<spirit:name>Interrupt</spirit:name>
|
54
|
+
<spirit:busType spirit:library="busdef.interrupt" spirit:name="interrupt" spirit:vendor="spiritconsortium.org" spirit:version="1.0"/>
|
55
|
+
<spirit:abstractionType spirit:library="busdef.interrupt" spirit:name="interrupt_rtl" spirit:vendor="spiritconsortium.org" spirit:version="1.0"/>
|
56
|
+
<spirit:master/>
|
57
|
+
<spirit:portMaps>
|
58
|
+
<spirit:portMap>
|
59
|
+
<spirit:logicalPort>
|
60
|
+
<spirit:name>IRQ</spirit:name>
|
61
|
+
</spirit:logicalPort>
|
62
|
+
<spirit:physicalPort>
|
63
|
+
<spirit:name>pInterrupt</spirit:name>
|
64
|
+
</spirit:physicalPort>
|
65
|
+
</spirit:portMap>
|
66
|
+
</spirit:portMaps>
|
67
|
+
</spirit:busInterface>
|
68
|
+
<spirit:busInterface>
|
69
|
+
<spirit:name>SerialOut</spirit:name>
|
70
|
+
<spirit:busType spirit:library="busdef.generic" spirit:name="serial" spirit:vendor="spiritconsortium.org" spirit:version="1.0"/>
|
71
|
+
<spirit:abstractionType spirit:library="abstractiondef.tlm" spirit:name="serial_pv" spirit:vendor="spiritconsortium.org" spirit:version="1.0"/>
|
72
|
+
<spirit:master/>
|
73
|
+
<spirit:portMaps>
|
74
|
+
<spirit:portMap>
|
75
|
+
<spirit:logicalPort>
|
76
|
+
<spirit:name>RW_TRANSACTION</spirit:name>
|
77
|
+
</spirit:logicalPort>
|
78
|
+
<spirit:physicalPort>
|
79
|
+
<spirit:name>pSerialOut</spirit:name>
|
80
|
+
</spirit:physicalPort>
|
81
|
+
</spirit:portMap>
|
82
|
+
</spirit:portMaps>
|
83
|
+
</spirit:busInterface>
|
84
|
+
<spirit:busInterface>
|
85
|
+
<spirit:name>SerialIn</spirit:name>
|
86
|
+
<spirit:busType spirit:library="busdef.generic" spirit:name="serial" spirit:vendor="spiritconsortium.org" spirit:version="1.0"/>
|
87
|
+
<spirit:abstractionType spirit:library="abstractiondef.tlm" spirit:name="serial_pv" spirit:vendor="spiritconsortium.org" spirit:version="1.0"/>
|
88
|
+
<spirit:slave/>
|
89
|
+
<spirit:portMaps>
|
90
|
+
<spirit:portMap>
|
91
|
+
<spirit:logicalPort>
|
92
|
+
<spirit:name>RW_TRANSACTION</spirit:name>
|
93
|
+
</spirit:logicalPort>
|
94
|
+
<spirit:physicalPort>
|
95
|
+
<spirit:name>pSerialIn</spirit:name>
|
96
|
+
</spirit:physicalPort>
|
97
|
+
</spirit:portMap>
|
98
|
+
</spirit:portMaps>
|
99
|
+
</spirit:busInterface>
|
100
|
+
</spirit:busInterfaces>
|
101
|
+
<spirit:memoryMaps>
|
102
|
+
<spirit:memoryMap>
|
103
|
+
<spirit:name>uartScmlMemoryMap</spirit:name>
|
104
|
+
<spirit:addressBlock>
|
105
|
+
<spirit:name>UART_REG</spirit:name>
|
106
|
+
<spirit:description>Receiver Buffer Register</spirit:description>
|
107
|
+
<spirit:baseAddress spirit:id="uartScmlBaseAddress" spirit:resolve="user">0xB0000000</spirit:baseAddress>
|
108
|
+
<spirit:range>24</spirit:range>
|
109
|
+
<spirit:width>32</spirit:width>
|
110
|
+
<spirit:usage>register</spirit:usage>
|
111
|
+
<spirit:register>
|
112
|
+
<spirit:name>UART_REG_RBR</spirit:name>
|
113
|
+
<spirit:addressOffset>0x0</spirit:addressOffset>
|
114
|
+
<spirit:size>32</spirit:size>
|
115
|
+
<spirit:access>read-only</spirit:access>
|
116
|
+
<spirit:reset>
|
117
|
+
<spirit:value>0x00</spirit:value>
|
118
|
+
</spirit:reset>
|
119
|
+
</spirit:register>
|
120
|
+
<spirit:register>
|
121
|
+
<spirit:name>UART_REG_THR</spirit:name>
|
122
|
+
<spirit:description>Transmitter Holding Register</spirit:description>
|
123
|
+
<spirit:addressOffset>0x0</spirit:addressOffset>
|
124
|
+
<spirit:size>32</spirit:size>
|
125
|
+
<spirit:access>write-only</spirit:access>
|
126
|
+
<spirit:reset>
|
127
|
+
<spirit:value>0x00</spirit:value>
|
128
|
+
</spirit:reset>
|
129
|
+
</spirit:register>
|
130
|
+
<spirit:register>
|
131
|
+
<spirit:name>UART_REG_IER</spirit:name>
|
132
|
+
<spirit:description>Interrupt Enable (Mask) Register</spirit:description>
|
133
|
+
<spirit:addressOffset>0x4</spirit:addressOffset>
|
134
|
+
<spirit:size>32</spirit:size>
|
135
|
+
<spirit:access>read-write</spirit:access>
|
136
|
+
<spirit:reset>
|
137
|
+
<spirit:value>0x00</spirit:value>
|
138
|
+
</spirit:reset>
|
139
|
+
</spirit:register>
|
140
|
+
<spirit:register>
|
141
|
+
<spirit:name>UART_REG_IIR</spirit:name>
|
142
|
+
<spirit:description>Interrupt Identification Register</spirit:description>
|
143
|
+
<spirit:addressOffset>0x8</spirit:addressOffset>
|
144
|
+
<spirit:size>32</spirit:size>
|
145
|
+
<spirit:access>read-only</spirit:access>
|
146
|
+
<spirit:reset>
|
147
|
+
<spirit:value>0x01</spirit:value>
|
148
|
+
</spirit:reset>
|
149
|
+
</spirit:register>
|
150
|
+
<spirit:register>
|
151
|
+
<spirit:name>UART_REG_FCR</spirit:name>
|
152
|
+
<spirit:description>FIFO Control Register</spirit:description>
|
153
|
+
<spirit:addressOffset>0x8</spirit:addressOffset>
|
154
|
+
<spirit:size>32</spirit:size>
|
155
|
+
<spirit:access>write-only</spirit:access>
|
156
|
+
<spirit:reset>
|
157
|
+
<spirit:value>0x01</spirit:value>
|
158
|
+
</spirit:reset>
|
159
|
+
</spirit:register>
|
160
|
+
<spirit:register>
|
161
|
+
<spirit:name>UART_REG_LCR</spirit:name>
|
162
|
+
<spirit:description>Line Control Register</spirit:description>
|
163
|
+
<spirit:addressOffset>0xC</spirit:addressOffset>
|
164
|
+
<spirit:size>32</spirit:size>
|
165
|
+
<spirit:access>read-write</spirit:access>
|
166
|
+
<spirit:reset>
|
167
|
+
<spirit:value>0x0B</spirit:value>
|
168
|
+
</spirit:reset>
|
169
|
+
</spirit:register>
|
170
|
+
<spirit:register>
|
171
|
+
<spirit:name>UART_REG_LSR</spirit:name>
|
172
|
+
<spirit:description>Line Status Register</spirit:description>
|
173
|
+
<spirit:addressOffset>0x14</spirit:addressOffset>
|
174
|
+
<spirit:size>32</spirit:size>
|
175
|
+
<spirit:access>read-write</spirit:access>
|
176
|
+
<spirit:reset>
|
177
|
+
<spirit:value>0x20</spirit:value>
|
178
|
+
</spirit:reset>
|
179
|
+
</spirit:register>
|
180
|
+
</spirit:addressBlock>
|
181
|
+
</spirit:memoryMap>
|
182
|
+
</spirit:memoryMaps>
|
183
|
+
<spirit:model>
|
184
|
+
<spirit:views>
|
185
|
+
<spirit:view>
|
186
|
+
<spirit:name>PVPVT</spirit:name>
|
187
|
+
<spirit:envIdentifier>:*Simulation:</spirit:envIdentifier>
|
188
|
+
<spirit:language>systemc2.1</spirit:language>
|
189
|
+
<spirit:modelName>uart</spirit:modelName>
|
190
|
+
<spirit:fileSetRef>
|
191
|
+
<spirit:localName>uartScmlFileSet</spirit:localName>
|
192
|
+
</spirit:fileSetRef>
|
193
|
+
</spirit:view>
|
194
|
+
</spirit:views>
|
195
|
+
<spirit:ports>
|
196
|
+
<spirit:port>
|
197
|
+
<spirit:name>pPVTargetPort</spirit:name>
|
198
|
+
<spirit:transactional>
|
199
|
+
<spirit:transTypeDef>
|
200
|
+
<spirit:typeName>PVTarget_port</spirit:typeName>
|
201
|
+
<spirit:typeDefinition>PV/PV.h</spirit:typeDefinition>
|
202
|
+
</spirit:transTypeDef>
|
203
|
+
<spirit:service>
|
204
|
+
<spirit:initiative>provides</spirit:initiative>
|
205
|
+
<spirit:serviceTypeDefs>
|
206
|
+
<spirit:serviceTypeDef>
|
207
|
+
<spirit:typeName spirit:implicit="true">SCML</spirit:typeName>
|
208
|
+
<spirit:parameters>
|
209
|
+
<spirit:parameter>
|
210
|
+
<spirit:name>DT</spirit:name>
|
211
|
+
<spirit:value spirit:resolve="immediate">DATA_TYPE</spirit:value>
|
212
|
+
</spirit:parameter>
|
213
|
+
<spirit:parameter>
|
214
|
+
<spirit:name>AT</spirit:name>
|
215
|
+
<spirit:value spirit:resolve="immediate">ADDRESS_TYPE</spirit:value>
|
216
|
+
</spirit:parameter>
|
217
|
+
</spirit:parameters>
|
218
|
+
</spirit:serviceTypeDef>
|
219
|
+
</spirit:serviceTypeDefs>
|
220
|
+
</spirit:service>
|
221
|
+
</spirit:transactional>
|
222
|
+
<spirit:access>
|
223
|
+
<spirit:portAccessType>ref</spirit:portAccessType>
|
224
|
+
<spirit:portAccessHandle>pPVTargetPort</spirit:portAccessHandle>
|
225
|
+
</spirit:access>
|
226
|
+
</spirit:port>
|
227
|
+
<spirit:port>
|
228
|
+
<spirit:name>pSerialOut</spirit:name>
|
229
|
+
<spirit:transactional>
|
230
|
+
<spirit:transTypeDef>
|
231
|
+
<spirit:typeName>sc_port</spirit:typeName>
|
232
|
+
<spirit:typeDefinition>systemc.h</spirit:typeDefinition>
|
233
|
+
</spirit:transTypeDef>
|
234
|
+
<spirit:service>
|
235
|
+
<spirit:initiative>requires</spirit:initiative>
|
236
|
+
<spirit:serviceTypeDefs>
|
237
|
+
<spirit:serviceTypeDef>
|
238
|
+
<spirit:typeName>tlm::tlm_blocking_put_if</spirit:typeName>
|
239
|
+
<spirit:typeDefinition>tlm_interfaces/tlm_core_ifs.h</spirit:typeDefinition>
|
240
|
+
<spirit:parameters>
|
241
|
+
<spirit:parameter>
|
242
|
+
<spirit:name>DATATYPE</spirit:name>
|
243
|
+
<spirit:value>SERIAL_DATA_STRUCTURE</spirit:value>
|
244
|
+
</spirit:parameter>
|
245
|
+
</spirit:parameters>
|
246
|
+
</spirit:serviceTypeDef>
|
247
|
+
</spirit:serviceTypeDefs>
|
248
|
+
</spirit:service>
|
249
|
+
</spirit:transactional>
|
250
|
+
<spirit:access>
|
251
|
+
<spirit:portAccessType>ref</spirit:portAccessType>
|
252
|
+
<spirit:portAccessHandle>pSerialOut</spirit:portAccessHandle>
|
253
|
+
</spirit:access>
|
254
|
+
</spirit:port>
|
255
|
+
<spirit:port>
|
256
|
+
<spirit:name>pSerialIn</spirit:name>
|
257
|
+
<spirit:transactional>
|
258
|
+
<spirit:transTypeDef>
|
259
|
+
<spirit:typeName>sc_export</spirit:typeName>
|
260
|
+
<spirit:typeDefinition>systemc.h</spirit:typeDefinition>
|
261
|
+
</spirit:transTypeDef>
|
262
|
+
<spirit:service>
|
263
|
+
<spirit:initiative>provides</spirit:initiative>
|
264
|
+
<spirit:serviceTypeDefs>
|
265
|
+
<spirit:serviceTypeDef>
|
266
|
+
<spirit:typeName>tlm::tlm_blocking_put_if</spirit:typeName>
|
267
|
+
<spirit:typeDefinition>tlm_interfaces/tlm_core_ifs.h</spirit:typeDefinition>
|
268
|
+
<spirit:parameters>
|
269
|
+
<spirit:parameter>
|
270
|
+
<spirit:name>DATATYPE</spirit:name>
|
271
|
+
<spirit:value>SERIAL_DATA_STRUCTURE</spirit:value>
|
272
|
+
</spirit:parameter>
|
273
|
+
</spirit:parameters>
|
274
|
+
</spirit:serviceTypeDef>
|
275
|
+
</spirit:serviceTypeDefs>
|
276
|
+
</spirit:service>
|
277
|
+
</spirit:transactional>
|
278
|
+
<spirit:access>
|
279
|
+
<spirit:portAccessType>ref</spirit:portAccessType>
|
280
|
+
<spirit:portAccessHandle>pSerialIn</spirit:portAccessHandle>
|
281
|
+
</spirit:access>
|
282
|
+
</spirit:port>
|
283
|
+
<spirit:port>
|
284
|
+
<spirit:name>pReset</spirit:name>
|
285
|
+
<spirit:wire>
|
286
|
+
<spirit:direction>in</spirit:direction>
|
287
|
+
<spirit:wireTypeDefs>
|
288
|
+
<spirit:wireTypeDef>
|
289
|
+
<spirit:typeName>bool</spirit:typeName>
|
290
|
+
<spirit:typeDefinition>systemc.h</spirit:typeDefinition>
|
291
|
+
<spirit:viewNameRef>PVPVT</spirit:viewNameRef>
|
292
|
+
</spirit:wireTypeDef>
|
293
|
+
</spirit:wireTypeDefs>
|
294
|
+
</spirit:wire>
|
295
|
+
</spirit:port>
|
296
|
+
<spirit:port>
|
297
|
+
<spirit:name>pInterrupt</spirit:name>
|
298
|
+
<spirit:wire>
|
299
|
+
<spirit:direction>out</spirit:direction>
|
300
|
+
<spirit:wireTypeDefs>
|
301
|
+
<spirit:wireTypeDef>
|
302
|
+
<spirit:typeName>int</spirit:typeName>
|
303
|
+
<spirit:typeDefinition>systemc.h</spirit:typeDefinition>
|
304
|
+
<spirit:viewNameRef>PVPVT</spirit:viewNameRef>
|
305
|
+
</spirit:wireTypeDef>
|
306
|
+
</spirit:wireTypeDefs>
|
307
|
+
</spirit:wire>
|
308
|
+
</spirit:port>
|
309
|
+
</spirit:ports>
|
310
|
+
</spirit:model>
|
311
|
+
<spirit:fileSets>
|
312
|
+
<spirit:fileSet>
|
313
|
+
<spirit:name>uartScmlFileSet</spirit:name>
|
314
|
+
<spirit:file>
|
315
|
+
<spirit:name>./tlmsrc/inc/uart.h</spirit:name>
|
316
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
317
|
+
<spirit:isIncludeFile spirit:externalDeclarations="true">true</spirit:isIncludeFile>
|
318
|
+
<spirit:logicalName>uartScml</spirit:logicalName>
|
319
|
+
</spirit:file>
|
320
|
+
<spirit:file>
|
321
|
+
<spirit:name>./tlmsrc/inc/uart_fifo.h</spirit:name>
|
322
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
323
|
+
<spirit:isIncludeFile>true</spirit:isIncludeFile>
|
324
|
+
<spirit:logicalName>uartScml</spirit:logicalName>
|
325
|
+
</spirit:file>
|
326
|
+
<spirit:file>
|
327
|
+
<spirit:name>./tlmsrc/inc/uart_types.h</spirit:name>
|
328
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
329
|
+
<spirit:isIncludeFile>true</spirit:isIncludeFile>
|
330
|
+
<spirit:logicalName>IphUartIF</spirit:logicalName>
|
331
|
+
</spirit:file>
|
332
|
+
<spirit:file>
|
333
|
+
<spirit:name>./tlmsrc/inc/uart_memory_map.h</spirit:name>
|
334
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
335
|
+
<spirit:isIncludeFile>true</spirit:isIncludeFile>
|
336
|
+
<spirit:logicalName>IphUartIF</spirit:logicalName>
|
337
|
+
</spirit:file>
|
338
|
+
<spirit:file>
|
339
|
+
<spirit:name>./tlmsrc/src/uart.cpp</spirit:name>
|
340
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
341
|
+
<spirit:logicalName>uartScml</spirit:logicalName>
|
342
|
+
<spirit:buildCommand>
|
343
|
+
<spirit:command>true</spirit:command>
|
344
|
+
</spirit:buildCommand>
|
345
|
+
</spirit:file>
|
346
|
+
<spirit:file>
|
347
|
+
<spirit:name>./tlmsrc/src/uart_register_bank.cpp</spirit:name>
|
348
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
349
|
+
<spirit:logicalName>uartScml</spirit:logicalName>
|
350
|
+
<spirit:buildCommand>
|
351
|
+
<spirit:command>true</spirit:command>
|
352
|
+
</spirit:buildCommand>
|
353
|
+
</spirit:file>
|
354
|
+
<spirit:file>
|
355
|
+
<spirit:name>./tlmsrc/src/uart_interrupt_handler.cpp</spirit:name>
|
356
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
357
|
+
<spirit:logicalName>uartScml</spirit:logicalName>
|
358
|
+
<spirit:buildCommand>
|
359
|
+
<spirit:command>true</spirit:command>
|
360
|
+
</spirit:buildCommand>
|
361
|
+
</spirit:file>
|
362
|
+
<spirit:file>
|
363
|
+
<spirit:name>./tlmsrc/src/uart_serial_tx_rx.cpp</spirit:name>
|
364
|
+
<spirit:fileType>systemCSource-2.1</spirit:fileType>
|
365
|
+
<spirit:logicalName>uartScml</spirit:logicalName>
|
366
|
+
<spirit:buildCommand>
|
367
|
+
<spirit:command>true</spirit:command>
|
368
|
+
</spirit:buildCommand>
|
369
|
+
</spirit:file>
|
370
|
+
</spirit:fileSet>
|
371
|
+
</spirit:fileSets>
|
372
|
+
</spirit:component>
|