XTSC RM
XTSC RM
Reference Manual
This publication is provided "AS IS." Cadence Design Systems, Inc. (hereafter "Cadence") does not
make any warranty of any kind, either expressed or implied, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose. Information in this document
is provided solely to enable system and software developers to use Tensilica processors. Unless
specifically set forth herein, there are no express or implied patent, copyright or any other intellectual
property rights or licenses granted hereunder to design or fabricate Tensilica integrated circuits or
integrated circuits based on the information in this document. Tensilica does not warrant that the
contents of this publication, whether individually or as one or more groups, meets your require-
ments or that the publication is error-free. This publication could include technical inaccuracies or
typographical errors. Changes may be made to the information herein, and these changes may be
incorporated in new editions of this publication.
Cadence, the Cadence logo, Allegro, Assura, Broadband Spice, CDNLIVE!, Celtic, Chipesti-
mate.com, Conformal, Connections, Denali, Diva, Dracula, Encounter, Flashpoint, FLIX, First
Encounter, Incisive, Incyte, InstallScape, NanoRoute, NC-Verilog, OrCAD, OSKit, Palladium,
PowerForward, PowerSI, PSpice, Purespec, Puresuite, Quickcycles, SignalStorm, Sigrity, SKILL,
SoC Encounter, SourceLink, Spectre, Specman, Specman-Elite, SpeedBridge, Stars & Strikes,
Tensilica, TripleCheck, TurboXim, Vectra, Virtuoso, VoltageStorm Xplorer, Xtensa, and Xtreme are
either trademarks or registered trademarks of Cadence Design Systems, Inc. in the United States
and/or other jurisdictions. OSCI, SystemC, Open SystemC, Open SystemC Initiative, and SystemC
Initiative are registered trademarks of Open SystemC Initiative, Inc. in the United States and other
countries and are used with permission. All other trademarks are the property of their respective
holders.
This product includes software developed by the Apache Software Foundation
(http://www.apache.org/).
Contents
Changes vii
1 Introduction 1
1.1 The XTSC Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Using the XTSC Documentation . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Changes from the Previous Version . . . . . . . . . . . . . . . . . . . . . . . 7
2 Namespace Index 19
2.1 Namespace List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 Class Index 21
3.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Class Index 27
4.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5 File Index 33
5.1 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6 Namespace Documentation 35
6.1 xtsc Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.2 xtsc_component Namespace Reference . . . . . . . . . . . . . . . . . . . . . 100
List of Figures
1. Introduction
The Xtensa SystemC package (XTSC) supports both transaction-level modeling (TLM) and
pin-level modeling of Xtensa cores in a system-on-a-chip (SOC) SystemC simulation envi-
ronment.
Note: Transaction level modeling is a general concept that makes use of function calls to
simulate inter-module communication instead of toggling signals as is done in a pin-level
interface. Xtensa TLM, OSCI TLM1, and OSCI TLM2 are specific implementations of this
general concept. Although Xtensa TLM makes use of the general SystemC TLM mech-
anisms (sc_interface, sc_export, and sc_port) and can coexist with either OSCI TLM1 or
OSCI TLM2, it is important to point out that Xtensa TLM is not OSCI TLM1 nor OSCI
TLM2. Although Xtensa TLM is distinct from OSCI TLM1/TLM2, the XTSC packages in-
cludes transactor modules for converting memory interfaces between Xtensa TLM and
OSCI TLM2.
The XTSC package includes the following items:
1. The XTSC core library and the associated header files needed to use it. Among
other things, this library gives access to the Xtensa Instruction Set Simulator (ISS) in
the form of a SystemC module (sc_module) and to the Xtensa TLM interface classes
used for transaction-level intermodule communication.
2. The XTSC example component library and all source and header files needed to use
or re-build it. This library contains a set of configurable SOC example components in
the form of SystemC modules. These components include Xtensa TLM memory, ar-
biter, router, queue, and lookup modules; pin-level memory, queue, and lookup mod-
ules; transactors to convert memory interfaces between Xtensa TLM and pin-level;
and transactors to convert between Xtensa TLM and OSCI TLM2. The component
library also includes a set of testbench modules that drive a Xtensa TLM or pin-level
interface based on a script file. These testbench modules provide a convenient and
powerful means to perform system and module bring-up.
3. A set of example projects illustrating each of the Xtensa core and SOC component
modules.
4. The xtsc-run program to quickly build and simulate simple to complex systems com-
prised of XTSC components, to generated an sc_main.cpp file for later customization
by the user, or to generate the files necessary to co-simulate an arbitrary XTSC sys-
tem with user-provided Verilog modules. The xtsc-run program includes the --load_-
library command to support 3rd party plugin modules.
The XTSC core and component libraries are documented in this reference manaul.
The XTSC core library contains objects in the xtsc namespace. This includes:
The static version of the XTSC core library is called libxtsc.a on Linux platforms and
xtsc.lib (for release builds) and xtscd.lib (for debug builds) on MS Windows platforms (the
shared/dynamic versions have a "_sh" suffix).
The xtsc_core class wraps an Xtensa Instruction Set Simulator in a SystemC module. It
includes methods to allow Xtensa TLM port binding to all the local memory ports, the
Xtensa Local Memory Interface (XLMI) port, the processor interface (PIF) port, all user-
defined Tensilica Instruction Extension (TIE) interfaces, and certain system-level input and
output ports. The TIE interfaces include output queues, input queues, lookups, export
states, and import wires. In addition, it supports pin-level ports for each of its TIE and
system-level ports.
The xtsc_core class also includes methods for loading the core’s program, loading simu-
lation clients, stepping the core, probing the core’s state, querying the core’s construction
parameters, and setting up the core for debugger control.
The Xtensa TLM interface classes play the major role in defining the transaction-level com-
munication between Xtensa cores and various SOC component modules. An arbitrary
TLM module can be connected to an xtsc_core module only if it is using the Xtensa TLM
interface classes.
The Xtensa TLM interface classes are:
The XTSC core library includes many non-member functions and macros, such as:
In addition to the Xtensa TLM interface classes and the xtsc_core class, the XTSC core
library includes the following classes:
The XTSC example component library contains objects in the xtsc_component namespace.
The XTSC component library module classes can be divided into three categories, de-
pending upon whether they are meant to model components of an SOC, are transactors for
converting from one communication abstraction to another, or whether they are test bench
components used to test core or SOC components.
The XTSC component library SOC modules are modeled at a more abstract level than
xtsc_core (which models the Xtensa processor to a high degree of accuracy). Because of
this abstraction, the modules may not exactly correspond to any real hardware implemen-
tation. However, the XTSC component library modules are highly configurable and if the
desired behavior is not available, you can modify the XTSC component library module or
write a new module to have the desired behavior.
The following list shows the SOC module names and a brief description:
The following list shows the transactor module names and a brief description:
--------------------- -----------------------------------------------
xtsc_pin2tlm_memory_transactor
A transactor for converting any Xtensa
memory interface from pin-level to Xtensa TLM.
xtsc_tlm2pin_memory_transactor
A transactor for converting any Xtensa
memory interface from Xtensa TLM to pin-level.
xtsc_tlm22xttlm_transactor
A transactor for converting an OSCI TLM2
memory interface master to an Xtensa TLM memory
interface master.
xtsc_xttlm2tlm2_transactor
A transactor for converting an Xtensa TLM memory
interface master to an OSCI TLM2 memory
interface master.
The following list shows the test bench module names and a brief description:
The static version of the XTSC component library is called libxtsc_comp.a on Linux plat-
forms, and xtsc_comp.lib (for release builds) and xtsc_compd.lib (for debug builds) on MS
Windows platforms (the shared/dynamic versions have a "_sh" suffix). The installation in-
cludes all header files needed to use the library as installed, and all implementation files,
header files, and make or project files needed to modify and re-build the library.
The PDF and HTML forms of this document can be found in your Xtensa Xplorer installation
under (for example): .../XtDevTools/downloads/RG-2018.9/docs
The C++ headers files an be found at (for example): .../XtDevTools/install/tools/RG-2018.9-
linux/XtensaTools/include/xtsc ...-2018.9-win32
The PDF and HTML forms of this document are generated from the C++ header files using
the doxygen system (available from http://sourceforge.net/projects/doxygen).
The XTSC documentation is extensively cross-referenced and we find it easiest to use the
documentation on-line because the printed form loses the convenience of the hyper-linked
cross-references.
When viewing the PDF version of the reference manual using Adobe Reader, we find it
convenient to expand the "Class Documentation" bookmark so that all the classes are
listed along the left-hand side.
When viewing the HTML version using a browser that supports frames, the same thing can
be accomplished by expanding the "Class List" bookmark.
The user’s guide provides an introduction to the XTSC package, gets you going with the
XTSC examples, and tells you how the various pieces of XTSC tie together. In addition, it
includes a tutorial that uses the xtsc-run program as a vehicle to introduce the user to the
XTSC package.
The XTSC examples are installed with each Xtensa processor configuration. They are
meant to illustrate each of the XTSC modules as well as help jump-start custom mod-
ule development. The XTSC examples are documented in the "Xtensa SystemC (XTSC)
User’s Guide".
Please see the "Xtensa SystemC (XTSC) User’s Guide" for further documentation of the
xtsc-run program and for the xtsc-run tutorial.
The purpose of this reference manual is to document each class, each data member, each
method, and each parameter. Because of this it is painful to read straight through and
doing so is not the recommended way to gain an understanding of the XTSC package. The
user’s guide is meant to serve that purpose. On the other hand, the user’s guide does not
attempt to completely document any of the classes, members, etc. Its main purpose is to
orient you to the XTSC package, tell you how things tie together, and provide a roadmap of
where to go in the reference manual for complete information or which examples to look at
for concrete code.
In short, when using XTSC, Cadence recommends you keep all four parts of the docu-
mentation handy, use the tutorial in the user’s guide as the starting point, and refer to
the reference manuals and examples as required. For further guidelines, please consult
Chapter 1 of the user’s guide.
The following changes were made to this document for the Xtensa Tools version 12.0.9
released with the Cadence Tensilica RG-2018.9 release.
• Optionally support extended PIF burst transactions of from 2 to 16 beats on the iDMA
port of LX configs.
The following changes were made to this document for the Xtensa Tools version 12.0.8
released with the Cadence Tensilica RG-2017.8 release.
• Added ability to peek/poke a specific memory port without going through ISS decoder
logic:
• Added an example to show how to take an existing XTSC component library model
and modify it as a first step of custom model development.
– See xtsc::xtsc_plugin_interface
– See the <xtsc_examples_root>/xtsc.component.plugin example in the installa-
tion of any config.
The following changes were made to this document for the Xtensa Tools version 12.0.7
released with the Cadence Tensilica RG-2017.7 release.
• Support having a single line Lua snippet using the "#lua" construct in xtsc::xtsc_-
script_file.
• Added support to xtsc_component::xtsc_dma_engine to allow overlapped reads and
writes, to allow overlapped descriptors, to allow unused descriptors to be pro-
grammed while the DMA engine is running, and to reuse the read request tag on
the corresponding write request for easier matching in the xtsc.log file:
– See "max_reads", "max_writes", "overlapped_descriptors", "start_at_index_1",
and "reuse_tag" in xtsc_component::xtsc_dma_engine_parms.
– See "start_at_index_1" and done_descriptor under xtsc_component::xtsc_-
dma_request and xtsc_component::xtsc_dma_request::done_descriptor.
• Added commands and methods to xtsc_component::xtsc_dma_engine to allow
dumping a descriptor or a range of descriptors:
– See the "dump_descriptor" and "dump_descriptors" commands under xtsc_-
component::xtsc_dma_engine::execute().
– See xtsc_component::xtsc_dma_engine::dump_descriptor().
– See xtsc_component::xtsc_dma_engine::dump_descriptors().
• Improved latency and lifetime tracking in xtsc_component::xtsc_memory_trace:
– See new parameters "allow_tracing" and "num_transfers" in xtsc_-
component::xtsc_memory_trace_parms.
– See xtsc_component::xtsc_memory_trace::dump_statistic_info().
– See xtsc_component::xtsc_memory_trace::dump_latency_histogram().
– See xtsc_component::xtsc_memory_trace::dump_lifetime_histogram().
– See xtsc_component::xtsc_memory_trace::get_counter().
• Allow parameter "num_ports" to be 0 in xtsc_component::xtsc_memory_parms.
• Allow subtracting out pin-level interfaces using a minus sign. See "SimPinLevelInter-
faces" in xtsc::xtsc_core_parms.
• Added ability to xtsc::xtsc_core to turn logging of disassembly on or off during simu-
lation:
– See command "log_disassembly" under xtsc::xtsc_core::execute().
– See xtsc::xtsc_core::log_disassembly().
• Improved ability to determine the clock factor and clock period factor during simula-
tion:
– See xtsc_component::xtsc_queue::peek().
– See xtsc_component::xtsc_queue::poke().
– See xtsc_component::xtsc_queue::num_available().
– See xtsc_component::xtsc_queue::num_free().
The following changes were made to this document for the Xtensa Tools version 12.0.5
released with the Cadence Tensilica RG-2017.5 release.
• Note: Users building the simulator using OSCI/ASC XTSC libraries on MS Windows
now need to add advapi32.lib to the link line.
• Note: Users building the simulator using OSCI/ASC XTSC libraries on Linux now
need to link with the realtime library (-l rt).
The following changes were made to this document for the Xtensa Tools version 12.0.4
released with the Cadence Tensilica RG-2016.4 release.
• Note: XTSC libraries for co-simulation with 32-bit releases of Mentor Graphics Ques-
taSim and Synopsys VCS are deprecated in this release. Libraries for 64-bit simula-
tors will continue to be supported, but 32-bit libraries will be discontinued in a future
release.
• Added support for creating multiple XTSC log files in the same directory at the same
time. With this release, a TextLogger.txt entry of
log4xtensa.appender.file.File=xtsc$(XTSC_LOG_UNIQUIFIER).log
will be translated like the following depending on the value of environment variable
XTSC_LOG_UNIQUIFIER:
The following changes were made to this document for the Xtensa Tools version 12.0.3
released with the Cadence Tensilica RG-2016.3 release.
• The port-binding informatation in xtsc_core was updated to reflect the use of the
xtsc_connect() method.
– See xtsc::xtsc_core::How_to_do_port_binding
– See xtsc::xtsc_core::How_to_do_memory_port_binding
– See xtsc::xtsc_core::How_to_do_tie_lookup_binding
– See xtsc::xtsc_core::How_to_do_tie_queue_binding
– See xtsc::xtsc_core::How_to_do_tie_import_wire_binding
– See xtsc::xtsc_core::How_to_do_tie_export_state_binding
– See xtsc::xtsc_core::How_to_do_system_input_wire_binding
– See xtsc::xtsc_core::How_to_do_system_output_wire_binding
– See xtsc::xtsc_core::How_to_do_output_pin_binding;
– See xtsc::xtsc_core::How_to_do_input_pin_binding;
• Added support to xtsc_component::xtsc_pin2tlm_memory_transactor for scenarios
where the master device is only allowed to have 1 request outstanding at a time.
– See the "one_at_a_time" parameter of xtsc_component::xtsc_pin2tlm_-
memory_transactor_parms.
• Exposed xtsc::xtsc_dump_systemc_objects as an XTSC command and added sup-
port for an optional pattern.
• Improved documentation of xtsc::xtsc_reset().
• Log PIF request priority xtsc::xtsc_request::dump() so it is visible in the xtsc.log file.
The following changes were made to this document for the Xtensa Tools version 12.0.1
released with the Cadence Tensilica RG-2015.1 release.
• To satisfy the Xtensa ISS requirement to always get PIF/iDMA write responses, the
xtsc::xtsc_core model will now generate fake write responses by default on configs
which do not have write responses configured. See "SimPIFFakeWriteResponses"
in xtsc::xtsc_core_parms and "write_responses" in xtsc_component::xtsc_memory_-
parms.
• XTSC now supports DataRAM subbanks:
– See "DataRAMSubbanks" in xtsc::xtsc_core_parms.
xtsc-run -dump_script_file=my_script_file.vec
• The XTSC command facility has been enhanced to allow querying and setting log
levels. You can get more information using xtsc-run:
xtsc-run -cmd
cmd: man *log*
The following changes were made to this document for the Xtensa Tools version 12.0.0
released with the Cadence Tensilica RG-2015.0 release.
• Added support for the internal DMA (iDMA) interfaces to xtsc::xtsc_core. This in-
cludes the iDMA memory interface, the "TrigIn_iDMA" system-level input, and the
"TrigOut_iDMA" system-level output. Xtensa TLM and pin-level are supported in
XTSC.
– See the "iDMACount" and "SimPinLevelInterfaces" parameters of xtsc::xtsc_-
core_parms.
2. Namespace Index
3. Class Index
transaction_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
transaction_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
transaction_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
udma_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
watchfilter_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
watchfilter_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
xtsc_address_range_entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
xtsc_command_handler_interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
xtsc_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
xtsc_udma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165
xtsc_arbiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
xtsc_lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
xtsc_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
xtsc_master_tlm2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
xtsc_memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
xtsc_cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
xtsc_dma_engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
xtsc_memory_tlm2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
xtsc_memory_trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668
xtsc_mmio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
xtsc_queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
xtsc_queue_consumer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
xtsc_queue_producer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
xtsc_router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004
xtsc_tlm22xttlm_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083
xtsc_tlm2pin_memory_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . 1097
xtsc_wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191
xtsc_wire_logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1200
xtsc_xttlm2tlm2_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1259
xtsc_connection_interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
xtsc_module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
xtsc_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
xtsc_tx_loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1138
xtsc_udma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165
xtsc_arbiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
xtsc_lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
xtsc_lookup_driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
xtsc_lookup_pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
xtsc_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
xtsc_master_tlm2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
xtsc_memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
xtsc_memory_pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
xtsc_memory_tlm2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
xtsc_memory_trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668
xtsc_mmio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
xtsc_pin2tlm_lookup_transactor . . . . . . . . . . . . . . . . . . . . . . . . 761
xtsc_pin2tlm_memory_transactor . . . . . . . . . . . . . . . . . . . . . . . . 769
xtsc_queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
xtsc_queue_consumer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
xtsc_queue_pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
xtsc_queue_producer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
xtsc_router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004
xtsc_slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1069
xtsc_tlm22xttlm_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083
xtsc_tlm2pin_memory_transactor . . . . . . . . . . . . . . . . . . . . . . . . 1097
xtsc_wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191
xtsc_wire_logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1200
xtsc_wire_source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1226
xtsc_xttlm2tlm2_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . . 1259
xtsc_debug_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
xtsc_request_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944
xtsc_slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1069
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927
xtsc_request_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
xtsc_debug_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
xtsc_debug_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
xtsc_debug_if_cap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
xtsc_dma_descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
xtsc_dma_request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
xtsc_exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
xtsc_fast_access_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
xtsc_fast_access_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
xtsc_fast_access_request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
xtsc_fast_access_revocation_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
xtsc_filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
xtsc_lookup_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
xtsc_rer_lookup_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959
xtsc_wer_lookup_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1188
xtsc_lookup_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
xtsc_lookup_driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
xtsc_memory_b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
xtsc_memory_base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
xtsc_mode_switch_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
xtsc_udma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165
xtsc_xttlm2tlm2_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1259
xtsc_module_pin_base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
xtsc_memory_pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
xtsc_pin2tlm_memory_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . 769
xtsc_tlm2pin_memory_transactor . . . . . . . . . . . . . . . . . . . . . . . . . . 1097
xtsc_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
xtsc_core_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
xtsc_initialize_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
xtsc_tx_loader_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1150
xtsc_udma_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1182
xtsc_arbiter_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
xtsc_lookup_driver_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
xtsc_lookup_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
xtsc_lookup_pin_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
xtsc_master_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
xtsc_master_tlm2_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
xtsc_memory_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
xtsc_cache_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
xtsc_dma_engine_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
xtsc_memory_pin_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
xtsc_memory_tlm2_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
xtsc_memory_trace_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
xtsc_mmio_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
xtsc_pin2tlm_lookup_transactor_parms . . . . . . . . . . . . . . . . . . . . . . 766
xtsc_pin2tlm_memory_transactor_parms . . . . . . . . . . . . . . . . . . . . . 789
xtsc_queue_consumer_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
xtsc_queue_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
xtsc_queue_pin_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
xtsc_queue_producer_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870
xtsc_router_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026
xtsc_slave_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077
xtsc_tlm22xttlm_transactor_parms . . . . . . . . . . . . . . . . . . . . . . . . . 1094
xtsc_tlm2pin_memory_transactor_parms . . . . . . . . . . . . . . . . . . . . . 1122
xtsc_wire_logic_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1213
xtsc_wire_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1219
xtsc_wire_source_parms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1237
xtsc_xttlm2tlm2_transactor_parms . . . . . . . . . . . . . . . . . . . . . . . . . 1276
xtsc_pin2tlm_wire_transactor< W, T > . . . . . . . . . . . . . . . . . . . . . . . . . 797
xtsc_plugin_interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
xtsc_queue_pop_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
xtsc_queue_pop_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
xtsc_queue_pop_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
xtsc_queue_pop_if_multi_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
xtsc_queue_consumer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
xtsc_queue_push_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
xtsc_queue_push_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
xtsc_queue_push_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
xtsc_queue_push_if_multi_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
xtsc_queue_producer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
xtsc_request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
xtsc_resettable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962
xtsc_module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
xtsc_respond_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 966
xtsc_pif_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
xtsc_ram_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
xtsc_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971
xtsc_respond_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969
xtsc_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 987
xtsc_sc_in_sc_bv_base_adapter< W, T > . . . . . . . . . . . . . . . . . . . . . . . 1038
xtsc_sc_in_sc_bv_base_adapter_base< W, T > . . . . . . . . . . . . . . . . . . . 1039
xtsc_sc_in_sc_uint_base_adapter< W, T > . . . . . . . . . . . . . . . . . . . . . . 1041
xtsc_sc_in_sc_uint_base_adapter_base< W, T > . . . . . . . . . . . . . . . . . . 1042
xtsc_sc_out_sc_bv_base_adapter< W, T > . . . . . . . . . . . . . . . . . . . . . . 1044
xtsc_sc_out_sc_bv_base_adapter_base< W, T > . . . . . . . . . . . . . . . . . . 1046
xtsc_sc_out_sc_uint_base_adapter< W, T > . . . . . . . . . . . . . . . . . . . . . 1048
xtsc_sc_out_sc_uint_base_adapter_base< W, T > . . . . . . . . . . . . . . . . . . 1050
xtsc_script_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052
xtsc_signal_sc_bv_base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064
xtsc_signal_sc_bv_base_floating . . . . . . . . . . . . . . . . . . . . . . . . . . 1066
xtsc_signal_sc_uint_base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1068
xtsc_switch_registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1081
xtsc_tlm2pin_wire_transactor< W, T > . . . . . . . . . . . . . . . . . . . . . . . . . 1133
xtsc_tx_xfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153
xtsc_tx_xfer_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160
xtsc_tx_xfer_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162
XTSC_VERSION_INFO_STRING . . . . . . . . . . . . . . . . . . . . . . . . . . . 1187
xtsc_wire_read_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1224
xtsc_wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191
xtsc_wire_write_if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1242
xtsc_tlm2pin_wire_transactor_base< W, T > . . . . . . . . . . . . . . . . . . . 1135
xtsc_wire_write_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1256
xtsc_wire_write_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1253
xtsc_wire_write_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244
xtsc_wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191
xtsc_wire_write_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247
xtsc_wire_source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1226
xtsc_wire_write_if_impl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1250
4. Class Index
Here are the classes, structs, unions and interfaces with brief descriptions:
address_info (POD class to help keep track of information related to a special
address or address range ) . . . . . . . . . . . . . . . . . . . . . . . . . . 107
address_range (Class to keep track of address ranges and what DMI access has
been granted/invalidated ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
address_range (Class to keep track of address ranges and what DMI access has
been granted/invalidated ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
bit_field_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
input_definition (Input definition and sc_export ) . . . . . . . . . . . . . . . . . . . 112
input_definition (Input definition and sc_export ) . . . . . . . . . . . . . . . . . . . 114
iterator_definition (Iterator definition ) . . . . . . . . . . . . . . . . . . . . . . . . . . 117
line_info (Cache line data structure ) . . . . . . . . . . . . . . . . . . . . . . . . . . 119
nb_mm (Class for tlm_mm_interface for nb_transport ) . . . . . . . . . . . . . . . . 120
output_definition (Output definition and sc_port ) . . . . . . . . . . . . . . . . . . . 121
output_definition (Output definition and sc_port ) . . . . . . . . . . . . . . . . . . . 123
output_definition (Output definition and sc_port ) . . . . . . . . . . . . . . . . . . . 126
output_info (Information about a delayed output value ) . . . . . . . . . . . . . . . 128
pif_req_info (Information about each request ) . . . . . . . . . . . . . . . . . . . . 129
port_policy_info (Information from "arbitration_policy" for arbitrate_policy() ) . . . . 131
register_definition (Register definition and value ) . . . . . . . . . . . . . . . . . . . 132
req_cntl (Class to manage the bits of POReqCntl/PIReqCntl ) . . . . . . . . . . . . 134
req_rsp_info (Information for PIF width converter (PWC) mode ) . . . . . . . . . . 137
req_rsp_info (Information for PIF width converter (PWC) mode ) . . . . . . . . . . 139
request_info (Information about each request ) . . . . . . . . . . . . . . . . . . . . 141
request_info (Information about each request ) . . . . . . . . . . . . . . . . . . . . 144
request_info (Information about each request ) . . . . . . . . . . . . . . . . . . . . 146
request_info (Information about each request ) . . . . . . . . . . . . . . . . . . . . 147
resp_cntl (Class to manage the bits of PORespCntl/PIRespCntl/SnoopRespCntl ) 149
response_info (Information about each response ) . . . . . . . . . . . . . . . . . . 151
response_info (Information about each response ) . . . . . . . . . . . . . . . . . . 153
response_info (This class helps keep track of a response and when it is due ) . . . 155
response_info (Information about each response ) . . . . . . . . . . . . . . . . . . 157
sc_unwind_exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
statistic_info (This class is used to keep track of transaction statistics ) . . . . . . . 160
stream_dumper (Helper class to make it easy to dump xtsc_response to an os-
tream with or without data values ) . . . . . . . . . . . . . . . . . . . . . . 162
stream_dumper (Helper class to make it easy to dump xtsc_request to an ostream
with or without data values ) . . . . . . . . . . . . . . . . . . . . . . . . . . 163
xtsc_parms (Base class for core and component module construction parameters ) 733
xtsc_pif_respond_if_impl (Implementation of xtsc_respond_if for system RAM
port ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
xtsc_pin2tlm_lookup_transactor (A transactor to convert a pin-level TIE lookup
interface to Xtensa TLM ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
xtsc_pin2tlm_lookup_transactor_parms (Constructor parameters for a xtsc_-
pin2tlm_lookup_transactor object ) . . . . . . . . . . . . . . . . . . . . . . 766
xtsc_pin2tlm_memory_transactor (This device converts memory transactions
from pin level to transaction level ) . . . . . . . . . . . . . . . . . . . . . . 769
xtsc_pin2tlm_memory_transactor_parms (Constructor parameters for a xtsc_-
pin2tlm_memory_transactor transactor object ) . . . . . . . . . . . . . . . 789
xtsc_pin2tlm_wire_transactor< W, T > (User interface class for connecting an
sc_in<T> or an sc_signal<T> to an sc_export<xtsc_wire_write_if> ) . . 797
xtsc_plugin_interface (This interface is used to add plugin modules to an XTSC
simulation ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
xtsc_queue (A queue implementation that connects using TLM-level ports ) . . . . 803
xtsc_queue_consumer (A scripted consumer to drain a queue ) . . . . . . . . . . . 818
xtsc_queue_consumer_parms (Constructor parameters for a xtsc_queue_-
consumer object ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
xtsc_queue_parms (Constructor parameters for an xtsc_queue object ) . . . . . . 831
xtsc_queue_pin (A TIE queue implementation using the pin-level interface ) . . . . 836
xtsc_queue_pin_parms (Constructor parameters for a xtsc_queue_pin object ) . . 843
xtsc_queue_pop_if (This interface is for connecting between a consumer and a
queue ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
xtsc_queue_pop_if_impl (Implementation of xtsc_queue_pop_if ) . . . . . . . . . . 850
xtsc_queue_pop_if_impl (Implementation of xtsc_queue_pop_if for single con-
sumer ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
xtsc_queue_pop_if_multi_impl (Implementation of xtsc_queue_pop_if for multi-
client queue (either m_num_producers or m_num_consumers > 1) ) . . . 856
xtsc_queue_producer (A scripted producer to supply a queue ) . . . . . . . . . . . 859
xtsc_queue_producer_parms (Constructor parameters for a xtsc_queue_-
producer object ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870
xtsc_queue_push_if (Interface for connecting between a producer and a queue ) . 875
xtsc_queue_push_if_impl (Implementation of xtsc_queue_push_if ) . . . . . . . . 879
xtsc_queue_push_if_impl (Implementation of xtsc_queue_push_if for single pro-
ducer ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
xtsc_queue_push_if_multi_impl (Implementation of xtsc_queue_push_if for multi-
client queue (either m_num_producers or m_num_consumers > 1) ) . . . 885
xtsc_ram_respond_if_impl (Implementation of xtsc_respond_if for local RAM port ) 888
xtsc_request (Class representing a PIF, XLMI, local memory, snoop, or inbound
PIF request transfer ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
xtsc_request_if (Interface for sending requests from a memory interface master to
a memory interface slave ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
xtsc_request_if_impl (Implementation of xtsc_request_if ) . . . . . . . . . . . . . . 927
xtsc_request_if_impl (Implementation of xtsc_request_if ) . . . . . . . . . . . . . . 932
5. File Index
xtsc_response.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1369
xtsc_router.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1371
xtsc_slave.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1373
xtsc_tlm22xttlm_transactor.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1375
xtsc_tlm2pin_memory_transactor.h . . . . . . . . . . . . . . . . . . . . . . . . . . 1377
xtsc_tx_loader.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1379
xtsc_tx_xfer.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1381
xtsc_tx_xfer_if.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1383
xtsc_types.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1385
xtsc_udma.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1387
xtsc_wire.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1389
xtsc_wire_logic.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1391
xtsc_wire_read_if.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1393
xtsc_wire_source.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1395
xtsc_wire_write_if.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1397
xtsc_xttlm2tlm2_transactor.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1398
6. Namespace Documentation
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Classes
• class xtsc_initialize_parms
Configuration parameters for the call to xtsc_initialize().
• class xtsc_switch_registration
Class for registering TurboXim simulation mode switching interfaces.
• class xtsc_signal_sc_bv_base
Pin-level signal for connecting to a TIE export state, TIE import wire, or system-level I/O of
xtsc_core.
• class xtsc_signal_sc_bv_base_floating
Floating signal for a capped (unused) TIE export state or import wire.
• class xtsc_signal_sc_uint_base
Pin-level signal for connecting certain pin-level memory ports.
• class xtsc_sc_out_sc_bv_base_adapter_base
Base class for converting an sc_out<sc_bv_base> to sc_out<T>.
• class xtsc_sc_out_sc_bv_base_adapter
User interface class for converting an sc_out<sc_bv_base> to sc_out<T>.
• class xtsc_sc_in_sc_bv_base_adapter_base
Base class for converting an sc_in<T> to an sc_in<sc_bv_base>.
• class xtsc_sc_in_sc_bv_base_adapter
User interface class for converting an sc_in<T> to an sc_in<sc_bv_base>.
• class xtsc_sc_out_sc_uint_base_adapter_base
Base class for converting an sc_out<sc_uint_base> to sc_out<T>.
• class xtsc_sc_out_sc_uint_base_adapter
User interface class for converting an sc_out<sc_uint_base> to sc_out<T>.
• class xtsc_sc_in_sc_uint_base_adapter_base
Base class for converting an sc_in<T> to an sc_in<sc_uint_base>.
• class xtsc_sc_in_sc_uint_base_adapter
User interface class for converting an sc_in<T> to an sc_in<sc_uint_base>.
• class xtsc_tlm2pin_wire_transactor_base
Base class for converting an sc_out<xtsc_wire_write_if> to sc_out<T>.
• class xtsc_tlm2pin_wire_transactor
User interface class for connecting an sc_port<xtsc_wire_write_if> to an sc_out<T> or
an sc_signal<T>.
• class xtsc_pin2tlm_wire_transactor
User interface class for connecting an sc_in<T> or an sc_signal<T> to an sc_-
export<xtsc_wire_write_if>.
• class xtsc_script_file
Utility class for handling a script-style file.
• class xtsc_command_handler_interface
Interface to be called by xtsc_dispatch_command().
• class xtsc_filter
The xtsc_filter class, in conjunction with the xtsc_filter_XXX() and xtsc_event_XXX() meth-
ods and the XTSC command facility, help support the system control and debug framework
in XTSC.
• class xtsc_resettable
Interface for objects which can be reset.
• class xtsc_connection_interface
This is the generic connection interface used to support plugin modules and the --connect
command in xtsc-run as well as the xtsc_connect() method in the XTSC core library.
• class xtsc_module
This composite interface combines the xtsc_connection_interface and xtsc_resettable in-
terfaces.
• class xtsc_plugin_interface
This interface is used to add plugin modules to an XTSC simulation.
• class XTSC_VERSION_INFO_STRING
• class xtsc_core_parms
Constructor parameters for a xtsc_core object.
• class xtsc_core
A Tensilica core Instruction Set Simulator (ISS).
• class xtsc_parms
Base class for core and component module construction parameters.
• class xtsc_debug_if
Interface for non-hardware communication from a memory interface master to a memory
interface slave.
• class xtsc_request_if
Interface for sending requests from a memory interface master to a memory interface slave.
• class xtsc_respond_if
Interface for sending responses from a memory interface slave back to the requesting mem-
ory interface master.
• class xtsc_exception
Base class for all XTSC exceptions.
• class xtsc_fast_access_if
Interface for fast access (turbo mode).
• class xtsc_fast_access_block
Value class for a block that surrounds a request address.
• class xtsc_fast_access_revocation_if
Interface to be implemented by memory-interface masters that wish to support revocation
of previously-granted fast access requests.
• class xtsc_fast_access_request
Class to hold request and response information to set up fast access data transfers.
• class xtsc_wire_write_if
Interface for writing (driving/sourcing) a wire.
• class xtsc_wire_read_if
Interface for reading (sinking) a wire.
• class xtsc_lookup_if
Interface for connecting a TIE lookup client to an implementation.
• class xtsc_queue_push_if
Interface for connecting between a producer and a queue.
• class xtsc_queue_pop_if
This interface is for connecting between a consumer and a queue.
• class xtsc_tx_xfer_if
Interface for sending TLM TX XFER interface transactions.
• class xtsc_request
Class representing a PIF, XLMI, local memory, snoop, or inbound PIF request transfer.
• class xtsc_response
Class representing a PIF, XLMI, local memory, or inbound PIF response transfer.
• class xtsc_tx_xfer
This class carries the information of a TLM transaction on the TX Xtensa XFER (boot
loader) interface.
• class xtsc_mode_switch_if
Interface for dynamic simulation mode switching between fast-functional and cycle-accurate
modes.
• class xtsc_address_range_entry
Address-range to port-number association (for example, a routing table entry).
• class xtsc_memory_b
Class for a memory model.
• class xtsc_tx_loader_parms
Constructor parameters for a xtsc_tx_loader object.
• class xtsc_tx_loader
XTSC module to model a boot loader for a TX Xtensa chain.
• class xtsc_udma_parms
Constructor parameters for an xtsc_udma object.
• class xtsc_udma
The xtsc_udma class provides an XTSC model of Cadence/Tensilica’s micro-DMA engine
(uDMA).
Typedefs
Enumerations
• enum xtsc_port_type {
USER_DEFINED_PORT = 0,
DEBUG_PORT = 1,
REQUEST_PORT = 2,
RESPOND_PORT = 3,
LOOKUP_PORT = 4,
QUEUE_PUSH_PORT = 5,
QUEUE_POP_PORT = 6,
WIRE_WRITE_PORT = 7,
WIRE_READ_PORT = 8,
TX_XFER_PORT = 9,
USER_DEFINED_OUTPUT = 16,
BOOL_OUTPUT = 17,
UINT_OUTPUT = 18,
WIDE_OUTPUT = 19,
USER_DEFINED_INITIATOR = 32,
INITIATOR_SOCKET_4 = 33,
INITIATOR_SOCKET_8 = 34,
INITIATOR_SOCKET_16 = 35,
INITIATOR_SOCKET_32 = 36,
INITIATOR_SOCKET_64 = 37,
conjugate_delta = 128,
USER_DEFINED_EXPORT = 128,
DEBUG_EXPORT = 129,
REQUEST_EXPORT = 130,
RESPOND_EXPORT = 131,
LOOKUP_EXPORT = 132,
QUEUE_PUSH_EXPORT = 133,
QUEUE_POP_EXPORT = 134,
WIRE_WRITE_EXPORT = 135,
WIRE_READ_EXPORT = 136,
TX_XFER_EXPORT = 137,
USER_DEFINED_INPUT = 144,
BOOL_INPUT = 145,
UINT_INPUT = 146,
WIDE_INPUT = 147,
USER_DEFINED_TARGET = 160,
TARGET_SOCKET_4 = 161,
TARGET_SOCKET_8 = 162,
TARGET_SOCKET_16 = 163,
TARGET_SOCKET_32 = 164,
TARGET_SOCKET_64 = 165,
PORT_TABLE = 255 }
This enum specifies the conjugate port pairs that are supported by the generic connection
API (xtsc_connection_interface) and the generic connection method, xtsc_connect().
• enum xtsc_sim_mode {
XTSC_CYCLE_ACCURATE = 0,
XTSC_FUNCTIONAL }
Type used to identify simulation modes.
Functions
• XTSC_API bool xtsc_is_logging_configured ()
Return true if the logging facility (log4xtensa) has been configured.
Get the number of least-significant decimal digits of the delta cycle count to be displayed
when logging.
• XTSC_API void xtsc_strtou32vector (const std::string &str, std::vector< u32 > &vec)
This utility function can be used to determine if a string is a valid C/C++ identifier.
This method dumps a list of all events registered with XTSC (SystemC 2.2) or that are
hierarchically-named events (SystemC 2.3).
Variables
• Readme xtsc_text_logging_macros
Summary of macros to disable or to do text logging.
• Readme sc_command_handler_commands
The following commands are supported by the global XTSC command handler called sc.
• Readme xtsc_command_handler_commands
The following commands are supported by the global XTSC command handler called xtsc.
All xtsc library objects (non-member functions, non-member data, and classes includ-
ing xtsc_core) and their associated typedef and enum types are in the xtsc names-
pace. The xtsc_comp library objects (xtsc_arbiter, xtsc_dma_engine, xtsc_lookup, xtsc_-
lookup_driver, xtsc_lookup_pin, xtsc_master, xtsc_memory, xtsc_memory_pin, xtsc_-
memory_tlm2, xtsc_memory_trace, xtsc_mmio, xtsc_pin2tlm_memory_transactor, xtsc_-
queue, xtsc_queue_consumer, xtsc_queue_pin, xtsc_queue_producer, xtsc_router, xtsc_-
slave, xtsc_tlm2pin_memory_transactor, xtsc_tlm22xttlm_transactor, xtsc_wire, xtsc_-
The type of the method used by XTSC to get the plugin interface from the shared library.
The shared library (Linux shared object or MS Windows DLL) must implement and export
a method with the type defined by xtsc_get_plugin_interface_t. Typically, this method is
called xtsc_get_plugin_interface(); however, if you also intend to make a static version of
the library available (for example, for SystemC-Verilog co-simulation), then you may wish
to use a unique name to avoid a name clash with other linkedin models.
The following code snippet shows how to declare this method in a manner that works on
both Linux and MS Windows:
extern "C"
#if defined(_WIN32)
__declspec(dllexport)
#endif
xtsc_plugin_interface& xtsc_get_plugin_interface() { ... }
See also:
xtsc_plugin_interface
This enum specifies the conjugate port pairs that are supported by the generic connection
API (xtsc_connection_interface) and the generic connection method, xtsc_connect(). The
conjugate port pairs are separated by half of the enum range (128 = 256/2) which has the
special enum name of conjugate_delta.
Loosely speaking, two port types are "conjugate pairs" if they can be bound to each other.
For example, a LOOKUP_PORT (sc_port<xtsc_lookup_if>) has enum value 4 and it can
be bound to a LOOKUP_EXPORT (sc_export<xtsc_lookup_if) which has enum 132 (= 4 +
128), thus LOOKUP_PORT and LOOKUP_EXPORT are a conjugate pair.
As another example, an INITIATOR_SOCKET_4 (tlm_initiator_socket<32>) has enum
value 33 and it can be bound to a TARGET_SOCKET_4 (tlm_target_socket<32>) which
See also:
xtsc_connection_interface
xtsc_connect
Enumerator:
USER_DEFINED_PORT sc_port <T> where T is a user-defined sc_interface
DEBUG_PORT sc_port <xtsc_debug_if>
REQUEST_PORT sc_port <xtsc_request_if>
RESPOND_PORT sc_port <xtsc_respond_if>
Conveniece method to determine if a string matches a pattern. This method returns true if
str matches pattern, otherwise it returns false.
Parameters:
pattern Pattern to match str against. Any asterisk (∗) found in the pattern is treated
as a wildcard which matches any number of any characters in any combination.
str The string being checked for a match.
Method to set the XTSC system clock period (SCP). Although XTSC does not instantiate
any sc_clock objects, it still has the concept of a system clock period. This method is used
to set the XTSC system clock period as a multiple of the SystemC time resolution (which
can be accessed using the SystemC methods sc_set_time_resolution() and sc_get_time_-
resolution()). By default (i.e. if this method is never called), XTSC uses a factor of 1000.
So, if neither the sc_set_time_resolution() method nor the xtsc_set_system_clock_factor()
method are called then the XTSC system clock period will be 1 nanosecond (which is 1000
times the default SystemC time resolution of 1 picosecond).
XTSC also has the concept of clock phase. By default, the first posedge clock conceptu-
ally occurs at time 0, the second one occurs one system clock period later, and so on. If
desired, the posedge_factor argument can be set to a value other than 0 (but strictly less
than the clock_factor argument) to delay the first conceptual posedge clock (and all subse-
quent ones, too). Many of the XTSC components have parameters that make reference to
such things as "clock phase", "posedge clock", and "negedge clock". All these parameters
are in reference to the clock phase concept explained here and their effect is adjusted in
accordance with any change to the posedge_factor argument.
When this method is called the the clock phase delta factors are also recalibrated. If you
don’t want the recalibrated values then you may subsequently changed them using the
xtsc_core::set_clock_phase_delta_factors() method.
This method must not be called after xtsc_get_system_clock_period() has been called.
The xtsc_initialize() method internally calls xtsc_get_system_clock_period, so xtsc_set_-
system_clock_factor() must not be called after xtsc_initialize() is called.
Technique #1: Using the logging configuration file form of the xtsc_initialize() function. The
general sequence (most likely in sc_main) is:
sc_set_time_resolution(...); // Optional
xtsc_set_system_clock_factor(...); // Optional
xtsc_initialize(logging_config_file);
// Now construct any desired XTSC modules (xtsc_core, xtsc_memory, etc)
Technique #2: Using the xtsc_initialize_parms form of the xtsc_initialize() function. The
general sequence (most likely in sc_main) is:
sc_set_time_resolution(...); // Optional
xtsc_initialize_parms init_parms(...);
init_parms.set("system_clock_factor", ...); // Optional
init_parms.set("posedge_offset_factor", ...); // Optional
init_parms.extract_parms(argc, argv, "xtsc"); // Optional
xtsc_initialize(init_parms);
// Now construct any desired XTSC modules (xtsc_core, xtsc_memory, etc)
See also:
xtsc_initialize_parms
xtsc_get_system_clock_period.
xtsc_wait.
xtsc_core::set_clock_phase_delta_factors
This method returns the factor by which the SystemC time resolution is multiplied to deter-
mine the system clock period.
See also:
xtsc_set_system_clock_factor.
Initialize XTSC simulation. This function should be called before constructing any XTSC
modules and before generating any logging messages. Generally this function should be
called from sc_main before constructing any XTSC modules. If you have any global ob-
jects then those objects should not generate logging messages in their constructor or they
should call this method prior to generating any logging messages.
Parameters:
init_parms The parameters used to configure XTSC.
See also:
xtsc_initialize_parms
Initialize XTSC simulation. This function should be called before constructing any XTSC
modules and before generating any logging messages. This function constructs a default
xtsc_initialize_parms object. Sets the "text_logging_config_file" parameter according to the
text_logging_config_file value passed in to this function, and then calls xtsc_initialize with
the xtsc_initialize_parms object.
Parameters:
text_logging_config_file Value to set the "text_logging_config_file" parameter of the
xtsc_initialize_parms object to.
binary_logging_config_file The configuration file for binary logging. If NULL (the
default), then binary loggers are disabled for this simulation run.
See also:
xtsc_initialize_parms
This function should be called when simulation is over to ensure all resources are properly
released and all clients are properly finalized. Not calling this method can result in, for
example, no profile client output being generated.
See also:
xtsc_reset()
xtsc_resettable
Set the flag that determines whether sc_stop() will be called when xtsc_finalize() is called.
The default value of the flag is true. That is, if this method is never called then sc_stop()
will be called when xtsc_finalize() is called.
Note: Calling sc_stop causes failure during the elaboration phase for some Cadence
versions (for example, IUS 10.2 s010/s012; but not s017). Message is: ncverilog:
∗E,ELBERR: Error during elaboration (status 250), exiting
Parameters:
call_sc_stop If true, sc_stop() will be called from xtsc_finalize().
Returns:
the previous value of the flag
See also:
xtsc_set_system_clock_factor.
Get the posedge offset of the conceptual system clock. This methods returns the amount
of time by which the first posedge of the conceptual system clock is offset from time 0.
It is computed by multiplying the value of the "posedge_offset_factor" parameter of xtsc_-
initialize_parms by the SystemC time resolution. This method must not be called before
xtsc_initialize() is called.
See also:
xtsc_initialize_parms.
This method waits the specified number of system clock periods. This is just a convenience
method that calls sc_core::wait() with an sc_time object equal to num_periods times the
system clock period.
Parameters:
num_periods The number of system clock periods to wait.
See also:
xtsc_set_system_clock_factor.
xtsc_get_system_clock_period.
This function returns a unique 64-bit number that can be associate with a new element
when it is added to a queue. This function is meant for use by queue implementations. It is
the queue implementation’s job to maintain the ticket-to-element association and to return
and/or log the ticket with its associated element is popped from the queue.
Returns:
a unique 64-bit number.
See also:
xtsc_queue_push_if
xtsc_queue_pop_if
Fire (that is, signal or notify) the specified TurboXim event id. This function has no effect if
called when operating in cycle-accurate (non-TurboXim) mode.
When you use the TurboXim simulation engine, you can significantly improve performance
by allowing each core to run a large number of instructions at a time. In this relaxed simu-
lation mode, you may want to programmatically control when a core should yield control to
allow other cores and other SystemC processes to execute. To force a core to wait for an
event when running in the fast functional simulation mode (TurboXim), you should call the
following function from your Xtensa target program:
void xt_iss_event_wait(unsigned eventId);
You can fire the event on which a core is waiting by calling xtsc_fire_turboxim_event_id()
from the host program and passing the same event ID as was passed in the xt_iss_event_-
wait() call. This might be done, for example, from sc_main() or, more typically, from a thread
or method process of a SystemC module.
Alternatively, the event on which a core is waiting can be fired by calling
void xt_iss_event_fire(unsigned eventId);
from the target program running on another core and passing the same eventId number.
Prototypes for both target functions are provided in the <xtensa/sim.h> header file.
This method is used to set an absolute time barrier for use by modules operating in fast
functional mode. When the current SystemC simulation time equals or exceeds this barrier,
then modules should not run ahead of the current SystemC simulation time.
If this method is not called then there is effectively no absolute time barrier.
This function is commonly called before calling sc_start() when sampled simulation is to be
used.
Parameters:
delta This time is added to the current SystemC time to compute the absolute time
barrier.
This method returns the absolute simulation time barrier beyond which modules should
cease running ahead of the current SystemC simulation time when in fast functional mode.
This is the absolute simulation time when relaxed simulation (i.e. "running ahead") should
cease.
If the xtsc_set_relaxed_simulation_barrier() method is never called, then this method will
return the maximum possible SystemC simulation time less one SystemC time resolution,
that is ((2∧ 64) - 1) times the SystemC time resolution.
Set the amount of "equivalent time" that a module is allowed to run ahead of the actual
SystemC simulation time when operating in fast functional mode. This method should be
called before simulation begins or should be left at its default value of SC_ZERO_TIME.
When this interval is SC_ZERO_TIME, then cores and other modules should not run ahead
of the current SystemC simulation time.
Parameters:
interval Maximum amount of "equivalent time" that a module may run ahead of the
current SystemC simulation time.
Get the amount of "equivalent time" that a module is allowed to run ahead of the actual
SystemC simulation time when operating in fast functional mode as set by the xtsc_set_-
relaxed_simulation_interval() method. This method does not take the absolute simulation
time barrier into account. Use xtsc_get_remaining_relaxed_simulation_time() to get the
max duration that a module should use.
This method returns the maximum amount of time that a module may run ahead of the
current SystemC simulation time. When a system is executing in fast functional mode,
cores and other modules are allowed to run ahead of the current simulation time. The
amount of "equivalent time" that a module is allowed to run ahead of the actual SystemC
simulation time is limited by two things:
First, a module must not run ahead of the current simulation time by an amount greater
then the interval specified by the xtsc_set_relaxed_simulation_interval() method.
Second, a module should not run ahead when the current SystemC simulation time equals
or exceeds the absolute simulation time barrier as set by the xtsc_set_relaxed_simulation_-
barrier() method.
If the xtsc_set_relaxed_simulation_interval() method has not been called (or if it was called
with an argument of SC_ZERO_TIME) or if the absolute simulation time barrier as set by
the xtsc_set_relaxed_simulation_barrier() method has already arrived or passed, then this
method returns SC_ZERO_TIME. Otherwise, this method returns the smaller of the interval
set by the xtsc_set_relaxed_simulation_interval() method and the difference between the
current SystemC simulation time and the absolute simulation time barrier as set by the
xtsc_set_relaxed_simulation_barrier() method.
Dump the name-value pairs (optionally limited to pattern) in the user-defined state map to
the specified ostream object.
Parameters:
os The ostream object to which the user-defined state map should be dumped.
pattern Optional pattern of names to match. Any asterisk (∗) found in the pattern
is treated as a wildcard which matches any number of any characters in any
combination. If pattern is the empty string then all name-value pairs are dumped.
See also:
xtsc_user_state_set
xtsc_user_state_get
xtsc_pattern_match
Get the value associated with the specified name in the user-defined state map.
Parameters:
name The state name. May only contain non-space, printable characters. If this name
is not found in the user-defined state table then the empty string will be returned.
See also:
xtsc_user_state_set
xtsc_user_state_dump
Add or replace a name-value pair in the user-defined state map. XTSC maintains a map of
name-value pairs in which users may store arbitrary state. This can be used, for example, to
allow different parts of the simulator (e.g. Lua scripts, the XTSC or lua command prompts,
an xtsc-run include script, and target programs using simcalls) to communicate with each
other.
Parameters:
name The state name. May only contain non-space, printable characters.
value The desired state value.
Note: The xtsc-run program supports the following command to allow setting user-defined
state:
--user_state=<Name>=<Value>
Note: Lua code on a lua line or inside a lua_beg/lua_end block of an xtsc_script_file can
access user-defined state using Lua functions in the xtsc table (this is the only way that
Lua code in an xtsc-run script file can read user-defined state). For example:
#lua_beg
MyList = xtsc.user_state_get("MyList")
xtsc.user_state_set("MyList", MyList .. "AnotherItem,")
#lua_end
See also:
xtsc_user_state_get
xtsc_user_state_dump
This method sets the log level for constructor logging. Normally, the XTSC module con-
structors (xtsc_core, xtsc_memory, xtsc_queue, etc) will log certain construction informa-
tion and parameters at INFO_LOG_LEVEL. This method can be called to change that to a
different log level.
Parameters:
log_level The new log level for XTSC module constructor logging.
Returns:
previous value
Turn text logging on or off for XTSC_INFO and lower. This method enables or disables text
logging for XTSC_INFO and lower. If text logging is disabled, the XTSC_INFO and lower
macros do not generate logging messages, but XTSC_NOTE and higher macros still work
as usual. Calling this method with enable_logging set to false results in near zero logging
facility overhead within the XTSC libraries. Initial setting is true.
Parameters:
enable_logging If true, the default, text logging is enabled as normal. Otherwise,
text logging is disabled for XTSC_INFO, XTSC_VERBOSE, XTSC_DEBUG, and
XTSC_TRACE macros.
Returns:
previous value
Put the formatted delta cycle count into string reference buf and return it. Note: This
function was changed with the RD-2011.1 release to require the user to provide a non-
const string buffer. The caller should create a string on the stack and pass it to this function.
This is needed for multi-thread safety. Although SystemC is single-thread, XTSC will create
other OS-level threads if an xtsc_core has debugging enabled for its target program. For
an example usage, see the XTSC_INFO macro.
This method sets the flag that determines the order in which data is dumped by the xtsc_-
hex_dump(u32, const u8 ∗, ostream&) method. The initial (default) value of this flag is
true.
Parameters:
left_to_right If true, data is dumped in the order: buffer[0], buffer[1], ..., buffer[size8-
1]. If false, data is dumped in the order: buffer[size8-1], buffer[size8-2], ...,
buffer[0].
Returns:
the old (previous) value of the flag.
This method returns the flag that determines the order in which data is dumped by the
xtsc_hex_dump(u32, const u8 ∗, ostream&) method.
Returns:
If true, data is dumped in the order: buffer[0], buffer[1], ..., buffer[size8-1]. If false, data
is dumped in the order: buffer[size8-1], buffer[size8-2], ..., buffer[0].
This method dumps the specified number of bytes from the data buffer in hex format (two
hex nibbles and a space for each byte in the buffer). The data is dumped in the order
specified by the xtsc_get_hex_dump_left_to_right() method.
Parameters:
size8 The number of bytes of data to dump.
buffer The buffer of data.
os The ostream object to which the data is to be dumped.
This method dumps the specified number of bytes from the data buffer. Each line of output
is divided into three columnar sections, each of which is optional. The first section contains
an address. The second section contains a hex dump of some (possibly all) of the data
(two hex nibbles and a space for each byte from the buffer). The third section contains an
ASCII dump of the same data.
Parameters:
left_to_right If true, the data is dumped in the order: buffer[0], buffer[1], ...,
buffer[bytes_per_line-1]. If false, the data is dumped in the order: buffer[bytes_-
per_line-1], buffer[bytes_per_line-2], ..., buffer[0].
size8 The number of bytes of data to dump.
buffer The buffer of data.
os The ostream object to which the data is to be dumped.
bytes_per_line The number of bytes to dump on each line of output. If bytes_per_line
is 0 (the default) then all size8 bytes are dumped on a single line with no newline
at the end. If bytes_per_line is non-zero, then all lines of output end in newline.
show_address If true, the first columnar section contains an address printed as an
8-hex-digit number with a 0x prefix. If false, the first columnar section is null and
takes no space in the output.
start_byte_address If show_address is true, the first line of output starts with start_-
byte_address, the second line of output starts with start_byte_address+bytes_-
per_line, and so on. If show_address is false, this parameter is ignored.
show_hex_values If true, the second (middle) columnar section of hex data values
is printed. If false, the second columnar section is null and takes no space in the
output.
do_column_heading If true, print byte position column headings over the hex val-
ues section. If false, no column headings are printed. If show_hex_values is
false, then the do_column_heading value is ignored and no column headings are
printed.
show_ascii_values If true, the third (last) columnar section of ASCII data values is
printed (if an ASCII value is a non-printable character a period is printed). If
show_ascii_values is false, the third columnar section is null and takes no space
in the output.
initial_skipped_bytes Skip initial_skipped_bytes bytes on the first line in the second
(hex) and third (ASCII) columnar sections.
Utility method to return a string which matches the input string except that bracketed array
indices containing less then 10 decimal digits, if any, will be zero-extended to 10 digits so
as to be suitable for sorting in a situation where it is desired that, for example, "foo[10]’
comes after "foo[9]" instead of after "foo[1]. For example:
Run the specified Lua script file in its own SystemC thread process. This function may only
be called prior to the SystemC before_end_of_elaboration() callback.
Parameters:
lua_script_file The name of the Lua script file to run in its own SystemC thread.
Parameters:
name The instance name of the sc_module requesting the current user name (used
for error reporting).
kind The kind of sc_module requesting the current user name (used for error report-
ing).
unknown On Linux, the user name to be returned if the OS is unable to provide a
user name. This parameter is ignored on MS Windows.
Returns:
the current user name.
Parameters:
sm_name The name of the shared memory.
num_bytes The number of bytes in the shared memory.
name The instance name of the sc_module requesting the shared memory (used for
error reporting).
kind The kind of sc_module requesting the shared memory (used for error reporting).
base_address The optional target physical starting byte address of the memory mod-
elled by this shared memory.
Returns:
a pointer to the shared memory.
Parameters:
buf Pointer to a byte array whose size is at least (L+7)/8 bytes (where L =
value.length()).
value A reference to an existing sc_unsigned value.
Parameters:
value A reference to an existing sc_unsigned value.
buf Pointer to a byte array whose size is at least (L+7)/8 bytes (where L =
value.length()).
Parameters:
registration a module name, interface, switching group name triplet to register.
Switch all modules in all switch groups that have registered a simulation mode switching
interface. This function will throw an exception if one or more of the modules was unable
to switch. It should always be valid to switch mode before simulation starts. After simula-
tion starts, use the mode-switching protocol to relax the transactions in the system before
invoking this function. Throws an exception if any of the registered modules cannot switch.
Parameters:
mode If mode is XTSC_CYCLE_ACCURATE, then switch to cycle-accurate (non-
TurboXim for cores) mode. If mode is XTSC_FUNCTIONAL, then switch to func-
tional mode (TurboXim for cores).
Polling-based dynamic simulation switching preparation. This function should be used prior
to switching the simulation mode as part of the mode-switching protocol to remove or drain
transactions from the system.
Prepare to switch all modules in all switch groups that have registered a simulation mode
switching interface. This function will return true if all modules are ready to switch. Other-
wise, it will return false. If it returns false, the switcher should wait at least a cycle before
trying again. Once all modules are ready, there may still be transactions in passive mod-
ules. The user should wait enough cycles for all passive modules to propagate transactions
through the system, try one more time, and switch if all modules are still ready.
Parameters:
mode If mode is XTSC_CYCLE_ACCURATE, then switch to cycle-accurate (non-
TurboXim for cores) mode. If mode is XTSC_FUNCTIONAL, then switch to func-
tional mode (TurboXim for cores).
Parameters:
buf the pointer to memory storage
Returns:
the swizzle value to use in xtsc_fast_access_request::allow_raw_access() or 0xffffffff
if no swizzle matches.
Get the portion of the path before the last path separator. On Linux this method just returns
dirname(path).
Get the portion of the path after the last path separator. On Linux this method just returns
basename(path).
Parameters:
directory The directory whose absolute path is desired. directory may be an absolute
or relative path.
Returns:
the absolute path of the directory containing directory
Utility function to get the absolute path of the directory containing an existing file.
Parameters:
file_name The file whose absolute path is desired. file_name may include an absolute
or relative path.
Returns:
the absolute path of the directory containing file_name
Utility function to get the absolute path and file name of an existing file.
Parameters:
file_name The file whose absolute path is desired. file_name may include an absolute
or relative path.
Returns:
the absolute path to file_name
Utility function to load a shared library (Linux shared object, MS Windows DLL) and then
get and return the address of a symbol in the library. An xtsc_exception is thrown if the
library cannot be loaded or if the symbol is not found in the library.
Parameters:
library_name The library to be loaded.
add_library_extension If true, up to two attempts will be made to find the library. For
the first attempt an extension of ".so", ".dll", or "d.dll" will be added to library_-
name depending upon whether the environment is Linux, MS Windows Release
build, or MS Windows Debug build (respectively). If no such library is found, then
a second attempt will be made after adding an extension of "_sh.so", "_sh.dll", or
"_shd.dll" to library_name depending on the environment (as above). In addition,
if the environement is Linux and if library_name contains no directory delimiter (no
forward slash), then a prefix of "lib" will be added to library_name. This second
attempt matches the name format used by the standard XTSC plugins installed
in XtensaTools. As an example, if this parameter is true, and library_name is
"xtsc_widget", then the call to dlopen (Linux) or LoadLibrary (MS Windows) will
use:
Returns:
the address of symbol_name.
This function splits up a multi-line message into multiple calls to the TextLogger::log()
method (one call per line).
Parameters:
logger The TextLogger object.
log_level The log level of this message.
msg The message to log.
indent The number of spaces to indent all lines except the first one.
This utility function parses a optionally-indexed port name into a name portion and and
index. For example if full_name is foobar[7] then port_name will be set to foobar, port_-
index will be set to 7, and the function will return true. An exception will be thrown if
full_name is not of the form PortName or PortName[N].
Parameters:
full_name The full name including the optional index inclosed in brackets.
port_name A reference to a string in which to return the name portion (without index)
port_index A reference to a u32 in which to return the index. If full_name has no
index the port_index will be set to 0.
Returns:
true if the full_name included an index.
This utility function can be used to determine if a string is a valid C/C++ identifier.
Parameters:
name The string to be tested.
Returns:
true if name is a valid C/C++ identifier, otherwise return false.
This utility function safely copies a c-string (char ∗). It throws an exception if memory for
the new c-string cannot be allocated.
Parameters:
str The c-string to be copied. It can be NULL.
Returns:
a new copy of the str (or NULL if str is NULL).
This utility function safely copies an array of c-strings (char ∗∗). It throws an exception if
memory for the new c-string array or the contained c-strings cannot be allocated.
Parameters:
str_array The c-string array to be copied. The last entry in the array must be NULL.
str_array itself can be NULL.
Returns:
a new copy of the str_array (or NULL if str_array is NULL) with each array entry itself
a new copy .
This utility function deletes a c-string and then sets the pointer to NULL.
Parameters:
str The c-string to be deleted. It can be NULL.
Parameters:
str_array The c-string array to be deleted. The last entry in the array must be NULL.
str_array itself can be NULL.
Dump a list of SystemC objects. This utility method dumps a list of all existing SystemC
objects (sc_object) to the specified ostream object. Optional name and kind patterns may
be specified. If both patterns are specified then both must match for the object to be listed.
Parameters:
os The ostream object to dump the object list to.
name_pattern Optional pattern to match object names against. The pattern may con-
tain 1 or more asterisks (∗) as wildcards. Each ∗ matches 0 or more characters
in any combination.
kind_pattern Optional pattern to match object kind against. The pattern may contain
1 or more asterisks (∗) as wildcards. Each ∗ matches 0 or more characters in any
combination.
Method to register a command with the XTSC command facility. The xtsc_dispatch_-
command() method will call the handler’s execute() method for handling its commands.
That call is guaranteed to be for a command that was registered via this method and the
command is guaranteed to have a number of arguments within the range [min_args, max_-
args].
Parameters:
object The sc_object supporting the command. Its name() method will be used to
determine the hierarchical name of the command handler.
handler The xtsc_command_handler_interface instance supporting the command.
cmd The command name.
min_args The minimum number of arguments the command requires. Should be 0 if
the command accepts no arguments.
max_args The maximum number of arguments the command will accept. Should be
0 if the command accepts no arguments. Use -1 (0xFFFFFFFF) to specify no
upper limit.
format The command format. The beginning of the format string must be identical to
the cmd argument. If any arguments are supported by the command then they
should also be shown. This string will be presented to the user in response to the
"help" command.
man A one line description of what the command does. This line will be presented to
the user in response to the "man" command.
See also:
xtsc_command_handler_interface
xtsc_dispatch_command
Method to unregister a command with the XTSC command facility. This method allows a
subclass to modify or to disable a command entirely. To do so, the derived class should
call xtsc_unregister_command() on the old version of the command prior to calling xtsc_-
register_command() for the new version.
Parameters:
object The sc_object supporting the command. Its name() method will be used to
determine the hierarchical name of the command handler.
cmd The command name.
See also:
xtsc_register_command
Method to dispatch an XTSC command line. This method is called by the lua and XTSC
command prompts to dispatch XTSC commands. It may also be called from a SystemC
thread executing a script file specified by the "lua_script_files" parameter or the Lua code
snippet specified on a lua line or inside a "#lua_beg"/"#lua_end" block in an xtsc_script_-
file. In addition, it may be called from a script file running during a SystemC callback and
specified by one of the "lua_script_file_XXX" parameters.
Parameters:
cmd_line The command line to be dispatched. It should include the handler name
followed by the command itself followed by any arguments. A cmd_line starting
with "#" is treated as a comment which is displayed on the console but otherwise
ignored.
result An ostream object in which any non-error result will be stored. Note: If an error
occurs an exception will be thrown.
echo_comment True if comment (#) lines should be echoed to result.
format_msg General command format message to be output if handler cannot be
found or if there is no command. The default message (when format_msg is "") is
appropriate for the XTSC command prompt.
post_help Additional information to be the final output if a user enters a "help" com-
mand with no arguments.
post_man Additional information to be the final output if a user enters a "man" com-
mand with no arguments.
Returns:
false for a cmd_line of "c" (continue), otherwise returns true.
See also:
xtsc_command_handler_interface
xtsc_register_command
xtsc_initialize_parms "lua_command_prompt"
xtsc_initialize_parms "lua_script_files"
xtsc_initialize_parms "lua_script_file_beoe"
xtsc_initialize_parms "lua_script_file_eoe"
xtsc_initialize_parms "lua_script_file_sos"
xtsc_initialize_parms "lua_script_file_eos"
xtsc_initialize_parms "xtsc_command_prompt"
Parameters:
line Same as passed to the execute() method.
words Same as passed to the execute() method.
argument Which argument to convert to bool. The arguments are numbered starting
at 1 (so words[0] is the command, words[1] is the first argument, words[2] is the
second argument, and so on).
See also:
xtsc_command_handler_interface::execute
Parameters:
line Same as passed to the execute() method.
words Same as passed to the execute() method.
argument Which argument to convert to i32. The arguments are numbered starting
at 1 (so words[0] is the command, words[1] is the first argument, words[2] is the
second argument, and so on).
See also:
xtsc_command_handler_interface::execute
Parameters:
line Same as passed to the execute() method.
words Same as passed to the execute() method.
argument Which argument to convert to u32. The arguments are numbered starting
at 1 (so words[0] is the command, words[1] is the first argument, words[2] is the
second argument, and so on).
See also:
xtsc_command_handler_interface::execute
Parameters:
line Same as passed to the execute() method.
words Same as passed to the execute() method.
argument Which argument to convert to u64. The arguments are numbered starting
at 1 (so words[0] is the command, words[1] is the first argument, words[2] is the
second argument, and so on).
See also:
xtsc_command_handler_interface::execute
Parameters:
line Same as passed to the execute() method.
words Same as passed to the execute() method.
argument Which argument to convert to double. The arguments are numbered start-
ing at 1 (so words[0] is the command, words[1] is the first argument, words[2] is
the second argument, and so on).
See also:
xtsc_command_handler_interface::execute
Parameters:
line Same as passed to the execute() method.
word The first word to include in the remainder. The words are numbered starting
at 0 (so words[0] is the command, words[1] is the first argument, words[2] is the
second argument, and so on). The <HandlerName> portion of cmd_line is never
returned by this method.
See also:
xtsc_command_handler_interface::execute
Parameters:
line Same as passed to the execute() method.
error_msg The basic error message. The command line and the error message will
be concatenated to form the full exception message.
See also:
xtsc_command_handler_interface::execute
Register an sc_event with XTSC and give it a name in SystemC 2.2. In SystemC 2.3, this
method just returns the full-hierarchical name from sc_event::name().
The xtsc_event_XXX API’s allow the XTSC command facility to work with SystemC events.
Parameters:
event The sc_event to be registered with XTSC.
base_name The base (non-hierarchical) name of the sc_event. The full hierarchical
name will be formed like this: module.name() + "." + base_name
object A pointer to the sc_object associated with the event or NULL to indicate a
top-level event.
Returns:
the full hierarchical name of the event
This method returns true if the named sc_event was registered with XTSC (SystemC 2.2)
or if it exists as a hierarchically-named event (SystemC 2.3). The xtsc_event_XXX API’s
allow the XTSC command facility to work with SystemC events.
Parameters:
event_name The hierarchical name of the sc_event.
See also:
xtsc_event_register
This method returns the named sc_event. In SystemC 2.2, the event must have been
registered with XTSC via xtsc_event_register().
The xtsc_event_XXX API’s allow the XTSC command facility to work with SystemC events.
Parameters:
event_name The full hierarchical name of the sc_event.
See also:
xtsc_event_register
This method dumps a list of all events registered with XTSC (SystemC 2.2) or that are
hierarchically-named events (SystemC 2.3). The xtsc_event_XXX API’s allow the XTSC
command facility to work with SystemC events.
Parameters:
os The ostream object to dump the event list to.
pattern Optional pattern to match events against. The pattern may contain 1 or more
asterisks (∗) as wildcards. Each ∗ matches 0 or more characters in any combina-
tion.
See also:
xtsc_event_register
This method opens a named, recursive mutex and returns a handle to it. If the mutex
already exists, its handle is returned.
Parameters:
name The name of the mutex.
See also:
xtsc_host_mutex_lock
xtsc_host_mutex_try_lock
xtsc_host_mutex_unlock
xtsc_host_mutex_close
Parameters:
p_mutex The mutex handle as returned by the xtsc_host_mutex_open method.
See also:
xtsc_host_mutex_open
xtsc_host_mutex_try_lock
xtsc_host_mutex_unlock
xtsc_host_mutex_close
This method attempts a recursive lock with a timeout as specified in milliseconds on the
specified mutex.
Parameters:
p_mutex The mutex handle as returned by the xtsc_host_mutex_open method.
milliseconds The maximum number of milliseconds to wait for the lock to succeeded.
Returns:
true if the lock attempt succeeded, false if the lock attempt timeout out (implying the
lock is currently held by some other host process).
See also:
xtsc_host_mutex_open
xtsc_host_mutex_lock
xtsc_host_mutex_unlock
xtsc_host_mutex_close
This method does a recursive unlock on the specified mutex. The unlock is recursive in
that the mutex is not actually unlocked until this method is called a number of times equal
to the total of the number of times that xtsc_host_mutex_lock() was called plus the number
of times that xtsc_host_mutex_try_lock() was called and returned true.
Parameters:
p_mutex The mutex handle as returned by the xtsc_host_mutex_open method.
See also:
xtsc_host_mutex_open
xtsc_host_mutex_lock
xtsc_host_mutex_try_lock
xtsc_host_mutex_close
This method closes the specified mutex. If the mutex is currently locked by this OS process,
then xtsc_host_mutex_unlock() is called as many times as necessary to unlock it.
Parameters:
p_mutex The mutex handle as returned by the xtsc_host_mutex_open method.
See also:
xtsc_host_mutex_open
xtsc_host_mutex_lock
xtsc_host_mutex_try_lock
xtsc_host_mutex_unlock
This method returns the number of milliseconds of wall time since some unspecified be-
ginning time. This method uses clock_gettime() on Linux and GetTickCount64() on MS
Windows.
This method causes a host OS sleep for the specified number of milliseconds. This method
uses nanosleep() on Linux and Sleep() on MS Windows.
Parameters:
milliseconds The number of milliseconds to sleep.
See also:
xtsc_filter
Method to register a new xtsc_filter kind. The XTSC libraries currently define xtsc_filter
kinds of "xtsc_request", "xtsc_response", "xtsc_peek", and "xtsc_poke". The xtsc_filter_-
kind_register() method will throw an exception if kind has already been registered.
Note: Filter kinds starting with "xtsc" are reserved to the XTSC libraries.
Parameters:
kind The filter kind which must not already be registered.
keys The names of the allowed keys in an xtsc_filter of this kind.
range_keys The names of the keys which may have ranges specified for their value.
All entries in range_keys set must also be in the keys set.
See also:
xtsc_filter
xtsc_filter_kind_dump
Method to dump the list of keys of a specific xtsc_filter kind or to dump a list of all registered
xtsc_filter kinds. The xtsc_filter_kind_dump() method dumps a list of the allowed keys of the
specified xtsc_filter kind to the specified ostream. The key name is followed by an asterisk
if the key value is allowed to have a range of values specified. If kind is not specified, then
this method dumps a list of all xtsc_filter kinds.
Parameters:
kind The desired filter kind or empty to get a list of all registerd filter kinds.
os The ostream object to which the list is to be dumped.
See also:
xtsc_filter
xtsc_filter_kind_register
Method to determine if an xtsc_filter of a given name exists. This method returns true if an
xtsc_filter of the specified name exists. Otherwise it returns false.
Parameters:
name The xtsc_filter name of interest.
See also:
xtsc_filter
xtsc_filter_create
xtsc_filter_dump
xtsc_filter_get
Method to create an xtsc_filter of the specified kind with the specified name. This method
creates and returns an xtsc_filter of the specified kind and with the specified name and
key-value pairs. An exception is thrown if kind is not registered, if name already exists,
or if key_value_pair contains a key which was not specified when the xtsc_filter kind was
registered.
Parameters:
kind The kind of the xtsc_filter object. This kind must have already been registered
with XTSC.
name The name of the xtsc_filter object. No other xtsc_filter (even of a different kind)
may have this same name. Filter names may be formed using the same character
requirements as C/C++ identifiers.
key_value_pairs The table (vector) of key-value pairs. Both keys and values are
strings.
See also:
xtsc_filter_kind_register
xtsc_filter
xtsc_filter_dump
xtsc_filter_exists
xtsc_filter_get
Method to dump a list of filters of the specified kind or to dump the key-value pairs of a
specific named xtsc_filter. This method dumps a list of xtsc_filter names of the specified
kind or it dumps a list of the key-value pairs of the named xtsc_filter. It both kind and name
are specified, name is ignored. If neither kind nor name are specified, a list of the names
of all xtsc_filter objects and their associated filter kind is dumped.
Parameters:
kind The kind of xtsc_filter objects to list.
name The name of a specific xtsc_filter whose key-value pairs are to be dumped.
os The ostream object to which the list is to be dumped.
See also:
xtsc_filter_kind_register
xtsc_filter
xtsc_filter_create
xtsc_filter_exists
xtsc_filter_get
Method to get a reference to the xtsc_filter object specified by name. This method throws
an exception if the named xtsc_filter does not exist.
Parameters:
name The name of a the desired xtsc_filter.
See also:
xtsc_filter
xtsc_filter_create
xtsc_filter_exists
xtsc_filter_dump
Parameters:
name The name of the desired xtsc_filter.
port The port the nb_peek call came in on. Ports are numbered starting at 0.
address The address specified in the nb_peek call.
size The size specified in the nb_peek call.
buffer The buffer specified in the nb_peek call.
See also:
xtsc_filter
Parameters:
name The name of the desired xtsc_filter.
port The port the nb_poke call came in on. Ports are numbered starting at 0.
address The address specified in the nb_poke call.
size The size specified in the nb_poke call.
buffer The buffer specified in the nb_poke call.
See also:
xtsc_filter
Parameters:
name The name of the desired xtsc_filter.
port The port the nb_request call came in on. Ports are numbered starting at 0.
request The xtsc_request specified in the nb_request call.
See also:
xtsc_filter
Parameters:
name The name of the desired xtsc_filter.
port The port the nb_respond call came in on. Ports are numbered starting at 0.
response The xtsc_response specified in the nb_respond call.
See also:
xtsc_filter
Returns:
the number of xtsc_resettable objects.
Parameters:
bare If true, return the Xtensa TLM interface type as a string (port_type must refer
to an sc_export of one of the Xtensa TLM interfaces; that is DEBUG_EXPORT
<= port_type <= TX_XFER_EXPORT). For example, if port_type is WIRE_-
WRITE_EXPORT, then this method will return "sc_export<xtsc_wire_write_if>"
when bare is false and "xtsc_wire_write_if" when bare is true.
See also:
xtsc_port_type_check
Returns true if the specified port type is a user-defined type. The user-defined port types
are: USER_DEFINED_PORT USER_DEFINED_EXPORT USER_DEFINED_INITIATOR
USER_DEFINED_TARGET USER_DEFINED_OUTPUT USER_DEFINED_INPUT
See also:
xtsc_connection_interface::get_user_defined_port_type
Returns true if the interface associated with the specified port type is an Xtensa TLM in-
terface. Note: Returns false for USER_DEFINED_PORT and USER_DEFINED_EXPORT.
Returns true if the interface associated with the specified port type is an OSCI TLM2 inter-
face. Note: Returns true for USER_DEFINED_INITIATOR and USER_DEFINED_TARGET.
Returns true if the specified port type is a pin-level port type (sc_out<> or sc_in<>). Note:
Returns true for USER_DEFINED_OUTPUT and USER_DEFINED_INPUT.
This method will throw an exception if the two specified ports are not conjugate user-defined
port types.
See also:
xtsc_connection_interface::get_user_defined_port_type
interface instead of pointing to an sc_export of that interface, then this method will return
true.
See also:
xtsc_initialize_parms
xtsc_port_type
xtsc_get_port_type_name
This method can be used to connect two modules using named ports (or port tables) from
each module. Each named port must appear as an entry in its respective xtsc_connection_-
interface::m_port_types map. In addition, the two named ports must be conjugates of each
other.
Note: Port names are case-sensitive.
Returns:
The number of elementary port pairs connected. Note: For an N-ported Xtensa TLM
memory interface, this method will return 2∗N (1 for the request channel and 1 for the
response channel).
See also:
xtsc_port_type
xtsc_connection_interface
xtsc_connection_interface::m_port_types
xtsc_core::How_to_do_port_binding;
xtsc_core::memory_port p;
for (p=xtsc_core::MEM_FIRST; p<=xtsc_core::MEM_LAST; ++p) {
...
}
Dump an xtsc_request object. This operator dumps an xtsc_request object using the xtsc_-
request::dump() method.
Dump an xtsc_request object. This operator dumps an xtsc_request object using the xtsc_-
request::stream_dumper::dump() method.
Dump an xtsc_response object. This operator dumps an xtsc_response object using the
xtsc_response::dump() method.
Dump an xtsc_response object. This operator dumps an xtsc_response object using the
xtsc_response::stream_dumper::dump() method.
Dump an xtsc_tx_xfer object. This operator dumps an xtsc_tx_xfer object using the xtsc_-
tx_xfer::dump() method.
Summary of macros to disable or to do text logging. The following macros may be passed
to the compiler to disable text logging at compile time.
Unless compiled out using the above macros, the following macros may be used in source
code to do text logging at the specified level.
XTSC_FATAL(logger, msg)
XTSC_ERROR(logger, msg)
XTSC_WARN(logger, msg)
XTSC_NOTE(logger, msg)
XTSC_INFO(logger, msg)
XTSC_VERBOSE(logger, msg)
XTSC_DEBUG(logger, msg)
XTSC_TRACE(logger, msg)
See also:
XTSC_FATAL
XTSC_ERROR
XTSC_WARN
XTSC_NOTE
XTSC_INFO
XTSC_VERBOSE
XTSC_DEBUG
XTSC_TRACE
The following commands are supported by the global XTSC command handler called sc.
sc_delta_count
Return sc_core::sc_delta_count() (the total delta cycles in the simulation so
far).
sc_get_time_resolution
Return sc_core::sc_get_time_resolution().to_string().
sc_stop
Call sc_core::sc_stop().
sc_time_stamp
Return sc_core::sc_time_stamp().value() (the current simulation time in units of
the SystemC time resolution).
sc_version
Return sc_core::sc_version().
See also:
xtsc_command_handler_interface
The following commands are supported by the global XTSC command handler called xtsc.
dump_status
Call xtsc_core::dump_status() for all cores in the simulation.
dump_log_levels
Dump a list of the named log levels and their numeric value.
dump_loggers [<Pattern>]
Dump a list of all logger names (or optionally only those matching <Pattern>).
get_log_level <Logger>
Return the numeric log level of <Logger>.
have_all_cores_exited
Return xtsc_core::have_all_cores_exited() for all cores in the simulation.
info <Message>
Log entire command line (xtsc info <Message>) at INFO_LOG_LEVEL
is_debugging_synchronized
Return xtsc_core::is_debugging_synchronized() (applies to all debug-enabled
cores in the simulation).
note <Message>
Log entire command line (xtsc note <Message>) at NOTE_LOG_LEVEL
shmem_list
List all shared memories from calls to xtsc_get_shared_memory().
warn <Message>
Log entire command line (xtsc warn <Message>) at WARN_LOG_LEVEL
whoami
Return the instance name of the sc_module running this thread.
xtsc_dump_systemc_objects [<Pattern>]
Return os buffer from calling xtsc_dump_systemc_objects(os, <Pattern>).
xtsc_enable_text_logging <Enable>
Call xtsc_enable_text_logging(<Enable>). <Enable> may be 0|1.
xtsc_event_create <EventName>
Create a new sc_event and return its hierarchical name (which may differ between
SystemC 2.2 and 2.3).
xtsc_event_exists <EventName>
Return xtsc_event_exists(<EventName>).
xtsc_filter_dump [<FilterKindOrName>]
Call xtsc_filter_dump(<FilterKindOrName>, <FilterKindOrName>).
xtsc_filter_exists <FilterName>
Return xtsc_filter_exists(<FilterName>).
xtsc_filter_kind_dump [<FilterKind>]
Call xtsc_filter_kind_dump(<FilterKind>).
xtsc_get_relaxed_simulation_interval
Return xtsc::xtsc_get_relaxed_simulation_interval() /
xtsc::xtsc_get_system_clock_period().
xtsc_get_system_clock_factor
Return xtsc::xtsc_get_system_clock_factor().
xtsc_is_text_logging_enabled
Return xtsc::xtsc_is_text_logging_enabled().
xtsc_host_milliseconds
Return xtsc::xtsc_host_milliseconds().
xtsc_host_mutex_close <MutexName>
Call xtsc_host_mutex_close(Mutex(<MutexName>)).
xtsc_host_mutex_dump [<Pattern>]
Dump list of xtsc_host_mutex names, lock counts, and current state for names matching <Pattern> (defaul
xtsc_host_mutex_lock <MutexName>
Call xtsc_host_mutex_lock(Mutex(<MutexName>)).
xtsc_host_mutex_open <MutexName>
Call xtsc_host_mutex_open(<MutexName>).
xtsc_host_mutex_unlock <MutexName>
Call xtsc_host_mutex_unlock(Mutex(<MutexName>)).
xtsc_host_sleep [<Milliseconds>]
Call xtsc_host_sleep(<Milliseconds>).
xtsc_prepare_to_switch_sim_mode <Turbo>
Call xtsc::xtsc_prepare_to_switch_sim_mode(<Turbo>). Returns 1 if ready, else
returns 0. <Turbo> may be 0|1 (0=>Cycle-Accurate 1=>TurboXim)
xtsc_reset <HardReset>
Return xtsc::xtsc_reset(<HardReset>).
xtsc_set_relaxed_simulation_interval <NumCycles>
Call xtsc::xtsc_set_relaxed_simulation_interval(<NumCycles> *
xtsc::xtsc_get_system_clock_period()).
xtsc_switch_sim_mode <Turbo>
Call xtsc::xtsc_switch_sim_mode(<Turbo>). See xtsc_prepare_to_switch_sim_mode
which must return 1 before xtsc_switch_sim_mode is called.
xtsc_user_state_dump [<Pattern>]
Return the buffer from calling xtsc_user_state_dump(<Pattern>)
xtsc_user_state_get <Name>
Return xtsc_user_state_get(<Name>)
xtsc_version
Return xtsc::xtsc_version().
See also:
xtsc_command_handler_interface
Classes
• class xtsc_cache_parms
Constructor parameters for an xtsc_cache object.
• class xtsc_cache
This class implements an XTSC model of a typical cache module.
• class xtsc_arbiter_parms
Constructor parameters for a xtsc_arbiter object.
• class xtsc_arbiter
A memory interface arbiter and/or address translator.
• class xtsc_dma_engine_parms
Constructor parameters for a xtsc_dma_engine object.
• class xtsc_dma_engine
An example DMA engine implementation.
• struct xtsc_dma_request
This struct is plain old data (POD) used to define a DMA request.
• struct xtsc_dma_descriptor
This struct is plain old data (POD) used to define each descriptor of a DMA request.
• class xtsc_lookup_parms
Constructor parameters for a xtsc_lookup object.
• class xtsc_lookup
An TIE lookup implementation that connects using TLM-level ports.
• class xtsc_lookup_driver_parms
Constructor parameters for a xtsc_lookup_driver object.
• class xtsc_lookup_driver
A scripted driver for a lookup.
• class xtsc_master_parms
Constructor parameters for a xtsc_master object.
• class xtsc_master
A scripted memory interface master.
• class xtsc_master_tlm2_parms
Constructor parameters for a xtsc_master_tlm2 object.
• class xtsc_master_tlm2
A scripted OSCI TLM2 memory interface master.
• class xtsc_memory_parms
Constructor parameters for a xtsc_memory object.
• class xtsc_memory
A PIF, XLMI, or local memory.
• class xtsc_memory_tlm2_parms
Constructor parameters for a xtsc_memory_tlm2 object.
• class xtsc_memory_tlm2
A PIF, XLMI, or local memory which uses OSCI TLM2.
• class xtsc_mmio_parms
Constructor parameters for a xtsc_mmio object.
• class xtsc_mmio
A general-purpose memory-mapped input/output (MMIO) register device.
• class xtsc_queue_parms
Constructor parameters for an xtsc_queue object.
• class xtsc_queue
A queue implementation that connects using TLM-level ports.
• class xtsc_queue_consumer_parms
Constructor parameters for a xtsc_queue_consumer object.
• class xtsc_queue_consumer
A scripted consumer to drain a queue.
• class xtsc_queue_producer_parms
Constructor parameters for a xtsc_queue_producer object.
• class xtsc_queue_producer
A scripted producer to supply a queue.
• class xtsc_router_parms
Constructor parameters for a xtsc_router object.
• class xtsc_router
Example XTSC module implementing a router on a PIF network or local memory intercon-
nect.
• class xtsc_slave_parms
Constructor parameters for a xtsc_slave object.
• class xtsc_slave
A scripted memory interface slave.
• class xtsc_wire_parms
Constructor parameters for a xtsc_wire object.
• class xtsc_wire
A wire implementation that connects using TLM-level ports.
• class xtsc_wire_source_parms
Constructor parameters for a xtsc_wire_source object.
• class xtsc_wire_source
A scripted xtsc::xtsc_wire_write_if or pin-level source.
• class xtsc_lookup_pin_parms
Constructor parameters for a xtsc_lookup_pin object.
• class xtsc_lookup_pin
A TIE lookup implementation using the pin-level interface.
• class xtsc_memory_base
• class xtsc_memory_pin_parms
Constructor parameters for a xtsc_memory_pin object.
• class xtsc_memory_pin
This device implements a pin-level memory model.
• class xtsc_memory_trace_parms
Constructor parameters for a xtsc_memory_trace object.
• class xtsc_memory_trace
Example XTSC model which generates a value-change dump (VCD) file of the data mem-
bers of each xtsc::xtsc_request and xtsc::xtsc_response that passes through it ("allow_-
tracing" true) and/or which tracks the lifetime, latency, and counters of each transaction by
request type and by port number ("track_latency" true).
• class xtsc_module_pin_base
This is a base class for modules implementing pin-level interfaces, especially pin-level
memory interfaces.
• class xtsc_pin2tlm_lookup_transactor_parms
Constructor parameters for a xtsc_pin2tlm_lookup_transactor object.
• class xtsc_pin2tlm_lookup_transactor
A transactor to convert a pin-level TIE lookup interface to Xtensa TLM.
• class xtsc_pin2tlm_memory_transactor_parms
Constructor parameters for a xtsc_pin2tlm_memory_transactor transactor object.
• class xtsc_pin2tlm_memory_transactor
This device converts memory transactions from pin level to transaction level.
• class xtsc_queue_pin_parms
Constructor parameters for a xtsc_queue_pin object.
• class xtsc_queue_pin
A TIE queue implementation using the pin-level interface.
• class xtsc_tlm2pin_memory_transactor_parms
Constructor parameters for a xtsc_tlm2pin_memory_transactor transactor object.
• class xtsc_tlm2pin_memory_transactor
This transactor converts memory transactions from transaction level (TLM) to pin level.
• class xtsc_tlm22xttlm_transactor_parms
Constructor parameters for a xtsc_tlm22xttlm_transactor object.
• class xtsc_tlm22xttlm_transactor
Example module implementing an OSCI TLM2 to Xtensa TLM (xttlm) transactor.
• class xtsc_wire_logic_parms
Constructor parameters for a xtsc_wire_logic object.
• class xtsc_wire_logic
A general-purpose glue logic device for the xtsc::xtsc_wire_write_if.
• class xtsc_xttlm2tlm2_transactor_parms
Constructor parameters for a xtsc_xttlm2tlm2_transactor object.
• class xtsc_xttlm2tlm2_transactor
Example module implementing an Xtensa TLM (xttlm) to OSCI TLM2 transactor.
Typedefs
Functions
All XTSC component library objects are in the xtsc_component namespace. Note: this
does not include xtsc_core which is in the xtsc namespace.
7. Class Documentation
POD class to help keep track of information related to a special address or address range.
#include <xtsc/xtsc_memory.h>
Public Types
Public Attributes
• xtsc_address m_low_address
Single address or low address of address range.
• xtsc_address m_high_address
High address of address range.
• bool m_is_range
True if this is an address range.
• u32 m_port_num
0-m_num_ports: If m_port_num==m_num_ports it means port number is don’t care.
• u32 m_num_ports
Number of ports that the memory has.
• u32 m_type
0-7: where 0=READ, 1=BLOCK_READ, 2=RCW, 3=WRITE, 4=BLOCK_WRITE, 5=don’t
care 6=BURST_READ 7=BURST_WRITE
• status_t m_status
The response status to be given (when m_list is false).
• bool m_list
True if the response status should be taken from the response status list.
• u32 m_limit
How many times this address/range should get the specified response (0=no limit).
• u32 m_count
How many times this address/range has gotten the specified response.
• bool m_finished
True when m_limit has been reached.
POD class to help keep track of information related to a special address or address range.
Definition at line 1559 of file xtsc_memory.h.
The documentation for this class was generated from the following file:
• xtsc_memory.h
Class to keep track of address ranges and what DMI access has been granted/invalidated.
Public Attributes
• xtsc::xtsc_address m_beg_range
Beginning address of the range.
• xtsc::xtsc_address m_end_range
End address of the range.
Class to keep track of address ranges and what DMI access has been granted/invalidated.
Definition at line 505 of file xtsc_tlm22xttlm_transactor.h.
The documentation for this class was generated from the following file:
• xtsc_tlm22xttlm_transactor.h
Class to keep track of address ranges and what DMI access has been granted/invalidated.
Public Attributes
• xtsc::xtsc_address m_beg_range
Beginning address of the range.
• xtsc::xtsc_address m_end_range
End address of the range.
Class to keep track of address ranges and what DMI access has been granted/invalidated.
Definition at line 750 of file xtsc_xttlm2tlm2_transactor.h.
The documentation for this class was generated from the following file:
• xtsc_xttlm2tlm2_transactor.h
Public Attributes
• xtsc::u32 m_pre_shift
Amount to right shift the address by before masking.
• xtsc::u32 m_mask
Mask to extract bits to be used in routing.
• xtsc::u32 m_post_shift
Amount to left shift the masked value by.
• xtsc_router.h
xtsc_script_file
m_p_definition_file
m_mmio
m_p_wire_write_impl
xtsc_parms xtsc_mmio_parms m_p_register_definition input_definition
m_mmio_parms
m_input_definition xtsc_wire_write_if_impl
m_mmio register_definition
xtsc_resettable xtsc_module xtsc_mmio
m_mmio xtsc_wire_write_if
m_active_request m_request_impl
xtsc_connection_interface xtsc_command_handler_interface
xtsc_request_if_impl
xtsc_debug_if xtsc_request_if
xtsc_request m_p_request
stream_dumper
m_stream_dumper
Classes
• class xtsc_wire_write_if_impl
Implementation of xtsc_wire_write_if.
Public Attributes
• xtsc_mmio & m_mmio
Our xtsc_mmio object.
• std::string m_name
Input port name.
• register_definition ∗ m_p_register_definition
Our associated register_definition.
• xtsc::u32 m_high_bit
High bit of register.
• xtsc::u32 m_low_bit
Low bit of register.
• xtsc_wire_write_if_impl ∗ m_p_wire_write_impl
m_p_wire_write_export binds to this
• wire_write_export ∗ m_p_wire_write_export
sc_export for this input
• xtsc_mmio.h
xtsc_connection_interface xtsc_resettable
m_p_definition_file
xtsc_wire_logic
m_logic
xtsc_wire_write_if input_definition
m_input_definition m_p_wire_write_impl
xtsc_wire_write_if_impl
Classes
• class xtsc_wire_write_if_impl
Implementation of xtsc_wire_write_if.
• void reset ()
• void dump (std::ostream &os=std::cout) const
Dump.
Public Attributes
• std::string m_name
Input port name.
• xtsc::u32 m_index
Our index in xtsc_wire_logic::m_inputs.
• xtsc::u32 m_bit_width
Port width in bits.
• sc_dt::sc_unsigned m_value
Latest received value of input.
• std::string m_initial_value
From <InitialValue> in definition_file.
• bool m_detect_value_change
True if any dependent output has a <WritePolicy> of change.
• assignment_table m_assignments
Vector of RPN assignments; 1 for each output bit touched by this input.
• output_set m_lua_function_outputs
Set of all lua_function outputs that depend on this input.
• output_set m_outputs
Set of all outputs that depend on this input.
• xtsc_wire_write_if_impl ∗ m_p_wire_write_impl
m_p_wire_write_export binds to this
• wire_write_export ∗ m_p_wire_write_export
sc_export for this input
• xtsc_wire_logic.h
Iterator definition.
#include <xtsc/xtsc_wire_logic.h>
• xtsc::u32 range ()
Return the number of values the iterator ranges over.
• void init ()
Initialize the iterator to its starting value.
• xtsc::u32 value ()
Return the iterators current value.
• void step ()
Step the iterator to its next value.
Public Attributes
• std::string m_name
Iterator name.
• xtsc::u32 m_index
Index in.
• xtsc::u32 m_start
First value iterator is to assume.
• xtsc::u32 m_stop
Iterator limit.
• xtsc::i32 m_step
Step size (can be negative).
• xtsc::u32 m_value
The current value of the iterator.
Iterator definition.
Definition at line 891 of file xtsc_wire_logic.h.
The documentation for this class was generated from the following file:
• xtsc_wire_logic.h
Public Attributes
• xtsc::xtsc_address tag
Address tag.
• bool valid
Valid bit.
• bool dirty
Dirty bit.
• bool lrf
LRF (least recently filled) bit.
• xtsc_cache.h
xtsc_mode_switch_if
m_tlm_bw_transport_if_impl
xtsc_command_handler_interface tlm_bw_transport_if_impl
m_transactor
xtsc_connection_interface
xtsc_module xtsc_xttlm2tlm2_transactor
m_nb_mm m_transactor
xtsc_resettable
xtsc_request m_p_request
stream_dumper
m_stream_dumper
Public Attributes
• xtsc_xttlm2tlm2_transactor & m_transactor
Our xtsc_xttlm2tlm2_transactor object.
• xtsc_xttlm2tlm2_transactor.h
xtsc_debug_if xtsc_request_if
xtsc_parms xtsc_mmio_parms
m_mmio_parms
m_mmio xtsc_request_if_impl
xtsc_connection_interface xtsc_module
m_request_impl
xtsc_script_file m_active_request
xtsc_request m_p_request
stream_dumper
m_stream_dumper
Public Attributes
• std::string m_name
Port name.
• std::string m_reg_name
Name or our associated register.
• xtsc::u32 m_high_bit
High bit of register.
• xtsc::u32 m_low_bit
Low bit of register.
• wire_write_port ∗ m_p_wire_write_port
sc_port for this output
• xtsc_mmio.h
xtsc_connection_interface xtsc_resettable
m_p_definition_file
xtsc_wire_logic
m_logic
output_definition
• void reset ()
Reset and drive the output.
• output_info ∗ new_output_info ()
Get a new output_info object from the pool.
Public Attributes
• xtsc_wire_logic & m_logic
Our xtsc_wire_logic object.
• std::string m_name
Port name.
• xtsc::u32 m_index
Our index in xtsc_wire_logic::m_outputs.
• xtsc::u32 m_bit_width
Port width in bits.
• sc_dt::sc_unsigned m_value
Latest computed value of output.
• sc_dt::sc_unsigned m_value_prev
Previous computed value of output.
• sc_dt::sc_unsigned m_bit_assigned
bit is 1 if that bit position has an assign statement in definition_file
• std::string m_initial_value
From <InitialValue> in definition_file.
• std::string m_lua_function_name
From <LuaFunctionName> of lua_function line in definition_file.
• bool m_lua_function
True if this output appears in a lua_function statement in definition_file.
• bool m_assign
True if this output appears in an assign statement in definition_file.
• bool m_always_write
Write port even if value hasn’t changed.
• bool m_delay_output
• sc_core::sc_time m_delay_time
Amount of delay.
• sc_core::sc_event m_event
Event to notify for delayed output.
• wire_write_port ∗ m_p_wire_write_port
sc_port for this output
• xtsc_wire_logic.h
xtsc_wire_write_if
m_source xtsc_wire_write_if_impl
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating
• void reset ()
Reset and drive the output.
• void complement_output ()
Drive bit-wise complement of the previous value driven.
Public Attributes
• std::string m_name
Port name.
• xtsc::u32 m_index
Our output index.
• xtsc::u32 m_bit_width
Port width in bits.
• bool m_pin_level
True output port is pin-level.
• sc_dt::sc_unsigned m_value
Latest value of output.
• sc_dt::sc_bv_base m_value_bv
Current value from "script_file" (for pin-level).
• std::string m_initial_value
From <InitialValue> in definition_file.
• tlm_port ∗ m_p_tlm_port
output port for TLM
• pin_port ∗ m_p_pin_port
output port for pin-level
• xtsc_wire_source.h
Public Attributes
• sc_dt::sc_unsigned m_value
The value to be output.
• sc_core::sc_time m_output_time
The time to output it.
• xtsc::u64 m_delta_cycle
The delta cycle when output was queued.
• xtsc_wire_logic.h
m_p_initial_value_file
m_p_memory
xtsc_debug_if xtsc_memory_pin
xtsc_debug_if_impl pif_req_info
Public Attributes
• xtsc::u32 m_port
• sc_core::sc_time m_time_stamp
Time when request was received.
• req_cntl m_req_cntl
POReqCntl.
• xtsc::xtsc_address m_address
POReqAdrs.
• sc_dt::sc_bv_base m_data
POReqData.
• xtsc::xtsc_byte_enables m_byte_enables
POReqDataBE.
• sc_dt::sc_uint_base m_id
POReqId.
• sc_dt::sc_uint_base m_priority
POReqPriority.
• sc_dt::sc_uint_base m_route_id
POReqRouteId.
• xtsc::xtsc_byte_enables m_fixed_byte_enables
POReqDataBE swizzled if m_big_endian.
Information about each request. Constructor and init() populate data members by reading
the input pin values.
Definition at line 967 of file xtsc_memory_pin.h.
The documentation for this class was generated from the following file:
• xtsc_memory_pin.h
Public Attributes
• xtsc::u32 m_start_priority
From <StartPriority> in <PortNPolicy> in "arbitration_policy".
• xtsc::u32 m_end_priority
From <EndPriority> in <PortNPolicy> in "arbitration_policy".
• xtsc::u32 m_decrement
From <Decrement> in <PortNPolicy> in "arbitration_policy".
• xtsc::u32 m_current_priority
The current priority of this port.
• xtsc_arbiter.h
xtsc_debug_if xtsc_request_if
xtsc_parms xtsc_mmio_parms
m_mmio_parms
m_mmio xtsc_request_if_impl
xtsc_connection_interface xtsc_module
m_request_impl
xtsc_script_file m_active_request
xtsc_request m_p_request
stream_dumper
m_stream_dumper
• void reset ()
Reset the register.
Public Attributes
• std::string m_name
Register name.
• xtsc::xtsc_address m_address
Lowest address of register.
• xtsc::u32 m_bit_width
Number of bits in register.
• sc_dt::sc_unsigned ∗ m_p_initial_value
Initial value of register.
• sc_dt::sc_unsigned ∗ m_p_previous_value
Previous value of register.
• sc_dt::sc_unsigned ∗ m_p_current_value
Current value of register.
• output_set m_output_set
Set of output_definition’s.
• input_set m_input_set
Set of input_definition’s.
Parameters:
always_write If true, write all outputs. If false, only write outputs that have changed
since the last call to write_outputs().
The documentation for this class was generated from the following file:
• xtsc_mmio.h
Public Types
• typedef sc_dt::sc_uint_base sc_uint_base
• typedef xtsc::xtsc_request::type_t type_t
• typedef xtsc::u32 u32
• typedef xtsc::xtsc_request xtsc_request
• typedef xtsc::xtsc_exception xtsc_exception
Private Attributes
• sc_uint_base m_value
• bool m_exclusive
True if exclusive encodings should be used for request type.
READ|WRITE|SNOOP 1
RCW 2
BLOCK_READ|BLOCK_WRITE 2|4|8|16
BURST_READ|BURST_WRITE 2|3|4|5|6|7|8
• xtsc_module_pin_base.h
xtsc_response
stream_dumper
response_info m_stream_dumper
xtsc_request
m_p_nascent_response m_request
request_info
m_p_nascent_request
m_p_first_request_info
req_rsp_info
Public Attributes
• request_info ∗ m_p_first_request_info
To create the responses for sending upstream.
• xtsc::u32 m_num_rsp_received
To place the data in the upstream response buffer.
• xtsc::u32 m_num_last_xfer_rsp_expected
To determine when the final downstream response has been received.
• xtsc::u32 m_num_last_xfer_rsp_received
To determine when the final downstream response has been received.
• xtsc::u32 m_num_block_write_requests
To determine last_transfer flag of multi-sets and also data offset.
• xtsc::xtsc_address m_block_write_address
To determine address for multi-sets (slave width < master width).
• xtsc::u8 m_slot
Entry in m_req_rsp_table.
• bool m_responses_sent
To detect conflicting error responses from multi-sets.
• bool m_single_rsp_error_received
True if RSP_ADDRESS_ERROR|RSP_ADDRESS_DATA_ERROR received.
• request_info ∗ m_p_nascent_request
Hold the downstream request being built from multiple BLOCK_WRITE.
• response_info ∗ m_p_nascent_response
Hold the upstrearm response being built.
• xtsc_router.h
xtsc_response
stream_dumper
response_info m_stream_dumper
xtsc_request
m_p_nascent_response m_request
request_info
m_p_nascent_request
m_p_first_request_info
req_rsp_info
Public Attributes
• request_info ∗ m_p_first_request_info
To create the responses for sending upstream.
• xtsc::u32 m_num_rsp_received
To place the data in the upstream response buffer.
• xtsc::u32 m_num_last_xfer_rsp_expected
To determine when the final downstream response has been received.
• xtsc::u32 m_num_last_xfer_rsp_received
To determine when the final downstream response has been received.
• xtsc::u32 m_num_block_write_requests
To determine last_transfer flag of multi-sets and also data offset.
• xtsc::xtsc_address m_block_write_address
Keep track of next address to be used for downstream requests.
• xtsc::u8 m_slot
Entry in m_req_rsp_table.
• bool m_responses_sent
To detect conflicting error responses from multi-sets.
• bool m_single_rsp_error_received
True if RSP_ADDRESS_ERROR|RSP_ADDRESS_DATA_ERROR received.
• request_info ∗ m_p_nascent_request
Hold the downstream request being built from multiple BLOCK_WRITE.
• response_info ∗ m_p_nascent_response
Hold the upstrearm response being built.
• xtsc_arbiter.h
xtsc_debug_if
m_pin2tlm xtsc_debug_if_impl
xtsc_connection_interface
xtsc_module m_debug_impl
xtsc_resettable
xtsc_module_pin_base xtsc_pin2tlm_memory_transactor m_pin2tlm
m_subbank_activity
m_respond_impl
subbank_activity xtsc_respond_if_impl
m_pin2tlm
xtsc_respond_if request_info
m_request
xtsc_request m_stream_dumper
m_p_request stream_dumper
Public Attributes
• const xtsc_pin2tlm_memory_transactor & m_pin2tlm
A reference to the owning xtsc_pin2tlm_memory_transactor.
• req_cntl m_req_cntl
POReqCntl/SnoopReqCntl.
• xtsc::xtsc_address m_address
POReqAdrs.
• sc_dt::sc_bv_base m_data
POReqData.
• xtsc::xtsc_byte_enables m_byte_enables
POReqDataBE.
• sc_dt::sc_uint_base m_id
POReqId.
• sc_dt::sc_uint_base m_priority
POReqPriority.
• sc_dt::sc_uint_base m_route_id
POReqRouteId.
• sc_dt::sc_uint_base m_req_attribute
POReqAttribute.
• sc_dt::sc_uint_base m_req_domain
POReqDomain.
• sc_dt::sc_uint_base m_vadrs
POReqCohVAdrsIndex/SnoopReqCohVAdrsIndex.
• sc_dt::sc_uint_base m_coherence
POReqCohCntl/SnoopReqCohCntl.
• xtsc::xtsc_byte_enables m_fixed_byte_enables
POReqDataBE swizzled if m_big_endian.
• xtsc::xtsc_address m_fixed_address
POReqAdrs fixed for xtsc_request.
• xtsc::xtsc_request m_request
The TLM request.
• xtsc::u64 m_cycle_num
Only if subbanked: Cycle number of request.
• xtsc::u32 m_cycle_index
Only if subbanked: Cycle index of request.
Information about each request. Constructor and init() populate data members by reading
the input pin values.
Definition at line 841 of file xtsc_pin2tlm_memory_transactor.h.
The documentation for this class was generated from the following file:
• xtsc_pin2tlm_memory_transactor.h
xtsc_request
request_info stream_dumper
Public Attributes
• xtsc::xtsc_request m_request
Our copy of the request.
• sc_core::sc_time m_time_stamp
Timestamp when received.
• xtsc::xtsc_response::status_t m_status
Response status from "script_file" when m_list is false.
• bool m_list
True if the response status should be taken from the response status list.
• xtsc_memory.h
xtsc_request
request_info stream_dumper
Public Attributes
• xtsc::xtsc_request m_request
Our copy of the request.
• sc_core::sc_time m_time_stamp
Timestamp when received.
• xtsc_router.h
xtsc_request
request_info stream_dumper
Public Attributes
• xtsc::xtsc_request m_request
Our copy of the request.
• xtsc::u32 m_port_num
Port request came in on.
• sc_core::sc_time m_time_stamp
Timestamp when received.
• xtsc_arbiter.h
Public Types
• typedef sc_dt::sc_uint_base sc_uint_base
• typedef xtsc::xtsc_response::status_t status_t
• typedef xtsc::u32 u32
• typedef xtsc::xtsc_response xtsc_response
• typedef xtsc::xtsc_exception xtsc_exception
• sc_uint_base init (u32 status, bool last, bool exclusive_req=false, bool exclusive_-
ok=false)
Initialize a resp_cntl given a status and a last transfer.
Private Attributes
• sc_uint_base m_value
• xtsc_module_pin_base.h
xtsc_response
response_info stream_dumper
Public Attributes
• xtsc::xtsc_response ∗ m_p_response
The response.
• xtsc::u32 m_bus_addr_bits
Bits of xtsc_request address that identify byte lanes.
• xtsc::u32 m_size
Size from xtsc_request.
• xtsc::u32 m_id
Transfer ID from xtsc_request.
• xtsc::u32 m_route_id
Route ID from xtsc_request.
• bool m_is_read
Expect read data in response.
• bool m_copy_data
True if data needs to be copied from m_buffer to response.
• xtsc::u32 m_status
Response status.
• bool m_last
True if actual response has last_transfer bit set.
• xtsc_tlm2pin_memory_transactor.h
xtsc_response
response_info stream_dumper
Public Attributes
• xtsc::xtsc_response m_response
Our copy of the response.
• sc_core::sc_time m_time_stamp
Timestamp when received.
• xtsc_router.h
xtsc_response
response_info stream_dumper
Public Attributes
• xtsc::xtsc_response ∗ m_p_response
The xtsc_response to respond with.
• bool m_respond_now
The response line had delay of "now".
• bool m_cont
The response line had CONT.
• sc_core::sc_time m_delay
How long to delay.
• xtsc_slave.h
xtsc_response
response_info stream_dumper
Public Attributes
• xtsc::xtsc_response m_response
Our copy of the response.
• sc_core::sc_time m_time_stamp
Timestamp when received.
• xtsc_arbiter.h
• xtsc.h
Public Attributes
• xtsc::u64 m_max_latency
Maximum latency.
• xtsc::u64 m_max_lifetime
Maximum lifetime.
• xtsc::u64 m_max_latency_tag
Transaction tag with maximum latency.
• xtsc::u64 m_max_lifetime_tag
Transaction tag with maximum lifetime.
This class is used to keep track of transaction statistics. The xtsc_memory_trace class
uses m_statistics_maps which has one map for each port. Each map maps from an xtsc_-
request::type_t to a statistic_info object used to keep track of statistics for that request type.
See also:
m_statistics_maps
transaction_info
• xtsc_memory_trace.h
Helper class to make it easy to dump xtsc_response to an ostream with or without data
values.
#include <xtsc/xtsc_response.h>Collaboration diagram for stream_dumper:
stream_dumper
m_stream_dumper m_p_response
xtsc_response
Helper class to make it easy to dump xtsc_response to an ostream with or without data
values.
See also:
show_data
• xtsc_response.h
Helper class to make it easy to dump xtsc_request to an ostream with or without data
values.
#include <xtsc/xtsc_request.h>Collaboration diagram for stream_dumper:
stream_dumper
m_stream_dumper m_p_request
xtsc_request
Helper class to make it easy to dump xtsc_request to an ostream with or without data
values.
See also:
show_data
• xtsc_request.h
Keep track of subbank activity to a given given bank to ensure all responses are consistent
(all RSP_OK or all RSP_NACC).
#include <xtsc/xtsc_pin2tlm_memory_transactor.h>
Public Attributes
• xtsc::u64 m_cycle_num
Cycle number of requests.
• xtsc::u32 m_num_req
Number of subbank requests to this bank this cycle.
• xtsc::u32 m_num_rsp_ok
Number of RSP_OK responses received.
• xtsc::u32 m_num_rsp_nacc
Number of RSP_NACC responses received.
Keep track of subbank activity to a given given bank to ensure all responses are consistent
(all RSP_OK or all RSP_NACC). Only used for DRAM0BS|DRAM1BS and then only if
"has_busy" is true.
Definition at line 896 of file xtsc_pin2tlm_memory_transactor.h.
The documentation for this class was generated from the following file:
• xtsc_pin2tlm_memory_transactor.h
Implementation of tlm_bw_transport_if.
#include <xtsc/xtsc_master_tlm2.h>Collaboration diagram for tlm_bw_transport_if_-
impl:
xtsc_connection_interface xtsc_resettable
xtsc_master_tlm2
Protected Attributes
• xtsc_master_tlm2 & m_master
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of tlm_bw_transport_if.
Definition at line 391 of file xtsc_master_tlm2.h.
The documentation for this class was generated from the following file:
• xtsc_master_tlm2.h
xtsc_mode_switch_if
m_nb_mm
xtsc_command_handler_interface nb_mm
m_transactor
xtsc_connection_interface
xtsc_module xtsc_xttlm2tlm2_transactor
m_tlm_bw_transport_if_impl m_transactor
xtsc_resettable
xtsc_request m_p_request
stream_dumper
m_stream_dumper
Protected Attributes
• xtsc_xttlm2tlm2_transactor & m_transactor
• xtsc::u32 m_port_num
Our port number.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of tlm_bw_transport_if.
Definition at line 720 of file xtsc_xttlm2tlm2_transactor.h.
The documentation for this class was generated from the following file:
• xtsc_xttlm2tlm2_transactor.h
xtsc_connection_interface xtsc_resettable
m_tlm_fw_transport_if_impl m_transactor
xtsc_tlm22xttlm_transactor xtsc_respond_if
transaction_info xtsc_respond_if_impl
Protected Attributes
• xtsc_tlm22xttlm_transactor & m_transactor
Our xtsc_tlm22xttlm_transactor object.
• xtsc::u32 m_width8
The bus width in bytes. See "byte_width".
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
Implementation of tlm_fw_transport_if<>.
Definition at line 464 of file xtsc_tlm22xttlm_transactor.h.
Constructor.
Parameters:
transactor A reference to the owning xtsc_tlm22xttlm_transactor object.
port_num The port number that this object serves.
• xtsc_tlm22xttlm_transactor.h
Implementation of tlm_fw_transport_if<>.
#include <xtsc/xtsc_memory_tlm2.h>Collaboration diagram for tlm_fw_transport_if_-
impl:
m_p_initial_value_file
xtsc_memory_tlm2
Protected Attributes
• xtsc_memory_tlm2 & m_memory
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
• bool m_busy
Only allow one request at a time.
Implementation of tlm_fw_transport_if<>.
Definition at line 706 of file xtsc_memory_tlm2.h.
Constructor.
Parameters:
memory A reference to the owning xtsc_memory_tlm2 object.
port_num The port number that this object serves.
• xtsc_memory_tlm2.h
This class is used to keep track of 4 key times during each transaction’s lifecycle in order
to compute transaciton lifetime and latency.
#include <xtsc/xtsc_memory_trace.h>
Public Attributes
• sc_core::sc_time m_time_req_beg
Transaction request begin time.
• sc_core::sc_time m_time_req_end
Transaction request end time.
• sc_core::sc_time m_time_rsp_beg
Transaction response begin time.
• sc_core::sc_time m_time_rsp_end
Transaction response end time.
• type_t m_type
Transaction request type.
This class is used to keep track of 4 key times during each transaction’s lifecycle in order to
compute transaciton lifetime and latency. When the transaction is complete, these 4 times
and the XTSC System Clock Period (SCP) are used to calculate the transaction’s lifetime
and latency like this:
• xtsc_memory_trace.h
m_id_to_transaction_info_tab m_tlm_fw_transport_if_impl
transaction_info tlm_fw_transport_if_impl
m_transactor m_transactor
xtsc_connection_interface
xtsc_tlm22xttlm_transactor
xtsc_module m_transactor
xtsc_resettable
xtsc_command_handler_interface m_xtsc_respond_if_impl
xtsc_respond_if_impl
xtsc_respond_if
• void fini ()
Finialize a transaction_info object.
Public Attributes
• std::string m_done_event_name
Unique name for m_done_event.
• sc_core::sc_event m_done_event
Signal nb_transport all xtsc_request’s sent & xtsc_response’s rec’d.
• tlm::tlm_generic_payload ∗ m_p_gp
The original TLM2 transaction.
• xtsc::u32 m_pending_last_rsps
Number of last_transfer responses still outstanding.
• bool m_all_requests_sent
Set to true when all xtsc_request’s have been sent and accepted.
• xtsc_tlm22xttlm_transactor.h
xtsc_request
m_p_request m_stream_dumper
stream_dumper
m_p_request m_stream_dumper
xtsc_response
m_p_response
transaction_info
Public Attributes
• xtsc::xtsc_request ∗ m_p_request
xtsc_request for this transaction
• tlm::tlm_phase m_phase
TLM2 phase this transaction is in.
• tlm::tlm_generic_payload ∗ m_p_trans
tlm_generic_payload for this transaction
• xtsc::xtsc_response ∗ m_p_response
• bool m_last_tlm2_beat
True if last TLM2 transaction for a given request (needed for BLOCK_READ|BURST_-
READ).
• xtsc_xttlm2tlm2_transactor.h
Public Attributes
• u32 source_address
Source address.
• u32 destination_address
Destination address.
• u32 source_pitch
Source pitch.
• u32 destination_pitch
Destination pitch.
• u16 num_rows
Number of rows to transfer.
• u16 num_bytes
Number of bytes per row to transfer.
• u16 max_block_transfers
Maximum block size for DMA (valid values are 2|4|8|16 transfers).
• u16 max_num_out
Maximum number of outstanding requests with a range of 1-16.
• bool sync_intr_enabled
Enable Sync interrupt on successful completion of descriptor.
• xtsc_udma.h
Public Attributes
• std::string m_filter_kind
The xtsc_filter kind.
• std::string m_filter_name
The xtsc_filter name.
• xtsc::u32 m_watchfilter
The assigned watchfilter number.
• xtsc_memory.h
Public Attributes
• std::string m_filter_kind
The xtsc_filter kind.
• std::string m_filter_name
The xtsc_filter name.
• xtsc::u32 m_watchfilter
The assigned watchfilter number.
• xtsc_router.h
Public Types
Public Attributes
• xtsc_address m_start_address8
• xtsc_address m_end_address8
• u32 m_port_num
• u32 m_delta
Address-range to port-number association (for example, a routing table entry). This class
represents an address-range-to-port-number association such as might constitute a single
entry in a routing table or address translation table. It is a plain old data (or POD) class,
whose members are meant to be directly read or written; however, in normal usage, the
data members would be written just once (at construction time).
See also:
xtsc_component::xtsc_router
xtsc_component::xtsc_arbiter
Constructor.
Parameters:
start_address8 The lowest byte address in the memory range.
end_address8 The highest byte address in the memory range.
port_num The port number to associate with the given address range.
delta The address translation to apply. This amount should be added to the address
of each request.
• xtsc_address_range_entry.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_arbiter
xtsc_parms xtsc_arbiter_parms
m_arbiter_parms
xtsc_connection_interface xtsc_module
xtsc_respond_if
xtsc_resettable xtsc_command_handler_interface
m_arbiter xtsc_respond_if_impl
m_responses m_respond_impl
xtsc_arbiter
xtsc_request_if
xtsc_debug_if
Classes
• class port_policy_info
Information from "arbitration_policy" for arbitrate_policy().
• class req_rsp_info
Information for PIF width converter (PWC) mode.
• class request_info
Information about each request.
• class response_info
Information about each response.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• SC_HAS_PROCESS (xtsc_arbiter)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
• xtsc::u32 get_num_masters ()
Get the number of memory interface masters that can be connected with this xtsc_arbiter
(this is the number of memory interface slave port pairs that this xtsc_arbiter has).
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void end_of_simulation ()
• void connect (xtsc_arbiter &arbiter, xtsc::u32 port_num)
Connect an upstream xtsc_arbiter with this xtsc_arbiter.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_request_if > ∗∗ m_request_exports
Masters bind to these.
• xtsc::u32 random ()
Compute a pseudo-random sequence based on George Marsaglia’s multiply-with-carry
method.
• xtsc::u8 get_empty_slot ()
Get the next empty Request ID slot.
• xtsc::u32 get_available_route_id ()
Get the next available route ID.
• void nacc_remaining_requests ()
Common routine to nacc all remaining requests when operating with m_one_at_a_time
true.
• void compute_delays ()
Common method to compute/re-compute time delays.
• void reset_fifos ()
Reset internal fifos.
Protected Attributes
• xtsc_request_if_impl ∗∗ m_request_impl
m_request_exports bind to these
• xtsc_respond_if_impl m_respond_impl
m_respond_export binds to this
• xtsc_arbiter_parms m_arbiter_parms
Copy of xtsc_arbiter_parms.
• bool m_is_pwc
True if acting as a PIF width converter.
• bool m_use_block_requests
PWC: From "use_block_requests" parameter.
• xtsc::u32 m_slave_byte_width
PWC: From "slave_byte_width" parameter.
• xtsc::u8 m_next_slot
PWC: Next slot to test for availability.
• xtsc::u8 m_pending_request_id
PWC: New ID of pending multi-request (when != m_num_slots).
• xtsc::u8 m_active_block_read_id
PWC: ID of BLOCK_READ request while responses are active.
• xtsc::u32 m_num_masters
The number of slave port pairs for masters to connect to.
• bool m_one_at_a_time
True if arbiter will only accept one request at a time.
• bool m_align_request_phase
See "align_request_phase" parameter.
• bool m_check_route_id_bits
See "check_route_id_bits" parameter.
• xtsc::u32 m_route_id_bits_mask
Our bit-field in the request route ID.
• xtsc::u32 m_route_id_bits_clear
All bits 1 except our bit-field in the request route ID.
• xtsc::u32 m_route_id_bits_shift
Offset to our bit-field in request route ID.
• xtsc::u32 m_num_route_ids
See "num_route_ids" in xtsc_arbiter_parms.
• xtsc::u32 m_route_ids_used
Keep track of how many route ID’s are in use.
• xtsc::u32 m_next_route_id
Next free entry in m_routing_table (or 0xFFFFFFFF if none).
• xtsc::u32 ∗ m_downstream_route_id
Keep track for multi-xfer reqs: RCW|BLOCK_WRITE|BURST_WRITE.
• bool m_do_translation
Indicates address translations may apply.
• bool m_waiting_for_nacc
True if waiting for RSP_NACC from slave.
• bool m_request_got_nacc
True if active request got RSP_NACC from slave.
• xtsc::u32 m_token
The port number which has the token.
• bool m_lock
Lock if non-last_transfer.
• bool m_read_only
From "read_only" parameter.
• bool m_write_only
From "write_only" parameter.
• bool m_log_peek_poke
From "log_peek_poke" parameter.
• sc_core::sc_time m_clock_period
This arbiter’s clock period.
• sc_core::sc_time m_arbitration_phase
Clock phase arbitration occurs.
• sc_core::sc_time m_arbitration_phase_plus_one
Clock phase arbitration occurs plus one clock period.
• sc_core::sc_time m_time_resolution
SystemC time resolution.
• xtsc::u64 m_clock_period_value
Clock period as u64.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• bool m_dram_lock
See "dram_lock" in xtsc_arbiter_parms.
• bool m_external_cbox
See "external_cbox" in xtsc_arbiter_parms.
• xtsc::u32 m_xfer_en_port
See "xfer_en_port" in xtsc_arbiter_parms.
• bool m_delay_from_receipt
True if delay starts upon request receipt.
• bool m_immediate_timing
True if no delay (not even a delta cycle).
• sc_core::sc_time m_last_request_time_stamp
Time last request was sent out.
• sc_core::sc_time m_last_response_time_stamp
Time last response was sent out.
• sc_core::sc_time m_recovery_time
See "recovery_time" in xtsc_arbiter_parms.
• sc_core::sc_time m_request_delay
See "request_delay" in xtsc_arbiter_parms.
• sc_core::sc_time m_nacc_wait_time
See "nacc_wait_time" in xtsc_arbiter_parms.
• sc_core::sc_time m_response_delay
See "response_delay" in xtsc_arbiter_parms.
• sc_core::sc_time m_response_repeat
See "response_repeat" in xtsc_arbiter_parms.
• xtsc::u32 m_fail_port_mask
See "fail_port_mask" in xtsc_arbiter_parms.
• xtsc::u32 m_fail_percentage
See "fail_percentage" in xtsc_arbiter_parms.
• xtsc::u32 m_fail_seed
See "fail_seed" in xtsc_arbiter_parms.
• xtsc::u32 m_z
For Marsaglia’s multipy-with-carry PRNG.
• xtsc::u32 m_w
For Marsaglia’s multipy-with-carry PRNG.
• xtsc::u32 m_let_through
Random number gating threshold based on fail percentage.
• std::string m_arbitration_policy
See "arbitration_policy" in xtsc_arbiter_parms.
• xtsc::u32 ∗ m_ports_with_requests
For arbitrate_policy() method.
• std::string m_lock_port_groups
See "lock_port_groups" in xtsc_arbiter_parms.
• bool m_use_lock_port_groups
True if "lock_port_groups" was specified.
• sc_core::sc_event m_arbiter_thread_event
To notify arbiter_thread.
• sc_core::sc_event m_response_thread_event
To notify response_thread.
• sc_core::sc_event m_align_request_phase_thread_event
To notify align_request_phase_thread.
• bool m_profile_buffers
See "profile_buffers" in xtsc_arbiter_parms.
• xtsc::u32 ∗ m_max_num_requests
The maximum available items in request_fifos.
• sc_core::sc_time ∗ m_max_num_requests_timestamp
• xtsc::u64 ∗ m_max_num_requests_tag
Tag of max buffered items in request_fifos.
• xtsc::u32 m_max_num_responses
The maximum available items in response_fifo.
• sc_core::sc_time m_max_num_responses_timestamp
Time when the max response buffer happened.
• xtsc::u64 m_max_num_responses_tag
Tag of max buffered items in response_fifo.
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
A memory interface arbiter and/or address translator. Example XTSC module implementing
an arbiter that allows a memory interface slave module (e.g. xtsc_memory or xtsc_mmio)
to be accessed by multiple memory interface master modules (e.g. xtsc_core and/or xtsc_-
master). All modules involved communicate via the xtsc::xtsc_request_if and xtsc::xtsc_-
respond_if interfaces.
By default, this module supports PIF interconnect but it can also be configured for some
types of local memory interconnect. See "dram_lock", "external_cbox", and "xfer_en_port".
This module can also be used to provided address translations. Each memory interface
master can have a different set of address translations applied. See "translation_file" in
xtsc_arbiter_parms.
By default, this module does arbitration on a fair, round-robin basis and ignores the priority
field in the xtsc::xtsc_request and xtsc::xtsc_response objects (other than to forward them
on). If a different arbitration policy is desired, there are several options available:
• Create a modified arbiter starting with the xtsc_arbiter.h and xtsc_arbiter.cpp source
code.
If desired this arbiter can be used as a PIF width converter (PWC) by setting the "master_-
byte_widths" parameter to indicate the byte width of each upstream PIF master and by
setting the "slave_byte_width" parameter to indicate the byte width of the downstream PIF
slave.
Limitations of PIF Width Convertor:
• Critical word first BLOCK_READ transactions are not supported (i.e. for BLOCK_-
READ requests, the start address must be aligned to the total transfer size, not just
the bus width).
• PIF 4 interleaved responses are not supported and result in undefined behavior.
• When going from a wide master to a narrow slave if an incoming BLOCK_READ re-
quest requires multiple outgoing BLOCK_READ requests then the downstream sys-
tem must return all the BLOCK_READ responses in the order the requests were sent
out and without any intervening responses to other requests.
When not configured as a PWC, this module supports all memory interface data bus widths
and so does not need to be configured for any particular data bus width.
Warning: Special care must be taken by the system builder with respect to routing and
timing when multiple arbiters are used on a single communications path between an initiator
and a target. For routing considerations, see the documentation for the "route_id_lsb"
parameter in xtsc_arbiter_parms. For timing considerations, see the documentation for the
"arbitration_phase" parameter in xtsc_arbiter_parms.
Note: The "fail_port_mask" parameter can be used to test the ability of upstream memory
interface masters to handle RSP_NACC from this arbiter model rather then depending on
a chance conflict to cause RSP_NACC which may not happen until long into the simulation
or not at all.
Here is a block diagram of the system used in the xtsc_arbiter example:
(*arbiter.m_request_exports[0])
(*arbiter.m_respond_ports[0])
arbiter.m_respond_export
arbiter.m_request_port
nb_respond()
(*shr_mem.m_respond_port[0])
xtsc_core core0 nb_request()
(core0.out)
nb_request() xtsc_memory
xtsc_arbiter arbiter
shr_mem
nb_respond()
nb_respond()
(*arbiter.m_respond_ports[1])
core1.get_request_port("pif")
(*shr_mem.m_request_export[0])
(*arbiter.m_request_exports[1])
(core1.get_respond_export("pif"))
Here is the code to connect the system using the xtsc::xtsc_connect() method:
And here is the code to connect the system using manual SystemC port binding:
arbiter.m_request_port(*shr_mem.m_request_exports[0]);
(*shr_mem.m_respond_ports[0])(arbiter.m_respond_export);
core0.get_request_port("pif")(*arbiter.m_request_exports[0]);
(*arbiter.m_respond_ports[0])(core0.get_respond_export("pif"));
core1.get_request_port("pif")(*arbiter.m_request_exports[1]);
(*arbiter.m_respond_ports[1])(core1.get_respond_export("pif"));
See also:
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
xtsc_arbiter_parms
xtsc::xtsc_core::How_to_do_port_binding
See also:
xtsc_arbiter_parms
In most configurations, this method does the actual arbitration but may be overridden by a
sub-class (see Exceptions below).
Parameters:
port_num On entry this specifies the port which most recently received a granted. If
this method returns true, then it must set port_num to the port receiving the grant.
Returns:
true if a grant is given this round, otherwise returns false.
Note: If a sub-class overrides this method then the override must consider, but must not
adjust, m_lock. See this class’s implementation of arbitrate() for an example of how to do
arbitration.
Note: Exceptions: This method is not used if "external_cbox", "xfer_en_port", "arbitration_-
policy", or "immediate_timing" are set (not left at their default value).
Parameters:
port_num On entry this specifies the port which most recently received a granted. If
this method returns true, then it must set port_num to the port receiving the grant.
Returns:
true if a grant is given this round, otherwise returns false.
This method can be used to control the sending of randomly generated RSP_NACC re-
sponses (for example, to test the upstream memory interface master device’s handling of
them).
Parameters:
port_mask See "fail_port_mask" in xtsc_arbiter_parms.
fail_percentage See "fail_percentage" in xtsc_arbiter_parms.
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
arbitration_phase_factor Specifies the phase of the clock at which arbitration is per-
formed expressed in terms of the SystemC time resolution (from sc_get_time_-
resolution()). This value must be strictly less then clock_period_factor.
7.45.3.5 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
change_clock_period <ClockPeriodFactor>
Call xtsc_arbiter::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this device.
dump_profile_results
Dump max used buffers for request and response fifos.
reset
Call xtsc_arbiter::reset().
Implements xtsc_command_handler_interface.
Parameters:
os The ostream object to which the profile results should be dumped.
Connect an upstream xtsc_arbiter with this xtsc_arbiter. This method connects the single
master port pair of the specified upstream xtsc_arbiter with the specified slave port pair of
this xtsc_arbiter.
Parameters:
arbiter The upstream xtsc_arbiter to be connected with this xtsc_arbiter.
port_num This specifies the slave port pair of this xtsc_arbiter that the single master
port pair of the upstream xtsc_arbiter is to be connected with. port_num must be
in the range of 0 to this xtsc_arbiter’s "num_masters" parameter minus 1.
Connect with an upstream or downstream (inbound pif) xtsc_core. This method connects
this xtsc_arbiter with the memory interface specified by memory_port_name of the xtsc_-
core specified by core. If memory_port_name is "inbound_pif" or "snoop" then the master
port pair of this xtsc_arbiter is connected with the inbound pif or snoop slave port pair of
core. If memory_port_name is neither "inbound_pif" nor "snoop" then the memory interface
master port pair specified by memory_port_name of core is connected with the slave port
pair specified by port_num of this xtsc_arbiter.
Parameters:
core The xtsc_core to connect with.
memory_port_name The memory interface name to connect with. Case-insensitive.
port_num If memory_port_name is neither "inbound_pif" nor "snoop", then the mem-
ory interface of core specified by memory_port_name will be connected with the
slave port pair of this xtsc_arbiter specified by this parameter. In this case, this
parameter must be explicitly set and must be in the range of 0 to this xtsc_arbiter’s
"num_masters" parameter minus 1. This parameter is ignored if memory_port_-
name is "inbound_pif" or "snoop".
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of valid memory_port_-
name values.
Connect an upstream xtsc_dma_engine with this xtsc_arbiter. This method connects the
master port pair of the specified xtsc_dma_engine with the specified slave port pair of this
xtsc_arbiter.
Parameters:
dma_engine The xtsc_dma_engine to connect with this xtsc_arbiter.
port_num This specifies the slave port pair of this xtsc_arbiter that the specified xtsc_-
dma_engine will be connected with. port_num must be in the range of 0 to this
xtsc_arbiter’s "num_masters" parameter minus 1.
Connect an upstream xtsc_master with this xtsc_arbiter. This method connects the master
port pair of the specified xtsc_master with the specified slave port pair of this xtsc_arbiter.
Parameters:
master The xtsc_master to connect with this xtsc_arbiter.
port_num This specifies the slave port pair of this xtsc_arbiter that the specified xtsc_-
master will be connected with. port_num must be in the range of 0 to this xtsc_-
arbiter’s "num_masters" parameter minus 1.
Connect an upstream xtsc_memory_trace with this xtsc_arbiter. This method connects the
specified master port pair of the specified upstream xtsc_memory_trace with the specified
slave port pair of this xtsc_arbiter.
Parameters:
memory_trace The upstream xtsc_memory_trace to connect with.
trace_port The master port pair of the upstream xtsc_memory_trace to connect with
this xtsc_arbiter. trace_port must be in the range of 0 to the upstream xtsc_-
memory_trace’s "num_ports" parameter minus 1.
arbiter_port The slave port pair of this xtsc_arbiter to connect the xtsc_memory_trace
with. arbiter_port must be in the range of 0 to this xtsc_arbiter’s "num_masters"
parameter minus 1.
Parameters:
pin2tlm The upstream xtsc_pin2tlm_memory_transactor to connect with this xtsc_-
arbiter.
tran_port The xtsc_pin2tlm_memory_transactor master port pair to connect with this
xtsc_arbiter. tran_port must be in the range of 0 to the xtsc_pin2tlm_memory_-
transactor’s "num_ports" parameter minus 1.
arbiter_port The slave port pair of this xtsc_arbiter to connect with the xtsc_pin2tlm_-
memory_transactor. arbiter_port must be in the range of 0 to this xtsc_arbiter’s
"num_masters" parameter minus 1.
Connect an upstream xtsc_router with this xtsc_arbiter. This method connects the specified
master port pair of the specified upstream xtsc_router with the specified slave port pair of
this xtsc_arbiter.
Parameters:
router The upstream xtsc_router to connect with this xtsc_arbiter.
router_port The master port pair of the upstream xtsc_router to connect with this
xtsc_arbiter. router_port must be in the range of 0 to the upstream xtsc_router’s
"num_slaves" parameter minus 1.
arbiter_port The slave port pair of this xtsc_arbiter to connect the xtsc_router with.
arbiter_port must be in the range of 0 to this xtsc_arbiter’s "num_masters" param-
eter minus 1.
Returns:
true if this was final last transfer.
The documentation for this class was generated from the following file:
• xtsc_arbiter.h
xtsc_parms
xtsc_arbiter_parms
xtsc_parms
xtsc_arbiter_parms
Constructor parameters for a xtsc_arbiter object. This class contains the constructor pa-
rameters for a xtsc_arbiter object.
"master_byte_widths" vector<u32> The byte width of the data interface of each PIF
master. Typically, this and the "slave_byte_width"
parameters are left unset and xtsc_arbiter does not
concern itself with the byte width of the data interface
(it just forwards requests and responses and leaves it
to the upstream masters and downstream slave to have
matching data interface byte widths). If desired when
modeling a PIF interface, this parameter can be set to
indicate the byte widths of each PIF master (in this
case the "slave_byte_width" parameter must also be set
to indicate the byte width of the downstream PIF slave)
and the xtsc_arbiter will act as a PIF width convertor
(PWC) to ensure that each request sent out on the
request port has the byte width to match the downstream
slave and that each response sent out on a response port
has a byte width to match the upstream master. If this
parameter is set then "immediate_timing",
"arbitration_policy", "external_cbox", and
"xfer_en_port" must be left at their default values.
If this parameter is set then it must contain exactly
"num_masters" entries.
Valid entry values are 4|8|16.
Default (unset).
"slave_byte_width" u32 The PIF data interface byte width of the downstream
slave. Typically, this parameter should be left at
its default value of 0; however, if the
"master_byte_widths" parameter is set then this
parameter must be set to a non-zero value to indicate
the byte width of the downstream PIF slave.
Value non-default values are 4|8|16.
Default = 0.
"use_block_requests" bool This parameter is only used when acting as a PIF width
converter (i.e. when the "master_byte_widths" parameter
is set). By default, the downstream request type is the
same as the upstream request type. If this parameter is
set to true when acting as a PIF width converter, then
an upstream WRITE|READ request which has all byte lanes
enabled and which is larger then the downstream PIF
width will be converted into BLOCK_WRITE|BLOCK_READ
request(s).
Default = false.
"external_cbox", "immediate_timing",
"master_byte_widths", and "arbitration_policy" must
be left at their default values.
Default = 0xFFFFFFFF (no special xfer_en handling).
"immediate_timing" bool If true, the following timing parameters are ignored and
the arbiter module forwards all requests and responses
immediately (without any delay--not even a delta cycle).
In this case, there is no arbitration, because the
arbiter forwards all requests immediately. If false,
the following parameters are used to determine arbiter
timing. This parameter must be false when the arbiter
is being used as a PIF width converter.
If "immediate_timing" is true then "dram_lock",
"external_cbox", "xfer_en_port",
"master_byte_widths", and "arbitration_policy" must
be left at their default values.
Default = false.
"request_fifo_depth" u32 The depth of the request fifos (each memory interface
master has its own request fifo).
Default = 2.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"one_at_a_time" bool If true only one request will be accepted by the arbiter
at a time (i.e. one for all memory interface masters put
together). If false, each master can have one or more
requests pending at one time with the limit on the
number of pending requests from each master being
determined by the "request_fifo_depth" or
"request_fifo_depths" parameters. If this parameter is
true, then "request_delay" and "recovery_time" as it
applies to requests are ignored.
Default = true.
"response_repeat" u32 The number of clock periods after a response is sent and
rejected before the response will be resent. A value of
0 means one delta cycle.
Default = 1.
Note: The following 3 parameters can be used to test an upstream memory interface
master's ability to handle RSP_NACC responses early in a simulation run.
Also see setup_random_rsp_nacc_responses().
"profile_buffers" bool If true, the xtsc_arbiter class keeps the track of used
buffers for its internal request and response fifos. At
the end of the simulation, the maximum used buffer and
the first time that the max buffer has been reached are
printed in the output log file at NOTE level. This
information is printed for each request and response fifo
separately.
Default = false.
See also:
xtsc_arbiter
xtsc::xtsc_parms
xtsc::xtsc_script_file
Parameters:
num_masters The number of memory interface masters competing for the memory
interface slave. A value of 1 (the default) can be used to cause the arbiter to act
like a simple pass-through delay and/or address-translation device. The arbiter
will have this number of memory interface slave port pairs (one for each master
to connect with).
route_id_lsb The least significant bit position of this arbiters route_id bit field.
one_at_a_time If true, the default, only one request will be accepted by the arbiter
at a time (i.e. one for all memory interface masters put together). If false, each
master can have one or more requests pending at one time with the number of
pending requests for each master being determined by the "request_fifo_depth"
parameter.
• xtsc_arbiter.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_memory
xtsc_cache
xtsc_debug_if
xtsc_memory_b xtsc_request_if
m_p_memory
m_p_initial_value_file
m_p_exclusive_script_stream
m_p_script_stream
xtsc_script_file
xtsc_resettable
xtsc_module
xtsc_connection_interface
xtsc_command_handler_interface xtsc_request_if_impl
m_request_impl
m_p_active_request_info
request_info
m_memory_parms
m_request
xtsc_respond_if
xtsc_parms xtsc_memory_parms m_fast_access_object xtsc_cache_parms
m_cache_parms
xtsc_request m_stream_dumper xtsc_respond_if_impl
m_respond_impl
xtsc_fast_access_if m_lines
m_p_request line_info xtsc_cache m_cache
stream_dumper m_stream_dumper m_filtered_response
m_p_active_response m_p_block_read_response
xtsc_response m_p_single_response
m_p_block_write_response
m_request
Classes
• struct line_info
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Public Types
• enum replacement_policy_t {
REPL_RANDOM = 0,
REPL_RR = 1,
REPL_LRU = 2 }
• typedef enum xtsc_component::xtsc_cache::replacement_policy_t replacement_-
policy_t
• void end_of_simulation ()
SystemC calls this method at the end of simulation.
• void clear_profile_results ()
Clear cache profile results.
• void flush ()
Flush dirty lines to the lower-level memory, invalid the entire cache.
• xtsc::u32 flush_dirty_lines ()
Flush dirty lines to the lower-level memory, return the number of flushed lines.
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
Protected Types
• enum pif_attribute_bits {
BUFFERABLE = 0x10,
CACHEABLE = 0x20,
WRITE_BACK = 0x40,
READ_ALLOCATE = 0x80,
WRITE_ALLOCATE = 0x100 }
PIF attribute bits.
• void configure ()
Configure the cache.
• void initialize ()
Initialize the cache.
Protected Attributes
• xtsc_respond_if_impl m_respond_impl
m_respond_export binds to this
• xtsc::xtsc_request m_request
For sending system memory requests.
• sc_core::sc_event m_single_response_available_event
Notified when READ, WRITE, or RCW rsp is received.
• sc_core::sc_event m_block_read_response_available_event
Notified when a BLOCK_READ rsp is received.
• sc_core::sc_event m_block_write_response_available_event
Notified when a BLOCK_WRITE rsp is received.
• xtsc::u32 m_num_block_transfers
Number of BLOCK_READ/BLOCK_WRITE transfers.
• xtsc::u32 m_block_read_response_count
Number of BLOCK_READ responses received so far.
• xtsc_cache_parms m_cache_parms
Copy of xtsc_cache_parms.
• xtsc::u32 m_cache_byte_size
See "cache_byte_size".
• xtsc::u32 m_line_byte_width
See "line_byte_width".
• xtsc::u32 m_num_ways
See "num_ways".
• xtsc::u32 m_replacement_policy
See "replacement_policy".
• bool m_read_allocate
See "read_allocate".
• bool m_write_allocate
See "write_allocate".
• bool m_write_back
See "write_back".
• xtsc::u8 m_read_priority
See "read_priority".
• xtsc::u8 m_write_priority
See "write_priority".
• bool m_profile_cache
See "profile_cache".
• bool m_use_pif_attribute
See "use_pif_attribute".
• sc_core::sc_time m_bypass_delay
See "bypass_delay".
• xtsc::u32 ∗∗ m_lru
Least-recently used (LRU) counters.
• bool m_lru_selected
Indicates if LRU policy is selected.
• xtsc::u32 m_access_byte_width
A copy of "byte_width".
• xtsc::u32 m_num_lines
• xtsc::u32 m_num_sets
Total number of cache sets.
• xtsc::u32 m_line_access_ratio
The number of access words in a cache line.
• xtsc::u32 m_set_byte_size
Total number of bytes in a set.
• xtsc::u32 m_num_sets_log2
Log2 of m_num_sets.
• xtsc::u32 m_line_byte_width_log2
Log2 of m_line_byte_width.
• xtsc::u32 m_tag_shift
Shift value to calculate address tag.
• xtsc::u32 m_set_shift
Shift value to calculate set index.
• xtsc::u32 m_set_mask
Set’s index mask.
• xtsc::u8 ∗ m_line_buffer
Internal buffer for updating cache lines.
• xtsc::u32 m_line_buffer_index
Index of cache line buffer.
• bool m_cacheable
Indicate if the current request is cacheable.
• bool m_bufferable
Indicate if the current request is bufferable.
• xtsc::u64 m_read_count
Number of READ accesses.
• xtsc::u64 m_read_miss_count
• xtsc::u64 m_block_read_count
Number of BLOCK_READ accesses.
• xtsc::u64 m_block_read_miss_count
Number of BLOCK_READ misses.
• xtsc::u64 m_write_count
Number of WRITE accesses.
• xtsc::u64 m_write_miss_count
Number of WRITE misses.
• xtsc::u64 m_block_write_count
Number of BLOCK_WRITE accesses.
• xtsc::u64 m_block_write_miss_count
Number of BLOCK_WRITE misses.
This class implements an XTSC model of a typical cache module. The xtsc_cache class
can be used as an L2 cache, which sits between a core’s PIF port and the system memory.
See also:
xtsc_cache_parms
xtsc_memory
Parameters:
module_name The SystemC module name.
cache_parms The xtsc_cache and xtsc_memory construction parameters.
See also:
xtsc_cache_parms
xtsc_memory_parms
7.47.3.1 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
clear_profile_results
Call xtsc_cache::clear_profile_results().
dump_config
Call xtsc_cache::dump_config(). Dump cache configuration.
dump_profile_results
flush
Call xtsc_cache::flush(). Flush the entire cache.
flush_dirty_lines
Call xtsc_cache::flush_dirty_lines(). Flush dirty lines only.
reset [<Hard>]
Call xtsc_cache::reset(<Hard>). Where <Hard> is 0|1 (default 0).
set_profile_cache <Enable>
Call xtsc_cache::set_profile_cache(<Enable>). Where <Enable> is true|false.
Set the value of "m_profile_cache" parameter.
• xtsc_cache.h
xtsc_parms
xtsc_memory_parms
xtsc_cache_parms
xtsc_parms
xtsc_memory_parms
xtsc_cache_parms
Constructor parameters for an xtsc_cache object. This class has the same contructor
parameters as an xtsc_memory_parms object plus the following additional ones.
"line_byte_width" u32 The byte size of cache lines. Note: this parameter
must be an integer multiple of "byte_width".
Valid values for the ratio of "line_byte_width" to
"byte_width" are 1|2|4|8|16.
Default = 8.
Default = false.
"profile_cache" bool If true, the xtsc_cache class keeps the track of read/
write misses. At the end of the simulation, miss rates
on read, write, and all accesses are printed in the
output log file at INFO level.
Default = false.
"use_pif_attribute" bool If true, the xtsc_cache class uses the PIF attribute
of input requests to determine cache behavior. This
specifies bufferable, cacheable, allocate, and write
policy attributes. If false, the xtsc_cache class
ignores PIF attributes and works based on the
xtsc_cache's parameters.
Default = false (i.e. ignore the PIF attribute).
The following parameters of the xtsc_memory_parms class are initialized by the xtsc_-
cache class internally and changing their values will cause an exception.
Name Value
------------------ -----------
"num_ports" 1
"start_byte_address" 0x00000000
"memory_byte_size" 0
"use_raw_access" false
Note: The xtsc_cache class does not support raw access. By default, normal
nb_peek/nb_poke through all upstream devices is used for fast access.
For other fast access methods, set at most one of "use_callback_access",
"use_custom_access", and "use_interface_access" to true.
The following parameters of the xtsc_memory_parms class are not supported by the xtsc_-
cache module. Note that changing their default values may cause an exception.
Name
--------------------
"burst_read_delay"
"burst_read_repeat"
"burst_write_delay"
"burst_write_repeat"
"burst_write_response"
"initial_value_file"
"memory_fill_byte"
"read_only"
"script_file"
"wraparound"
"fail_status"
"fail_request_mask"
"fail_percentage"
"fail_seed"
See also:
xtsc_memory_parms
xtsc_cache
• xtsc_cache.h
xtsc_core
xtsc_udma
xtsc_arbiter
xtsc_lookup
xtsc_master
xtsc_master_tlm2
xtsc_cache
xtsc_memory
xtsc_dma_engine
xtsc_memory_tlm2
xtsc_memory_trace
xtsc_command_handler_interface xtsc_mmio
xtsc_queue
xtsc_queue_consumer
xtsc_queue_producer
xtsc_router
xtsc_tlm22xttlm_transactor
xtsc_tlm2pin_memory_transactor
xtsc_wire
xtsc_wire_logic
xtsc_xttlm2tlm2_transactor
• virtual void execute (const std::string &line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)=0
The method to be called when a command is to be executed.
• $XTENSA_SW_TOOLS/src/xtsc/xtsc_memory.cpp
• $XTENSA_SW_TOOLS/src/xtsc/xtsc/xtsc_memory.h
See also:
xtsc_dispatch_command
xtsc_register_command
xtsc_command_argtobool
xtsc_command_argtoi32
xtsc_command_argtou32
xtsc_command_argtou64
xtsc_command_argtod
xtsc_command_throw
xtsc_initialize_parms "lua_command_prompt"
xtsc_initialize_parms "xtsc_command_prompt"
sc_command_handler_commands
xtsc_command_handler_commands
xtsc::xtsc_core::execute()
xtsc_component::xtsc_arbiter::execute()
xtsc_component::xtsc_lookup::execute()
xtsc_component::xtsc_memory::execute()
xtsc_component::xtsc_memory_tlm2::execute()
xtsc_component::xtsc_mmio::execute()
xtsc_component::xtsc_queue::execute()
xtsc_component::xtsc_router::execute()
xtsc_component::xtsc_tlm22xttlm_transactor::execute()
xtsc_component::xtsc_wire_logic::execute()
xtsc_component::xtsc_xttlm2tlm2_transactor::execute()
7.49.2.1 virtual void execute (const std::string & line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [pure virtual]
Parameters:
line The command line as entered by the user (including the handler name).
words The tokenized words of the command line excluding the handler name. So
the command is in words[0]; the first argument, if any, is in words[1]; the second
argument, if any, is in words[2], and so on.
words_lc Same as words except all characters are shifted to lower-case to make
parsing easier.
result The ostream object to output the result to. This result must not be an error.
If an error is detected, the execute() method should throw a std::exception (e.g.
xtsc_exception) with a meaningful message.
If the user enters a "man" command, this optional method will be called just before the man
lines for the individual commands of this handler are output. This can be used, for example,
to display help information pertaining to the handler as a whole or to all commands rather
than to one particular command.
Parameters:
os The ostream object to output overall information to.
• xtsc.h
This is the generic connection interface used to support plugin modules and the --connect
command in xtsc-run as well as the xtsc_connect() method in the XTSC core library.
xtsc_core
xtsc_tx_loader
xtsc_udma
xtsc_arbiter
xtsc_lookup
xtsc_lookup_driver
xtsc_lookup_pin
xtsc_master
xtsc_master_tlm2
xtsc_cache
xtsc_memory
xtsc_dma_engine
xtsc_memory_pin
xtsc_memory_tlm2
xtsc_memory_trace
xtsc_mmio
xtsc_connection_interface xtsc_module
xtsc_pin2tlm_lookup_transactor
xtsc_pin2tlm_memory_transactor
xtsc_queue
xtsc_queue_consumer
xtsc_queue_pin
xtsc_queue_producer
xtsc_router
xtsc_slave
Xtensa SystemC (XTSC) Reference Manual 241
xtsc_tlm22xttlm_transactor
Chapter 7. Class Documentation
• virtual ∼xtsc_connection_interface ()
Destructor.
• xtsc::xtsc_port_type_map get_port_type_map ()
Get a copy of m_port_types, the xtsc_port_type_map which enumerates all module ports
and their associated xtsc_port_type.
Perform port-binding between the locally-known port specified by port_name and the for-
eign port pointed to by p_object.
Protected Attributes
• sc_core::sc_object & m_object
Must be an sc_module or sc_prim_channel subclass.
• xtsc::xtsc_port_type_map m_port_types
Derived classes must populate this table in their constructor See xtsc_connect().
Private Attributes
• std::set< std::string > m_port_table_resolution_set
This is the generic connection interface used to support plugin modules and the --connect
command in xtsc-run as well as the xtsc_connect() method in the XTSC core library. Note:
Derived classes must:
For working examples which illustrate implementing this interface please see the simple_-
memory.plugin and pif2sb_bridge.plugin sub-directories of the XTSC examples directory
installed with each Tensilica core config in:
• <xtsc_examples_root>/simple_memory.plugin
• <xtsc_examples_root>/pif2sb_bridge.plugin
See also:
xtsc_port_type
xtsc_connect
xtsc_plugin_interface
Parameters:
module A reference to the associated sc_module or sc_prim_channel subclass.
Get a copy of m_port_types, the xtsc_port_type_map which enumerates all module ports
and their associated xtsc_port_type. Note: Derived classes must populate m_port_types
in their constructor.
Note: Derived classes should NOT implement this method.
Definition at line 5336 of file xtsc.h.
Parameters:
port_name The port name of interest.
Return the xtsc_port_type of the specified port. An exception is thrown if m_port_types has
no such port.
Parameters:
port_name The port name of interest from m_port_types.
Get the bit-width of the specified port. The non-pin-level interfaces may return 0 to indicate
that bit-width is a don’t care (for example, an xtsc_router that does not consider the data
width of the xtsc_request/xtsc_respond objects).
Parameters:
port_name A port name from m_port_types whose xtsc_port_type is not PORT_-
TABLE.
interface_num Typically 0. Can be set to 1 if port_name names a port of xtsc_port_-
type LOOKUP_PORT or LOOKUP_EXPORT to obtain the bit width of the lookup
address (for these two port types, interface_num of 0 refers to the lookup data
interface bit width).
Parameters:
port_name A port name from m_port_types whose xtsc_port_type is not PORT_-
TABLE.
Return a string specifying the name of the default port. The name returned by this method
must either be the empty string ("") or it must be a named port from the m_port_types table.
Note: This is an optional method. Derived classes need implement this method only if they
wish to define a default port.
Reimplemented in xtsc_cache, xtsc_core, xtsc_arbiter, xtsc_dma_engine, xtsc_lookup,
xtsc_lookup_driver, xtsc_master, xtsc_master_tlm2, xtsc_memory, xtsc_memory_tlm2,
xtsc_mmio, xtsc_queue_consumer, xtsc_queue_producer, xtsc_router, xtsc_slave, xtsc_-
wire_source, xtsc_lookup_pin, xtsc_memory_pin, xtsc_pin2tlm_lookup_transactor, and
xtsc_udma.
Definition at line 5399 of file xtsc.h.
Return an ordered list (vector<string>) of port names comprising the named PORT_-
TABLE specified by port_table_name.
Parameters:
port_table_name A named port of xtsc_port_type PORT_TABLE from m_port_types.
Note: Derived classes must implement this method only if m_port_types contains a port of
xtsc_port_type PORT_TABLE.
Note: Port tables can be nested. That is, one or more of the port names in the xtsc_port_-
table returned by this method may themselves be of xtsc_port_type PORT_TABLE.
See also:
get_resolved_port_table()
Return a string, T, identifying the user-defined type. Two ports will be considered to be a
conjugate pair if their T, as returned by this method, is the same and one of the following
three two-part statements is true:
The string contents returned by this method are recommended to be the user-defined T
from the following table:
Parameters:
port_name A named port from m_port_types for which the xtsc_is_user_defined_-
port_type() returns true.
Note: Derived classes must implement this method only if their m_port_types contains a
port for which xtsc_is_user_defined_port_type() returns true.
See also:
xtsc_is_user_defined_port_type()
Perform port-binding between the locally-known port specified by port_name and the for-
eign port pointed to by p_object. This method is responsible for confirming that p_object
is of the correct type. If the locally-known port is an sc_out<T> then this method is also
responsible for creating the sc_signal<T> object necessary to connect an sc_out<T> to
an sc_in<T>.
Parameters:
port_name A named port from m_port_types for which the xtsc_is_user_defined_-
port_type() returns true.
p_object A pointer to an sc_object whose type is the conjugate of port_name.
signal_name The name to give to the signal that this method must create if the locally-
known port is an sc_out<T>.
Note: Derived classes must implement this method only if m_port_types contains a
port of type USER_DEFINED_PORT, USER_DEFINED_OUTPUT, or USER_DEFINED_-
INITIATOR.
See also:
xtsc_is_user_defined_port_type()
This is a convenience method that returns an ordered list (vector<string>) of port names
comprising the port or port table specified by port_name and with all port table entries
resolved to their constituent ports. If port_name is not of xtsc_port_type PORT_TABLE,
then the list will contain a single entry equal to port_name. If port_name is of xtsc_port_-
type PORT_TABLE, then the list will be the same as that returned by the get_port_table()
method except that any names in that table which are of xtsc_port_type PORT_TABLE will
also be replaced by their constituent ports and so on recursively.
Note: Derived classes should NOT implement this method.
Parameters:
port_name A named port from m_port_types.
This convenience method dumps a list of the elementary ports (Part 1), port table names
(Part 2), and port table definitions (Part 3) that this connection interface has. Note: Derived
classes should NOT implement this method.
Example usage:
Parameters:
os The ostream object to dump the port list to.
ns The number of spaces to allow for the first column of output.
verbose If true, include bit width of interface in Parts 1 and 3.
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_core
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_core
Public Types
• enum memory_port {
MEM_DRAM0P0 = 0,
MEM_DRAM0P1,
MEM_DRAM0P2,
MEM_DRAM0P3,
MEM_DRAM0LS0RD,
MEM_DRAM0LS1RD,
MEM_DRAM0LS2RD,
MEM_DRAM0DMARD,
MEM_DRAM0LS0WR,
MEM_DRAM0LS1WR,
MEM_DRAM0LS2WR,
MEM_DRAM0DMAWR,
MEM_DRAM0B0S00,
MEM_DRAM0B0S01,
MEM_DRAM0B0S02,
MEM_DRAM0B0S03,
MEM_DRAM0B0S04,
MEM_DRAM0B0S05,
MEM_DRAM0B0S06,
MEM_DRAM0B0S07,
MEM_DRAM0B0S08,
MEM_DRAM0B0S09,
MEM_DRAM0B0S10,
MEM_DRAM0B0S11,
MEM_DRAM0B0S12,
MEM_DRAM0B0S13,
MEM_DRAM0B0S14,
MEM_DRAM0B0S15,
MEM_DRAM0B1S00,
MEM_DRAM0B1S01,
MEM_DRAM0B1S02,
MEM_DRAM0B1S03,
MEM_DRAM0B1S04,
MEM_DRAM0B1S05,
MEM_DRAM0B1S06,
MEM_DRAM0B1S07,
MEM_DRAM0B1S08,
MEM_DRAM0B1S09,
MEM_DRAM0B1S10,
MEM_DRAM0B1S11,
MEM_DRAM0B1S12,
MEM_DRAM0B1S13,
MEM_DRAM0B1S14,
MEM_DRAM0B1S15,
MEM_DRAM0B2S00,
MEM_DRAM0B2S01,
MEM_DRAM0B2S02,
MEM_DRAM0B2S03,
MEM_DRAM0B2S04,
MEM_DRAM0B2S05,
MEM_DRAM0B2S06,
MEM_DRAM0B2S07,
MEM_DRAM0B2S08,
MEM_DRAM0B2S09,
MEM_DRAM0B2S10,
MEM_DRAM0B2S11,
MEM_DRAM0B2S12,
MEM_DRAM0B2S13,
MEM_DRAM0B2S14,
MEM_DRAM0B2S15,
MEM_DRAM0B3S00,
MEM_DRAM0B3S01,
MEM_DRAM0B3S02,
MEM_DRAM0B3S03,
MEM_DRAM0B3S04,
MEM_DRAM0B3S05,
MEM_DRAM0B3S06,
MEM_DRAM0B3S07,
MEM_DRAM0B3S08,
MEM_DRAM0B3S09,
MEM_DRAM0B3S10,
MEM_DRAM0B3S11,
MEM_DRAM0B3S12,
MEM_DRAM0B3S13,
MEM_DRAM0B3S14,
MEM_DRAM0B3S15,
MEM_DRAM1P0,
MEM_DRAM1P1,
MEM_DRAM1P2,
MEM_DRAM1P3,
MEM_DRAM1LS0RD,
MEM_DRAM1LS1RD,
MEM_DRAM1LS2RD,
MEM_DRAM1DMARD,
MEM_DRAM1LS0WR,
MEM_DRAM1LS1WR,
MEM_DRAM1LS2WR,
MEM_DRAM1DMAWR,
MEM_DRAM1B0S00,
MEM_DRAM1B0S01,
MEM_DRAM1B0S02,
MEM_DRAM1B0S03,
MEM_DRAM1B0S04,
MEM_DRAM1B0S05,
MEM_DRAM1B0S06,
MEM_DRAM1B0S07,
MEM_DRAM1B0S08,
MEM_DRAM1B0S09,
MEM_DRAM1B0S10,
MEM_DRAM1B0S11,
MEM_DRAM1B0S12,
MEM_DRAM1B0S13,
MEM_DRAM1B0S14,
MEM_DRAM1B0S15,
MEM_DRAM1B1S00,
MEM_DRAM1B1S01,
MEM_DRAM1B1S02,
MEM_DRAM1B1S03,
MEM_DRAM1B1S04,
MEM_DRAM1B1S05,
MEM_DRAM1B1S06,
MEM_DRAM1B1S07,
MEM_DRAM1B1S08,
MEM_DRAM1B1S09,
MEM_DRAM1B1S10,
MEM_DRAM1B1S11,
MEM_DRAM1B1S12,
MEM_DRAM1B1S13,
MEM_DRAM1B1S14,
MEM_DRAM1B1S15,
MEM_DRAM1B2S00,
MEM_DRAM1B2S01,
MEM_DRAM1B2S02,
MEM_DRAM1B2S03,
MEM_DRAM1B2S04,
MEM_DRAM1B2S05,
MEM_DRAM1B2S06,
MEM_DRAM1B2S07,
MEM_DRAM1B2S08,
MEM_DRAM1B2S09,
MEM_DRAM1B2S10,
MEM_DRAM1B2S11,
MEM_DRAM1B2S12,
MEM_DRAM1B2S13,
MEM_DRAM1B2S14,
MEM_DRAM1B2S15,
MEM_DRAM1B3S00,
MEM_DRAM1B3S01,
MEM_DRAM1B3S02,
MEM_DRAM1B3S03,
MEM_DRAM1B3S04,
MEM_DRAM1B3S05,
MEM_DRAM1B3S06,
MEM_DRAM1B3S07,
MEM_DRAM1B3S08,
MEM_DRAM1B3S09,
MEM_DRAM1B3S10,
MEM_DRAM1B3S11,
MEM_DRAM1B3S12,
MEM_DRAM1B3S13,
MEM_DRAM1B3S14,
MEM_DRAM1B3S15,
MEM_DROM0P0,
MEM_DROM0P1,
MEM_DROM0P2,
MEM_DROM0P3,
MEM_IRAM0,
MEM_IRAM1,
MEM_IROM0,
MEM_URAM0,
MEM_XLMI0P0,
MEM_XLMI0P1,
MEM_PIF,
MEM_IDMA0,
MEM_COUNT,
MEM_FIRST = 0,
MEM_LAST = MEM_COUNT - 1,
MEM_DRAM0_LAST_SB = MEM_DRAM0B3S15,
MEM_DRAM1_LAST_SB = MEM_DRAM1B3S15,
MEM_UNDEFINED = 0xFFFFFFFF,
MEM_DRAM0LS0 = MEM_DRAM0P0,
MEM_DRAM0LS1 = MEM_DRAM0P1,
MEM_DRAM1LS0 = MEM_DRAM1P0,
MEM_DRAM1LS1 = MEM_DRAM1P1,
MEM_DROM0LS0 = MEM_DROM0P0,
MEM_DROM0LS1 = MEM_DROM0P1,
MEM_XLMI0LS0 = MEM_XLMI0P0,
MEM_XLMI0LS1 = MEM_XLMI0P1 }
Type used to identify a memory port on the Xtensa core.
• enum xtsc_sb_state {
XTSC_SB_PENDING = 0,
XTSC_SB_DISPATCHING = 2,
XTSC_SB_DISPATCHED = 1 }
Store buffer entry state (for internal/future use).
• typedef int(∗ simcall_callback )(xtsc_core &core, void ∗callback_arg, int arg1, int arg2,
int arg3, int arg4, int arg5, int arg6)
Simcall callback function type.
Method to get a reference to the sc_in<sc_bv_base> object for the named TIE or system
input pin.
• SC_HAS_PROCESS (xtsc_core)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
For xtsc_connection_interface.
Method to get the sc_port for binding the memory request channel from this xtsc_core
memory interface master to a memory interface slave.
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void connect (xtsc_core &core, const char ∗output_name, const char ∗input_name)
Connect an output of another xtsc_core to an input of this xtsc_core.
• u32 setup_debug (int argc, const char ∗const ∗argv, u32 processor_-
num=0xFFFFFFFF, bool wait=true, bool synchronized=false, bool dummy=true,
u32 starting_port=0)
Setup debugging or profiling on this core based upon command line arguments.
• void breakpoint_interrupt ()
Cause the ISS for this core to break and pass control to its attached debugger.
Assuming register tracing is setup, this method sets whether or not it is enabled.
• bool get_trigin_idma ()
Return whether or not this core’s TrigIn_iDMA signal is asserted.
• bool get_stall ()
Return whether or not this core is in RunStall.
• bool is_clock_enabled ()
Returns true if this core’s gated clock is enabled; otherwise returns false.
• void revoke_fast_access ()
Revoke all current fast access grants (TurboXim may subsequently re-request them).
Get the set of pin-level TIE import wires defined for this core.
Get the width (number of bytes) of the instruction pointed to by argument pc.
This method retrieves the information about a store operation in the pipeline specified by
input parameters ls_unit and stage.
• u32 get_turbo_max_relaxed_cycles ()
Get the max relaxed cycles for TurboXim.
• static u32 setup_multicore_debug (int argc, const char ∗const ∗argv, u32 processor_-
num=0, bool wait=true, bool synchronized=false, bool dummy=true, u32 starting_-
port=0, std::vector< xtsc_core ∗ > cores=get_all_cores())
Setup debugging or profiling on all cores in a list based upon command line arguments.
Public Attributes
• Readme How_to_do_port_binding
Instructions for doing port binding in XTSC.
• Readme How_to_do_memory_port_binding
Instructions for doing memory port binding.
• Readme How_to_do_tx_xfer_port_binding
Instructions for doing XFER port binding (the BootLoader interface).
• Readme How_to_do_tie_lookup_binding
Instructions for doing TIE lookup port binding.
• Readme How_to_do_tie_queue_binding
Instructions for doing TIE queue port binding.
• Readme How_to_do_tie_import_wire_binding
Instructions for doing TIE import wire port binding.
• Readme How_to_do_tie_export_state_binding
Instructions for doing TIE export state port binding.
• Readme How_to_do_output_pin_binding
Instructions for doing output pin binding (Pin-level).
• Readme How_to_do_input_pin_binding
Instructions for doing input pin binding (Pin-level).
• Readme How_to_do_system_input_wire_binding
Instructions for doing system input wire port binding (TLM).
• Readme How_to_do_system_output_wire_binding
Instructions for doing system output wire port binding.
• Readme Information_on_memory_interface_protocols
Information on memory interface protocols.
• void snoop_response_thread ()
Thread to send out snoop response [Reserved for future use].
• void exit_thread ()
Thread to detect when core program exits.
• void before_end_of_elaboration ()
Miscellaneous housekeeping before elaboration ends.
• void end_of_elaboration ()
Miscellaneous housekeeping after elaboration ends.
• void start_of_simulation ()
Miscellaneous housekeeping before simulation starts.
Private Attributes
• log4xtensa::TextLogger & m_text
For logging text messages.
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
Friends
• class xtsc_core_intf
• class xtsc_core_parts
• class xtsc_tie_lookup_driver
• class xtsc_output_queue_driver
• class xtsc_input_queue_driver
A Tensilica core Instruction Set Simulator (ISS). This class encapsulates an Xtensa core
Instruction Set Simulator (ISS) as a SystemC module. It can be operated in cycle-accurate
mode (the default) or in instruction- accurate (TurboXim) mode, or a combination of both. It
includes methods for such things as loading the core’s program, loading simulation clients,
probing the core’s state, querying the core’s construction parameters, and setting up the
core for debugger control.
It also includes methods to allow TLM-level (Transaction Level Model/Modeling) port bind-
ing to take place to all the local memory ports, the PIF/iDMA, all user- defined TIE inter-
faces (lookups, input queues, output queues, import wires, and export states) and certain
system-level inputs and outputs. Due to the configurable nature of the Xtensa core inter-
face, the port binding is done somewhat differently than for a typical SystemC module. See
the documentation comments associated with the "How_to_do_..." dummy Readme vari-
ables for information on port binding with each of the various Xtensa interfaces (memory
ports, system-level I/O, and TIE interfaces).
For information pertaining to memory interface request/response protocols, see the doc-
umentation comments associated with the Information_on_memory_interface_protocols
dummy Readme variable.
Here is a block diagram of the TLM ports of an xtsc_core:
(core.get_request_export("inbound_pif"))
xtsc_request_if
xtsc_master master
core.get_respond_port("inbound_pif")
xtsc_respond_if
core.get_request_port("pif")
xtsc_request_if
xtsc_memory mem_pif
(core.get_respond_export("pif"))
xtsc_respond_if
core.get_output_queue("OUTQ1")
xtsc_queue_push_if
xtsc_queue queue
core.get_input_queue("INQ1")
xtsc_queue_pop_if
xtsc_core core0
core.get_lookup("lut")
xtsc_lookup_if
xtsc_lookup lut
core.get_export_state("status")
xtsc_wire_write_if
xtsc_wire wire
core.get_import_wire("control")
xtsc_wire_read_if
core.get_output_wire("PWaitMode")
xtsc_wire_write_if
xtsc_wire wire
(core.get_input_wire("BReset"))
xtsc_wire_write_if
xtsc_wire_source BReset
See also:
How_to_do_port_binding
Information_on_memory_interface_protocols
Simcall callback function type. A function of this type can be registered with the core to
receive simcall callbacks generated by the target program executing on the core.
Parameters:
core A reference to the xtsc_core whose target program executed the simcall.
callback_arg The value passed in to set_simcall_callback.
arg1 The 1st argument of the target simcall.
arg2 The 2nd argument of the target simcall.
arg3 The 3rd argument of the target simcall.
arg4 The 4th argument of the target simcall.
arg5 The 5th argument of the target simcall.
arg6 The 6th argument of the target simcall.
See also:
set_simcall_callback
Simulation mode switch callback function type. A function of this type can be registered
with the core to be called whenever the target program executing on the core requests a
simulation mode switch between cycle-accurate and TurboXim fast functional.
Parameters:
sim_mode The simulation mode to switch to.
callback_arg The value passed in to set_sim_mode_switch_callback.
Returns:
true if sim_mode is the current mode, else returns false.
See also:
set_sim_mode_switch_callback
Type used to identify a memory port on the Xtensa core. Note: By contract:
Enumerator:
MEM_DRAM0P0 Data RAM 0 Bank 0 or L/S 0.
MEM_DRAM0P1 Data RAM 0 Bank 1 or L/S 1.
MEM_DRAM0P2 Data RAM 0 Bank 2.
MEM_DRAM0P3 Data RAM 0 Bank 3.
MEM_DRAM0LS0RD Data RAM 0 L/S 0 Read port.
MEM_DRAM0LS1RD Data RAM 0 L/S 1 Read port.
MEM_DRAM0LS2RD Data RAM 0 L/S 2 Read port.
MEM_DRAM0DMARD Data RAM 0 DMA Read port.
MEM_DRAM0LS0WR Data RAM 0 L/S 0 Write port.
MEM_DRAM0LS1WR Data RAM 0 L/S 1 Write port.
MEM_DRAM0LS2WR Data RAM 0 L/S 2 Write port.
MEM_DRAM0DMAWR Data RAM 0 DMA Write port.
MEM_DRAM0B0S00 Data RAM 0 Bank 0 SubBank 0.
MEM_DRAM0B0S01 Data RAM 0 Bank 0 SubBank 1.
MEM_DRAM0B0S02 Data RAM 0 Bank 0 SubBank 2.
MEM_DRAM0B0S03 Data RAM 0 Bank 0 SubBank 3.
MEM_DRAM0B0S04 Data RAM 0 Bank 0 SubBank 4.
MEM_DRAM0B0S05 Data RAM 0 Bank 0 SubBank 5.
MEM_DRAM0B0S06 Data RAM 0 Bank 0 SubBank 6.
MEM_DRAM0B0S07 Data RAM 0 Bank 0 SubBank 7.
MEM_DRAM0B0S08 Data RAM 0 Bank 0 SubBank 8.
MEM_DRAM0B0S09 Data RAM 0 Bank 0 SubBank 9.
Enumerator:
XTSC_SB_PENDING Store buffer entry pending.
XTSC_SB_DISPATCHING Store buffer entry dispatching.
XTSC_SB_DISPATCHED Store buffer entry dispatched.
Parameters:
module_name Name of the xtsc_core sc_module.
core_parms The configuration parameters.
See also:
xtsc_core_parms
Method to get the sc_port for binding the memory request channel from this xtsc_core
memory interface master to a memory interface slave.
Parameters:
memory_port_name The memory port name (case-insensitive).
See also:
How_to_do_memory_port_binding for more information and for a list of valid memory
port names.
Method to get the sc_export for binding the memory response channel from a memory
interface slave to this xtsc_core memory interface master.
Parameters:
memory_port_name The memory port name (case-insensitive).
See also:
How_to_do_memory_port_binding for more information and for a list of valid memory
port names.
Method to get the inbound PIF or snoop sc_export of this xtsc_core memory interface slave
for binding the memory request channel of an external memory interface master to.
Parameters:
memory_port_name One of "inbound_pif" or "snoop".
See also:
How_to_do_memory_port_binding
Method to get the inbound PIF or snoop sc_port of this xtsc_core memory interface slave
for binding to the memory response channel of an external memory interface master.
Parameters:
memory_port_name One of "inbound_pif" or "snoop".
See also:
How_to_do_memory_port_binding
Method to get the sc_port for binding the output xtsc_tx_xfer_if of this xtsc_core to the
downstream xtsc_core in the TX chain or to the boot loader if this is the last/only TX in the
chain.
Exceptions:
See also:
How_to_do_tx_xfer_port_binding
Method to get the sc_export for binding the output xtsc_tx_xfer_if of the upstream xtsc_-
core in the TX chain or the boot loader if this is the first/only TX in the chain to the input
xtsc_tx_xfer_if of this xtsc_core.
Exceptions:
See also:
How_to_do_tx_xfer_port_binding
Method to get a reference to the sc_port for the named TIE lookup.
Parameters:
lookup_name The lookup name should be the name provided after the "lookup" key-
word of the user TIE file. Specifically, lookup_name should not include the "TIE_"
prefix or any of the suffixes ("_Out", "_In", "_Out_Req", or "_Rdy").
See also:
How_to_do_tie_lookup_binding
Method to get a reference to the sc_port for the named output queue.
Parameters:
queue_name The queue_name should be the base queue name as provided after
the "queue" keyword of the user TIE file. Specifically, queue_name should not
include the "TIE_" prefix or any of the suffixes ("_Empty", "_PopReq", "_Full", or
"_PushReq").
See also:
How_to_do_tie_queue_binding
Method to get a reference to the sc_port for the named input queue.
Parameters:
queue_name The queue_name should be the base queue name as provided after
the "queue" keyword of the user TIE file. Specifically, queue_name should not
include the "TIE_" prefix or any of the suffixes ("_Empty", "_PopReq", "_Full", or
"_PushReq").
See also:
How_to_do_tie_queue_binding
Method to get a reference to the sc_port for the named TIE import wire.
Parameters:
wire_name The base import wire name as provided after the "import_wire" keyword
of the user TIE file. Specifically, wire_name should not include the "TIE_" prefix.
See also:
How_to_do_tie_import_wire_binding
Method to get a reference to the sc_port for the named TIE export state.
Parameters:
state_name The base state name as provided after the "state" keyword of the user
TIE file. Specifically, state_name should not include the "TIE_" prefix.
See also:
How_to_do_tie_export_state_binding
Method to get a reference to the sc_out<sc_bv_base> object for the named TIE or system
output pin.
Parameters:
output_pin_name For TIE output pins, this is the Verilog name as generated by the
TIE compiler. This name always begins with the "TIE_" prefix and, for TIE lookups
and queues, has the suffixes specified in the TIE Reference Manual. For sys-
tem output pins, this is the name as specified in the Xtensa microprocessor data
book. The TIE construct name (the name without the "TIE_" prefix and without
the signal-specific suffix) or the system output name must have been specified in
the xtsc_core_parms "SimPinLevelInterfaces" parameters.
See also:
How_to_do_output_pin_binding;
Method to get a reference to the sc_in<sc_bv_base> object for the named TIE or system
input pin.
Parameters:
input_pin_name For TIE input pins, this is the Verilog name as generated by the TIE
compiler. This name always begins with the "TIE_" prefix and, for TIE lookups and
queues, has the suffixes specified in the TIE Reference Manual. For system input
pins, this is the name as specified in the Xtensa microprocessor data book. The
TIE construct name (the name without the "TIE_" prefix and without the signal-
specific suffix) or the system input name must have been specified in the xtsc_-
core_parms "SimPinLevelInterfaces" parameters.
See also:
How_to_do_input_pin_binding;
Method to get a reference to the sc_export for the named system input wire.
Parameters:
wire_name The system input name as it appears in the Xtensa microprocessor data
book. The possible input wire names are:
"AltResetVec"
"BInterrupt"
"BReset"
"PRID"
"RunStall"
"StatVectorSel"
"TrigIn_iDMA"
"XferReset"
Note: The initial value of the PRID register can be set using the "ProcessorID" parameter
of xtsc_core_parms.
Note: In addition to the composite "BInterrupt" wire, the interrupt wires are available indi-
vidually as "BInterrupt00", "BInterrupt01", and so on (the last 2 digits of the name are the
decimal value of the BInterrupt index).
See also:
How_to_do_system_input_wire_binding
Method to get a reference to the sc_port for the named system output wire.
Parameters:
wire_name The system output wire name as it appears in the Xtensa microprocessor
data book. The possible system output wire names are:
"CoreStatus" (TX only)
"CoreHalted" (TX only)
"DmaHighPriority"
"PArithmeticException"
"PWaitMode"
"TrigOut_iDMA"
Note: The DmaHighPriority output exists but is never driven as a TLM output. Instead, for
TLM modelling use xtsc::xtsc_request::get_priority(). The output is driven, however, when
modelled at pin-level (see "SimPinLevelInterfaces" in xtsc_core_parms).
See also:
How_to_do_system_output_wire_binding
Parameters:
clock_period_factor Specifies the new length of this core’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()). The
clock_period_factor must be an integer multiple of the XTSC system clock factor
so that the resulting clock period will be an integer multiple of the XTSC system
clock period.
Note: Changing the clock period of a module should generally only be attempted when
that module is quiescent (for example, when a core is in waiti). Changing the clock period
while a core has a TIE lookup pending or is receiving a sequence of either BLOCK_-
READ responses on its PIF/iDMA interface or BLOCK_WRITE requests on its inbound PIF
interface can potentially cause simulation failures.
Note: Changing the clock period is not supported for SystemC-Verilog cosimulation.
Note: Because of these issues, changing the clock period is a feature which must be ex-
plicitly enabled by setting the "enable_dynamic_clock_period" parameter of xtsc_initialize_-
parms to true.
See also:
xtsc_get_system_clock_factor
xtsc_get_system_clock_period
the xtsc_initialize_parms parameter "enable_dynamic_clock_period"
Method to get the clock period factor (typically 1000). If change_clock_period() has been
called, then this method returns the value of the argument of the most recent previous call
to change_clock_period(). Otherwise, it returns a value equal to the value set by xtsc_-
core_parms "SimClockFactor" multiplied by the value returned by the xtsc_get_system_-
clock_factor() function.
See also:
change_clock_period
get_clock_factor
xtsc_get_system_clock_factor
Method to get the clock factor (typically 1). If change_clock_period() has been called,
then this method returns a value equal to the argument of the most recent previous call
to change_clock_period() divided by the value returned by the xtsc_get_system_clock_-
factor() function. Otherwise, it returns the value set by xtsc_core_parms "SimClockFactor".
See also:
change_clock_period
get_clock_period_factor
xtsc_get_system_clock_factor
This function returns the memory_port number corresponding to the requested memory
port name.
Parameters:
memory_port_name The name of the memory port.
See also:
How_to_do_memory_port_binding for a list of valid names.
This function returns a c-string name corresponding to the requested memory port type.
Parameters:
port_num The port number whose name is desired.
ignore_multi_port If false the LD/ST unit or bank (and subbank), if any, are included
as part of the returned name (e.g. "dram0p0" or "dram0ls0rd" or "dram0b0s00").
If true, the LD/ST unit or bank (and subbank) do not appear in the returned name
(e.g. "dram0" or "dram0rw" or "dram0bs", respectively).
Parameters:
port_num The memory_port number of interest
Returns:
true if (port_num is between MEM_DRAM0B0S00 and MEM_DRAM0B3S15 inclusive)
otherwise returns false.
Parameters:
port_num The memory_port number of interest
Returns:
true if (port_num is between MEM_DRAM1B0S00 and MEM_DRAM1B3S15 inclusive)
otherwise returns false.
Parameters:
port_num The memory_port number of interest
Returns:
true if (port_num is between MEM_DRAM0B0S00 and MEM_DRAM0B3S15 inclusive)
OR if (port_num is between MEM_DRAM1B0S00 and MEM_DRAM1B3S15 inclusive)
otherwise returns false.
Returns:
true if (ls_unit is 0 AND port_num is MEM_DRAM0LS0 | MEM_DRAM1LS0 | MEM_-
DROM0LS0 | MEM_XLMI0LS0) OR if (ls_unit is 1 AND port_num is MEM_DRAM0LS1
| MEM_DRAM1LS1 | MEM_DROM0LS1 | MEM_XLMI0LS1) otherwise returns false.
Note: This method is deprecated in favor of is_multi_port_zero(). In some cases the non-
static get_multi_port_count() method may also be needed.
Method to get the sc_port for binding the memory request channel from this xtsc_core
memory interface master to a memory interface slave.
Parameters:
mem_port The desired memory port.
See also:
How_to_do_memory_port_binding for more information.
Method to get the sc_export for binding the memory response channel from a memory
interface slave to this xtsc_core memory interface master.
Parameters:
mem_port The desired memory port.
See also:
How_to_do_memory_port_binding for more information.
7.51.5.27 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
change_clock_period <ClockPeriodFactor>
Call xtsc_core::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this core.
disassemble [<PC>]
Return buffer from calling xtsc_core::disassemble(buffer, <PC>) for this core.
If <PC> is omitted, then current PC address is used.
dump_counters
Call xtsc_core::get_summary_count() for each counter of this core.
dump_filtered_request [<MemoryPortName>]
Return the buffer from calling xtsc_core::dump_filtered_request(<MemoryPortName>).
dump_filtered_response [<MemoryPortName>]
Return the buffer from calling xtsc_core::dump_filtered_response(<MemoryPortName>).
dump_memory_interfaces
Return buffer from calling xtsc_core::dump_memory_interfaces() for this core.
dump_parameters
Return buffer from calling xtsc_parms::dump() for the xtsc_core_parms used to
construct this core.
dump_registers
Return buffer from calling xtsc_core::dump_all_registers() for this core.
dump_core_interfaces_by_type
Return buffer from calling xtsc_core::dump_core_interfaces_by_type() for this
core (includes memories).
dump_tie_interfaces
Return buffer from calling xtsc_core::dump_tie_interfaces() for this core.
dump_tie_interfaces_by_type
Return buffer from calling xtsc_core::dump_tie_interfaces_by_type() for this
core.
enable_clock 0|1
Call xtsc_core::enable_clock(0|1). Return previous setting for this core.
get_alt_reset_vec
Return xtsc_core::get_alt_reset_vec() for this core.
get_clock_factor
Return xtsc_core::get_clock_factor() for this core.
get_clock_period_factor
Return xtsc_core::get_clock_period_factor() for this core.
get_commit_stage
Return xtsc_core::get_commit_stage() for this core.
get_cycle_count
Return xtsc_core::get_cycle_count() for this core.
get_debug_poll_interval
Return xtsc_core::get_debug_poll_interval() for this core.
get_debugger_port
Return xtsc_core::get_debugger_port() for this core.
get_exit_code
Return xtsc_core::get_exit_code() for this core.
get_instr_width [<PC>]
Return xtsc_core::get_instr_width(<PC>) for this core. If <PC> is omitted,
then current PC address is used.
get_last_stage
Return xtsc_core::get_last_stage() for this core.
get_parameter_exists <ParameterName>
Return xtsc_parms::exists(<ParameterName>) for the xtsc_core_parms used to
construct this core.
get_parameter_value <ParameterName>
Return xtsc_parms::dump_value(<ParameterName>) for the xtsc_core_parms used to
construct this core.
get_pc [<Stage>]
Return xtsc_core::get_pc(<Stage>) for this core. If <Stage> is omitted, then
search backward from W stage for a meaningful PC.
get_register_bit_width <RegisterName>
Return xtsc_core::get_register_bit_width(<RegisterName>) for this core.
get_register_value <RegisterName>
Return xtsc_core::get_register_value(<RegisterName>) for this core.
get_reset_vector
Return xtsc_core::get_reset_vector() for this core.
get_simcall_arg <Arg>
Return xtsc_core::get_simcall_arg(<Arg>) for this core.
get_stall
Return xtsc_core::get_stall() for this core.
get_static_vector_select
Return xtsc_core::get_static_vector_select() for this core.
get_summary_count <CounterName>
Return xtsc_core::get_summary_count(<CounterName>) for this core.
get_trigin_idma
Return xtsc_core::get_trigin_idma() for this core.
get_turbo_max_relaxed_cycles
Return xtsc_core::get_turbo_max_relaxed_cycles() for this core.
has_exited
Return xtsc_core::has_exited() for this core.
has_register <RegisterName>
Return xtsc_core::has_register(<RegisterName>) for this core.
is_clock_enabled
Return xtsc_core::is_clock_enabled() for this core.
is_debugging_enabled
Return xtsc_core::is_debugging_enabled() for this core.
is_fast_functional_mode
Return xtsc_core::is_fast_functional_mode() for this core.
load_client <ClientPackage>
Call xtsc_core::load_client(<ClientPackage>) for this core. <ClientPackage>
is everything after 'load_client '.
load_file <FileName>
Call xtsc_core::load_file(<FileName>) for this core.
log_disassembly 0|1
Call xtsc_core::log_disassembly(0|1) for this core.
reset
Call xtsc_core::reset() for this core.
revoke_fast_access
Call xtsc_core::revoke_fast_access() for this core.
send_client_command <Command>
Call xtsc_core::send_client_command(<Command>) for this core. <Command> is
everything after 'send_client_command '.
set_debug_poll_interval <PollInterval>
Call xtsc_core::set_debug_poll_interval(<PollInterval>) for this core.
set_alt_reset_vec <Address>
Call xtsc_core::set_alt_reset_vec(<Address>) for this core.
set_pc <PC>
Call xtsc_core::set_pc(<PC>) for this core.
set_simcall_return_value <Value>
Call xtsc_core::set_simcall_return_value(<Value>) for this core.
set_stall <Stall>
Call xtsc_core::set_stall(<Stall>) for this core. Return the previous value.
<Stall> may be 0|1.
set_static_vector_select <Value>
Call xtsc_core::set_static_vector_select(<Value>) for this core. <Value> may
be 0|1.
set_trigin_idma <High>
Call xtsc_core::set_trigin_idma(<High>) for this core. Return the previous
value. <High> may be 0|1.
set_turbo_max_relaxed_cycles <Value>
Call xtsc_core::set_turbo_max_relaxed_cycles(<Value>) for this core.
summary
Call xtsc_core::summary() for this core.
translate_virtual <VirtualAddress>
Return xtsc_core::translate_virtual(<VirtualAddress>) for this core.
watchfilter_dump [<MemoryPortName>]
Return buffer from calling xtsc_core::watchfilter_dump(<MemoryPortName>).
watchfilter_remove <Watchfilter> | *
Return xtsc_core::watchfilter_remove(<Watchfilter>). An * removes all
watchfilters.
Implements xtsc_command_handler_interface.
Connect to the inbound pif port of another xtsc_core. This method connects the specified
memory port of this xtsc_core to the inbound pif port of the xtsc_core specified by core.
Parameters:
core The xtsc_core whose inbound pif port is to be connected to.
memory_port_name The memory port name of this xtsc_core that is to be connected
to the inbound pif port of core.
See also:
How_to_do_memory_port_binding for a list of valid names.
7.51.5.29 void connect (xtsc_core & core, const char ∗ output_name, const char ∗
input_name)
Connect an output of another xtsc_core to an input of this xtsc_core. This method connects
a system output wire or TIE export state of another xtsc_core to a system input wire of this
xtsc_core. This method may also be used to chain TX Xtensa cores together.
Parameters:
core The other xtsc_core.
output_name The system output wire or TIE export state of the other xtsc_core. If
chaining TX cores, then this argument must be "tx_xfer_out" and core is the up-
stream TX in the chain..
input_name The system input wire of this xtsc_core. If chaining TX cores, then this
argument must be "tx_xfer_in" and this xtsc_core is the downstream TX in the
chain.
Connect with an upstream xtsc_tx_loader. This method connects this core with the speci-
fied upstream xtsc_tx_loader. Which interfaces are connected depends on the iface argu-
ment.
Parameters:
loader The xtsc_tx_loader to connect with.
iface If iface is "tx_xfer_in", then the output XFER interface of loader will be connected
to the input XFER interface of this core (so this core will be the first TX in the
chain). If iface is not "tx_xfer_in", then the \"pin_level\" parameter of loader must
be false and iface must name a 32-bit TLM TIE input queue interface of this core,
which will be connected to the TLM queue pop interface (m_consumer) of loader.
Dump the most recent previous xtsc_request that passed a xtsc_request watchfilter on the
specified memory_port_name (or on each memory port).
Parameters:
os The ostream object to which the watchfilters should be dumped.
memory_port_name The memory port name. If empty then the most recent previous
request passed on each memory port is dumped.
See also:
watchfilter_add
xtsc_filter
Dump the most recent previous xtsc_response that passed a xtsc_response watchfilter on
the specified memory_port_name (or on each memory port).
Parameters:
os The ostream object to which the watchfilters should be dumped.
memory_port_name The memory port name. If empty then the most recent previous
response passed on each memory port is dumped.
See also:
watchfilter_add
xtsc_filter
Add a watchfilter on peeks, pokes, requests, or responses to the specified memory port.
Parameters:
memory_port_name The memory port name.
filter_name The filter instance name. The actual xtsc_filter object will be obtained
via a call to xtsc_filter_get. Its kind must be one of "xtsc_peek", "xtsc_poke",
"xtsc_request", or "xtsc_response".
event The sc_event to notify when a nb_peek, nb_poke, nb_request, or nb_response
(as appropriate) occurs whose payload passes the filter.
Returns:
the watchfilter number (use to remove the watchfilter).
See also:
watchfilter_remove
xtsc_filter
xtsc_filter_get
Dump a list of all watchfilters applied to the specified memory port (or all memory ports) of
this xtsc_core instance.
Parameters:
os The ostream object to which the watchfilters should be dumped.
memory_port_name The memory port name. If empty then watchfilters for all mem-
ory ports are dumped.
See also:
watchfilter_add
xtsc_filter
Parameters:
watchfilter The number returned from a previous call to watchfilter_add. A -1
(0xFFFFFFFF) means to remove all watchfilters on this xtsc_core instance.
Returns:
the number (count) of watchfilters removed.
See also:
watchfilter_add
xtsc::xtsc_filter
Dump a lot of information about the core configuration. Dump the set of core configuration
parameters and core interfaces to the specified ostream.
Parameters:
os The ostream operator to dump the information to.
include_interfaces If false, do not include core interfaces.
This method dumps the status of all cores in a vector of cores. Dumps status information
(pc and enabled|disabled|exited) for each core in a vector of cores. Enabled and disabled
refer to the gated clock.
Parameters:
os The ostream object to which the output is sent. The default is cout.
cores The set of cores of interest. The default is all cores in the system.
See also:
is_clock_enabled()
has_exited()
Set the flag that determines whether similation will be stopped (via a call to the SystemC
sc_stop() method) after the target program on the last running core (that has "SimNeverEx-
its" set to false--the default) exits. The default value of the flag is true. That is, if this method
is never called then sc_stop() will be called after the target program on the last running core
(that has "SimNeverExits" set to false) exits.
Parameters:
stop If true, sc_stop will be called as soon as the target program on the last running
core (that has "SimNeverExits" set to false) exits. If false, sc_stop will not be
called.
Returns:
the previous value of the flag
See also:
xtsc_core_parms "SimNeverExits"
xtsc_core_parms "SimStopOnExit"
Return the flag that determines whether similation will be stopped (via a call to the SystemC
sc_stop method) after the target program on the last running core (that has "SimNeverExits"
set to false--the default) exits.
Returns:
the value of the flag.
See also:
xtsc_core_parms "SimNeverExits"
xtsc_core_parms "SimStopOnExit"
Get the event that will be notified immediately after the target program on the last running
core (that has "SimNeverExits" set to false--the default) exits.
See also:
xtsc_core_parms "SimNeverExits"
xtsc_core_parms "SimStopOnExit"
Get the event that will be notified when the target program of this core makes a user simcall.
See also:
set_simcall_callback
Get the specified argument from the most recent previous user simcall.
Parameters:
arg The argument number to return. Valid range is 1-6 (to return arg1-arg6).
See also:
simcall_callback
set_simcall_callback
Set the value that will be returned by the default simcall callback.
Parameters:
value The value that will be returned by the default simcall callback.
This method enables or disables all xtsc_core objects in the specified set of cores. A core
is enabled by turning its gated clock on and is disabled by turning its gated clock off (using
the enable_clock() method).
Parameters:
enable If true (the default) all specified cores are enabled. If false all specified cores
are disabled.
cores The set of cores to enable or disable. The default is all cores in the system.
See also:
enable_clock()
This method can be used to get a constant reference to the xtsc_core_parms used to
construct this xtsc_core. This xtsc_core_parms object can be queried for construction
parameter values; however, these values should not be changed.
See also:
xtsc_core_parms
xtsc_parms
Get the instantiation order number of this core. Get the zero-based number indicating the
instantiation order for this core. The first core instantiated has an instantiation order number
of 0, the second core instantiated has an instantiation order number of 1, and so on.
Set the callback function for user simcalls. This method is called to register a callback func-
tion with the ISS that will be called whenever the target program executes a user simcall.
Steps to using user simcalls:
Parameters:
callback The callback function to be called.
callback_arg Any desired value. This value will be passed as the second argument
to the callback function.
previous_arg Pointer to a void∗ pointer in which to return the previously registered
callback argument.
Clients calling this method should record the simcall_callback and previous_arg returned
by this method and chain a call to them in the registered callback.
See also:
simcall_callback
Returns:
the previous callback function.
Set a callback function to be used when a target program requests a simulation mode
switch. This method is called to register a callback function with the ISS that will be called
whenever the target program executing on this core requests a simulation mode switch.
This callback will not be called if the requested mode is already the current mode.
Note: XTSC includes a built-in callback for switching. Using this method overrides XTSC’s
built-in callback.
Note: In a multi-core simulation, the behavior is unspecified if multiple cores attempt a
simulation mode switch during overlapping simulation time intervals.
Steps to using a custom simulation mode switch callback:
Parameters:
callback The callback function to be called.
callback_arg Any desired value. This value will be passed as the second argument
to the callback function.
See also:
sim_mode_switch_callback
7.51.5.49 u32 enable_debug (bool wait = true, bool synchronized = false, bool
dummy = true, u32 starting_port = 0)
Parameters:
wait If true (the default), the ISS will wait for a debugger to attach before releasing this
processor core from reset. If false, this core will be released from reset as soon
as sc_start() is called.
synchronized If enable_debug() is called one or more times with this flag set to true,
then all cores in the system run in lock step so that if any one of them is waiting
for the debugger to attach or waiting at a breakpoint, then all other cores will stall.
If you do not want to have synchronized simulation then this flag must be set to
false (the default) on every call to enable_debug(). This parameter is ignored after
the first call to sc_start().
Note: Starting with RC-2009, operating in synchronized mode stops SystemC simulation
time from advancing (but delta cycles will occur) while any core is waiting for a debugger to
attach or waiting at a breakpoint.
Parameters:
dummy This parameter is ignored (in previous releases it was the enable_xplorer
parameter, but enabling of Xtensa Xplorer is handled automatically now).
starting_port xtsc_core needs a free port number to listen to while waiting for xt-gdb
to connect. This specifies the starting port number when looking for a free port. It
is recommended you use a public port number (i.e. 1024 or greater) or use 0 (the
default) which tells xtsc_core to pick a port number for you.
Returns:
the actual port number.
Exceptions:
See also:
setup_debug()
setup_multicore_debug()
7.51.5.50 u32 setup_debug (int argc, const char ∗const ∗ argv, u32
processor_num = 0xFFFFFFFF, bool wait = true, bool synchronized =
false, bool dummy = true, u32 starting_port = 0)
Setup debugging or profiling on this core based upon command line arguments. This is a
convenience method to make it easy to enable debugging or profiling on this core based
upon command line arguments. This method scans argv looking for strings in the following
format:
1. --xxdebug or -xxdebug
2. --xxdebug=<ProcNum> or -xxdebug=<ProcNum>
3. --xxdebug=sync or -xxdebug=sync
4. --xxprofile or -xxprofile
5. --xxprofile=<ProcNum> or -xxprofile=<ProcNum>
If the first format is found, then enable_debug() is called for this core. If the second format
is found and if <ProcNum> matches processor_num, then enable_debug() is called for this
core. If the third format is found then enable_debug() is called for this core with the synchro-
nized argument set to true (regardless of the value of synchronized passed to this function).
If the fourth format is found, then load_client("profile --all") is called for this core. If the fifth
format is found and if <ProcNum> matches processor_num, then load_client("profile --all")
is called for this core.
Parameters:
argc The size of argv. Typically, this is just the first argument passed into sc_main.
argv An array of c-strings. Typically, this is just the second argument passed into
sc_main.
processor_num The processor number to compare with the <ProcNum> number
from the --xxdebug=<ProcNum> argv argument. Two values of processor_num
have special meaning. If processor_num is 0xFFFFFFFF (the default) it means
to use the instantiation order number of this xtsc_core (see get_instantiation_-
number) to compare with <ProcNum>. If processor_num is 0xFFFFFFFE it
means to use the xtsc_core_parms value from "ProcessorID" to compare with
<ProcNum>.
wait See enable_debug().
synchronized See enable_debug().
dummy Ignored, see enable_debug().
starting_port See enable_debug().
Returns:
1 if enable_debug was called for this core, otherwise returns 0.
Note: Enabling both debugging and profiling in the same simulation run is not recom-
mended because the timing and pipeline changes introduced by the debugging operation
may invalidate the profiling data.
See also:
enable_debug().
load_client().
setup_multicore_debug()
get_instantiation_number.
7.51.5.51 static u32 setup_multicore_debug (int argc, const char ∗const ∗ argv,
u32 processor_num = 0, bool wait = true, bool synchronized = false,
bool dummy = true, u32 starting_port = 0, std::vector< xtsc_core ∗ >
cores = get_all_cores()) [static]
Setup debugging or profiling on all cores in a list based upon command line arguments.
This is a convenience method to make it easy to enable debugging or profiling on all cores
in a list based upon command line arguments. This method calls the setup_debug() method
for each core in the cores vector.
Parameters:
argc See setup_debug().
argv See setup_debug().
processor_num See setup_debug(). If processor_num is 0xFFFFFFFF or
0xFFFFFFFE then it is passed along unchanged to setup_debug(). If processor_-
num is any other value, then the index in the cores vector is passed to setup_-
debug as its processor_num argument.
wait See enable_debug().
synchronized See enable_debug().
dummy Ignored, see enable_debug().
starting_port See enable_debug().
cores The vector of xtsc_core pointers that you want setup_debug() called for. The
default is all currently existing xtsc_core objects.
Returns:
the number of cores for which enable_debug was called.
See also:
setup_debug().
enable_debug().
get_all_cores().
Set the debug poll interval. This is the number of instruction cycles that the ISS will execute
before checking to see if the debugger has attached or is trying to interrupt the simulator.
Parameters:
num_cycles The number of instruction cycles between polls.
See also:
the "SimDebugPollInterval" parameter
Returns:
the number of instruction cycles between polls.
See also:
set_debug_poll_interval()
Set the callback function the simulator will call when a debugger connects to this core.
Parameters:
callback The callback function.
arg Argument to be passed to the callback function.
Warning: The callback occurs in the context of ipc_thread, a separate OS-level thread used
to communicate with the debugger. This OS-level thread runs independent of the OS-level
thread in which the SystemC kernel runs and it is NOT safe to modify SystemC kernel
state and most module state from the callback function. In lieu of using a callback function,
Cadence recommends that the get_debugger_connect_event() method be used to get an
sc_event that will be safely notified when the debugger connects.
Returns:
the previous callback function.
Set the callback function the simulator will call when a debugger disconnects from this core.
Parameters:
callback The callback function.
arg Argument to be passed to the callback function.
Warning: The callback occurs in the context of ipc_thread, a separate OS-level thread used
to communicate with the debugger. This OS-level thread runs independent of the OS-level
thread in which the SystemC kernel runs and it is NOT safe to modify SystemC kernel
state and most module state from the callback function. In lieu of using a callback function,
Cadence recommends that the get_debugger_disconnect_event() method be used to get
an sc_event that will be safely notified when the debugger disconnects.
Returns:
the previous callback function.
Set the callback function the simulator will call whenever this core encounters an internal
(xt-gdb/Xtensa Xplorer) breakpoint.
Parameters:
callback The callback function.
arg Argument to be passed to the callback function.
previous_arg Pointer to a void∗ pointer in which to return the previously registered
callback argument.
Clients calling this method should record the debugger_callback and previous_arg returned
by this method and chain a call to them in the registered callback.
Note: Unlike the debugger resume callback, the callback function specfied here is called in
the context of the OS-level thread of the SystemC kernel so SystemC and module methods
and state can be safely accessed.
Note: See "lua_function breakpoint" under the "SimScriptFile" parameter in xtsc_core_-
parms for a way to have a Lua function called when this core encouners an internal break-
point instead of providing a C/C++ callback function using this method.
Note: See the "breakpoint_csv_file" parameter in xtsc_initialize_parms for an automatic
way to record breakpoint information into a comma-separated value (CSV) file using a
built-in callback function.
Returns:
the previous callback function.
Set the callback function the simulator will call whenever the debugger of this core starts
the core executing instructions. From xt-gdb, this corresponds to the continue, step, stepi,
and stepc commands.
Parameters:
callback The callback function.
arg Argument to be passed to the callback function.
Warning: The callback occurs in the context of ipc_thread, a separate OS-level thread used
to communicate with the debugger. This OS-level thread runs independent of the OS-level
thread in which the SystemC kernel runs and it is NOT safe to modify SystemC kernel
state and most module state from the callback function. In lieu of using a callback function,
Cadence recommends that the get_debugger_resume_event() method be used to get an
sc_event that will be safely notified when the debugger resumes instruction execution.
Returns:
the previous callback function.
Cause the ISS for this core to break and pass control to its attached debugger. For example,
when some other core has encountered a breakpoint and its breakpoint callback function
(set using set_breakpoint_callback) has been envoked by the simulator, this method can
be used from that callback to cause this core to also break and pass control to its attached
debugger.
This method returns true if all cores in a vector of cores have exited; otherwise it returns
false.
Parameters:
cores The set of cores of interest. The default is all cores in the system.
See also:
has_exited()
Parameters:
mem_port The desired local memory port.
Returns:
true if the memory exists, otherwise returns false.
See also:
memory_port
Parameters:
memory_port_name The memory port name.
Returns:
true if the memory port exists, otherwise returns false.
See also:
How_to_do_memory_port_binding for a list of valid names.
Determine if core is dual-ported (hardware prior to RE-2012.0). If xlmi is false, this method
returns true if the core has 2 LD/ST units and no CBox. If xlmi is true, this method returns
true if the core has 2 LD/ST units.
Note: This method always returns false on RE-2012.0 or later hardware configs ("HWMi-
croArchLatest" is 250000 or greater).
Note: This method is deprecated in favor of the get_multi_port_count() method.
Parameters:
mem_port The memory port whose zeroeth memory port is desired.
Return the number of ports the core has of the specified memory port class. For ex-
ample, for a non-subbanked, non-split RW interface, calling this method with mem_-
port of MEM_DRAM0P0, MEM_DRAM0P1, MEM_DRAM0P2, or MEM_DRAM0P3 will re-
turn the number of ports that the DataRAM0 interface has and calling this method with
mem_port of MEM_DRAM0LS0RD, MEM_DRAM0LS0WR, MEM_DRAM0LS1RD, MEM_-
DRAM0LS1WR, etc, or with a mem_port of MEM_DRAM0B0S00, MEM_DRAM0B0S01,
etc, will return 0.
For an interface with subbanks, calling this method with mem_port of MEM_DRAM0P0,
MEM_DRAM0P1, MEM_DRAM0P2, or MEM_DRAM0P3 will return 0 while calling this
method with mem_port of MEM_DRAM0B0S00, MEM_DRAM0B0S01, etc, (and so on for
banks 1, 2, and 3) will return the number of banks times the number of subbanks per bank
that the DataRAM0 interface has.
For a split RW interface, calling this method with mem_port of MEM_DRAM0P0, MEM_-
DRAM0P1, MEM_DRAM0P2, or MEM_DRAM0P3 will return 0 while calling this method
with mem_port of MEM_DRAM0LS0RD, MEM_DRAM0LS0WR, MEM_DRAM0LS1RD,
MEM_DRAM0LS1WR, etc, will return the number of RD ports (equals number of WR ports)
that the DataRAM0 interface has (if count_split_rw is false) or it will return the sum of the
RD ports and WR ports (if count_split_rw is true). If the core does not have a DataRAM0
interface then calling this method with any of the above values of mem_port will return 0.
Parameters:
mem_port A memory port of the desired memory port class.
count_split_rw For split R/W ports, this method returns the number of RD ports or
the number of WR ports (the two numbers are always equal) if count_split_rw is
false. If count_split_rw is true, the sum of the RD and WR port counts is returned.
Return the memory_port enum of the nth port (0-based) of a multi-ported interface or the
only (n=0) port of a single-ported interface. This convenience method makes it easier to
get each of the subbanked or split R/W DataRAM0 or DataRAM1 ports that the config has
when, for subbanked interfaces, it may have less than the maximum number of subbanks
and for split R/W interfaces it may have less than 3 LD/ST units and may or may not have
inbound PIF (DMA).
For example, here is what this method will return when called with the values shown on a
config with 2 banks each with 4 subbanks on DataRAM0 (for a total of 8 multi-ports).
mem_port n return
-------------- - --------------
MEM_DRAM0B0S00 0 MEM_DRAM0B0S00
MEM_DRAM0B0S00 1 MEM_DRAM0B0S01
MEM_DRAM0B0S00 2 MEM_DRAM0B0S02
MEM_DRAM0B0S00 3 MEM_DRAM0B0S03
MEM_DRAM0B0S00 4 MEM_DRAM0B1S00
MEM_DRAM0B0S00 5 MEM_DRAM0B1S01
MEM_DRAM0B0S00 6 MEM_DRAM0B1S02
MEM_DRAM0B0S00 7 MEM_DRAM0B1S03
MEM_PIF 0 MEM_PIF
MEM_IDMA0 0 MEM_IDMA0
As another example, here is what this method will return when called with the values shown
on a config with split R/W ports, 2 LD/ST units, and inbound PIF to DataRAM0 (for a total
of 6 multi-ports) and with interleave_rw true.
mem_port n return
-------------- - --------------
MEM_DRAM0LS0RD 0 MEM_DRAM0LS0RD
MEM_DRAM0LS0RD 1 MEM_DRAM0LS0WR
MEM_DRAM0LS0RD 2 MEM_DRAM0LS1RD
MEM_DRAM0LS0RD 3 MEM_DRAM0LS1WR
MEM_DRAM0LS0RD 4 MEM_DRAM0DMARD
MEM_DRAM0LS0RD 5 MEM_DRAM0DMAWR
MEM_PIF 0 MEM_PIF
And here is what this method will return when called with the values shown on the same
config as above but with interleave_rw false.
mem_port n return
-------------- - --------------
MEM_DRAM0LS0RD 0 MEM_DRAM0LS0RD
MEM_DRAM0LS0RD 1 MEM_DRAM0LS1RD
MEM_DRAM0LS0RD 2 MEM_DRAM0DMARD
MEM_DRAM0LS0RD 3 MEM_DRAM0LS0WR
MEM_DRAM0LS0RD 4 MEM_DRAM0LS1WR
MEM_DRAM0LS0RD 5 MEM_DRAM0DMAWR
Parameters:
mem_port The enum of the first port (port 0) of the desired multi-port or the enum of
a single-ported interface.
n The desired nth port. If mem_port is a single-ported interface then n must be 0. The
valid range for n is 0 to one less than the value returned by calling get_multi_-
port_count(mem_port, true).
interleave_rw Specifies whether each WR port of a split RW interface should imme-
diately follow its corresponding RD port (interleave_rw true) or if they should all
follow after the last RD port (interleave_rw false). For example, if interleave_rw is
true, MEM_DRAM0LS0RD is followed by MEM_DRAM0LS0WR. If interleave_rw
is false (and assuming at least 2 LD/ST units), MEM_DRAM0LS0RD is followed
by MEM_DRAM0LS1RD. Similarly for DataRAM1. This parameter only applies if
mem_port is a split RW Data RAM.
Exceptions:
xtsc_exception if this core does not have the specified nth memory port.
Parameters:
mem_port The desired memory port.
Exceptions:
xtsc_exception if this core does not have the specified memory port.
Get whether or not the specified local memory port exists and its starting byte address.
Parameters:
mem_port The desired local memory port.
address8 A reference in which to return the starting byte address.
Returns:
true if the local memory exists, otherwise returns false.
See also:
memory_port
Get whether or not system RAM memory exists and its starting byte address.
Parameters:
address8 A reference in which to return the starting byte address.
Returns:
true if system RAM memory exists, otherwise returns false.
Get whether or not system ROM memory exists and its starting byte address.
Parameters:
address8 A reference in which to return the starting byte address.
Returns:
true if system ROM memory exists, otherwise returns false.
Get whether or not the specified local memory port exists and its size in bytes.
Parameters:
mem_port The desired local memory port.
size8 A reference in which to return the memory byte size.
Returns:
true if the local memory port exists, otherwise returns false.
See also:
memory_port
Get whether or not system RAM memory exists and its size in bytes.
Parameters:
size8 A reference in which to return the memory byte size.
Returns:
true if system RAM memory exists, otherwise returns false.
Get whether or not system ROM memory exists and its size in bytes.
Parameters:
size8 A reference in which to return the memory byte size.
Returns:
true if system ROM memory exists, otherwise returns false.
This method is used to read memory using a physical address without disturbing the mem-
ory hardware, the processor hardware, or the bus hardware.
Parameters:
address8 The byte address of the first byte to be peeked.
size8 The number of bytes to peek. Can be any number of bytes as long as the
address range from address8 to address8+size8-1 maps to the same physical
memory.
buffer The byte array in which to return the peeked data. The byte at address8 is
returned in buffer[0], the byte at address8+1 is returned in buffer[1], and so on up
to the byte at address8+size8-1 is returned in buffer[size8-1]. This format applies
regardless of host and core endianess. The caller is responsible for allocating this
buffer.
This method is used to read memory using a virtual address without disturbing the memory
hardware, the processor hardware, or the bus hardware.
Parameters:
address8 The byte address of the first byte to be peeked.
size8 The number of bytes to peek. Can be any number of bytes as long as the
address range from address8 to address8+size8-1 maps to the same physical
memory.
buffer The byte array in which to return the peeked data. The byte at address8 is
returned in buffer[0], the byte at address8+1 is returned in buffer[1], and so on up
to the byte at address8+size8-1 is returned in buffer[size8-1]. This format applies
regardless of host and core endianess. The caller is responsible for allocating this
buffer.
This method is used to write memory using a physical address without disturbing the mem-
ory controller hardware, the processor hardware, or the bus hardware.
Parameters:
address8 The byte address of the first byte to be poked.
size8 The number of bytes to poke. Can be any number of bytes as long as the
address range from address8 to address8+size8-1 maps to the same physical
memory.
buffer The byte array in which to obtain the poked data. The byte in buffer[0] is
poked into memory at address8, the byte in buffer[1] is poked into memory at
address8+1, and so on up to the byte in buffer[size8-1] is poked into memory at
address8+size8-1. This format applies regardless of host and core endianess.
This method is used to write memory using a virtual address without disturbing the memory
controller hardware, the processor hardware, or the bus hardware.
Parameters:
address8 The byte address of the first byte to be poked.
size8 The number of bytes to poke. Can be any number of bytes as long as the
address range from address8 to address8+size8-1 maps to the same physical
memory.
buffer The byte array in which to obtain the poked data. The byte in buffer[0] is
poked into memory at address8, the byte in buffer[1] is poked into memory at
address8+1, and so on up to the byte in buffer[size8-1] is poked into memory at
address8+size8-1. This format applies regardless of host and core endianess.
This method peeks the ITLB to translate the virtual address to a physical address. If the
core does not have a ITLB, then hit will be set to true and address8 will be returned. If
address8 is not in the ITLB, then hit will be set to false and address8 will be returned. Oth-
erwise, hit will be set to true and the translated (that is, physical) address will be returned.
Parameters:
address8 The virtual byte address to be translated.
hit Set to true if the core does not have a ITLB or if the ITLB contained a translation
for address8.
This method peeks the DTLB to translate the virtual address to a physical address. If the
core does not have a DTLB, then hit will be set to true and address8 will be returned. If
address8 is not in the DTLB, then hit will be set to false and address8 will be returned. Oth-
erwise, hit will be set to true and the translated (that is, physical) address will be returned.
Parameters:
address8 The virtual byte address to be translated.
hit Set to true if the core does not have a DTLB or if the DTLB contained a translation
for address8.
This method translates the specified virtual address into a physical address. This conve-
nience method first tries peek_itlb() and, if that misses, it then tries peek_dtlb() and, if that
misses, it returns address8.
Parameters:
address8 The virtual byte address to be translated.
Assuming register tracing is setup, this method sets whether or not it is enabled. When
register tracing is setup it is also automatically enabled from the start of simulation. If this
is not desired, call this method with enable=false, prior to starting simulation.
Register tracing is setup by setting the "SimVcdHandle" and "SimTraceRegisters" parame-
ters.
Parameters:
enable If true, register tracing, if setup, is enabled. If false, register tracing is disabled.
Exceptions:
xtsc_exception if called with enable=true and register tracing has not be setup.
See also:
is_register_tracing_enabled()
See also:
enable_register_tracing()
Parameters:
high If true, the TrigIn_iDMA signal is asserted. If false, it is deasserted.
Exceptions:
See also:
get_trigin_idma()
Returns:
true if signal is asserted, return false if signal is deasserted.
Exceptions:
See also:
set_trigin_idma()
Set setting whether or not this core is in RunStall. This method allows stalling or releasing
this core’s pipeline in the same manner as the RunStall system-level input.
Parameters:
stall If true, causes the pipeline to stall after it advances at the beginning of the next
cycle. The pipeline will advance no further until the stall is released by calling this
method with a value of false.
See also:
the "SimRunStall" parameter
get_stall()
Returns:
true if core is stalled, return false if core is not stalled.
See also:
set_stall()
Turns logging of disassembly on or off. If true, as each instruction commits, its program
counter, machine code, and disassembly will be logged at INFO_LOG_LEVEL. If false, this
logging will be turned off.
Parameters:
log If true, logging of disassembly is turned on. If false, logging of disassembly is
turned off.
See also:
"SimLogDisassembly" in xtsc_core_parms
Returns:
true if this core is currently in fast functional mode (TurboXim), else returns false to
indicate core is currently in cycle-accurate mode.
Parameters:
enable If true (the default), this core’s gated clock is enabled. If false, this core’s gated
clock is disabled.
Returns:
true if this core’s gated clock was previously (prior to this API call) enabled, otherwise
return false.
See also:
is_clock_enabled()
Returns true if this core’s gated clock is enabled; otherwise returns false.
See also:
enable_clock()
Method to step one core while all other cores are disabled. This method disables the gated
clock of all other core’s in the system, enables this core’s gated clock, calls sc_start for the
specified number of clock cycles, then restores the gated clocks of all cores to the state
they were in when this method was called.
Note: This method should only be called from places you can call sc_start (i.e. from sc_-
main, either directly or indirectly).
Parameters:
num_cycles The number of clock cycles to step this core.
See also:
enable_clock
Parameters:
interrupt The number of the desired interrupt.
set If true, interrupt is set. If false, interrupt is cleared.
Reset the XFER block of a TX core with the boot loader option.
Parameters:
reset If true, XferReset is asserted. If false, XferReset is de-asserted.
Exceptions:
Parameters:
os The ostream object on which to print the summary.
Note: Also see the summary client under the load_client() method.
Get the set of TLM TIE interfaces defined for this core. Get the set of TLM TIE interfaces
(lookups, input queues, output queues, import wires, and export states) defined for this
core.
The TLM TIE names are as written in the user’s TIE code and will never have the "TIE_"
prefix.
Get the set of pins defined for this core. Get the set of TIE and system input and output
pins defined for this core. The pin-level TIE names always start with the "TIE_" prefix and
the system input and output names will never start with this prefix.
Get the set of input pins defined for this core. Get the set of TIE and system input pins
defined for this core. The pin-level TIE names always start with the "TIE_" prefix and the
system input names will never start with this prefix.
Get the set of output pins defined for this core. Get the set of TIE and system output pins
defined for this core. The pin-level TIE names always start with the "TIE_" prefix and the
system output names will never start with this prefix.
Dump the last value (or values) crossing the named interface. For TLM TIE interfaces, the
values dump are:
Parameters:
interface_name The name of the TIE or system-level I/O TLM or pin interface as
shown in the output of dump_core_interfaces_by_type().
os The ostream operator to which the interface values should be dumped.
Note: You can arrange for an sc_event to be notified so you know when to call this method
using the "SimMonitorInterfaces" parameter.
See also:
dump_core_interfaces_by_type()
xtsc_core_parms "SimMonitorInterfaces"
Dump a list of all core interfaces grouped by type. Dump a list of all TLM and pin-level core
interfaces grouped by type (lookups, input queues, output queues, import wires, export
states, system input wires, system output wires, TIE/system input pins, and TIE/system
output pins) to the specified ostream object. If include_memories is set to true, then the
dump will also include memory interfaces.
The TIE pin-level names always have the "TIE_" prefix. The TLM TIE names are as written
in the user’s TIE code and never have the "TIE_" prefix. In addition, no system-level I/O
name starts with "TIE_".
Parameters:
os The ostream operator to which the interfaces should be dumped.
include_memories If true, memory interfaces are included in the dump; otherwise,
they are not included.
Dump a list of core System I/O interfaces. Dump a list of all TLM and pin-level core System
I/O interfaces to the specified ostream object.
Parameters:
os The ostream operator to which the interfaces should be dumped.
Dump a list of all core memory interfaces. Dump a list of all core memory interfaces includ-
ing their starting and ending physical address.
Parameters:
os The ostream operator to which the interfaces should be dumped.
Dump a list of all TLM TIE interfaces. Dump a list of all TLM TIE interfaces to the specified
ostream object.
The TLM TIE names are as written in the user’s TIE code and will never have the "TIE_"
prefix.
Dump a list of all TLM TIE interfaces grouped by type. Dump a list of all TLM TIE interfaces
(lookups, input queues, output queues, import wires, and export states) grouped by type to
the specified ostream object.
The TLM TIE names are as written in the user’s TIE code and will never have the "TIE_"
prefix.
Dump a list of TIE lookups. Dump a list of TIE lookups showing width of lookup result
in bits, name of lookup, width of lookup argument in bits, and whether there is a ready
interface to the specified ostream object.
Dump a list of TIE input queues. Dump a list of TIE input queues showing name (as it
appears in the user’s TIE code) and width in bits to the specified ostream object.
Dump a list of TIE output queues. Dump a list of TIE output queues showing name (as it
appears in the user’s TIE code) and width in bits to the specified ostream object.
Dump a list of TIE import wires. Dump a list of TIE import wires showing name (as it
appears in the user’s TIE code) and width in bits to the specified ostream object.
Dump a list of TIE export states. Dump a list of TIE export states showing name (as it
appears in the user’s TIE code) and width in bits to the specified ostream object.
Dump a list of all input pins. Dump a list of all TIE and system input pins showing name
and width in bits to the specified ostream object.
The pin-level TIE names always have the "TIE_" prefix and the system input pins will never
have this prefix.
Dump a list of all output pins. Dump a list of all TIE and system output pins showing name
and width in bits to the specified ostream object.
The pin-level TIE names always have the "TIE_" prefix and the system input pins will never
have this prefix.
Returns true if the named TLM TIE interface exists. Returns true if the named TLM TIE
interface (lookup, input queue, output queue, import wire, or export state) exists.
Parameters:
tie_name This is the name as it appears in the user’s TIE code after the lookup,
queue, import_wire, or state keyword. This name should not begin with the "TIE_"
prefix.
Parameters:
lookup_name Port name as it appears in the user’s TIE code after the lookup key-
word. This name should not begin with the "TIE_" prefix.
Returns true if the named TLM TIE lookup has a ready interface. This method returns true
if the named TIE lookup has a ready interface. A TIE lookup has a ready interface if the rdy
keyword was specified in the lookup section of the user’s TIE code.
Parameters:
lookup_name Port name as it appears in the user’s TIE code after the lookup key-
word. This name should not begin with the "TIE_" prefix.
Parameters:
queue_name Port name as it appears in the user’s TIE code after the queue keyword.
This name should not begin with the "TIE_" prefix.
Parameters:
queue_name Port name as it appears in the user’s TIE code after the queue keyword.
This name should not begin with the "TIE_" prefix.
Parameters:
wire_name Port name as it appears in the user’s TIE code after the import_wire key-
word. This name should not begin with the "TIE_" prefix.
Parameters:
state_name Port name as it appears in the user’s TIE code after the state keyword.
This name should not begin with the "TIE_" prefix.
Returns true if the named TIE or system input or output pin exists.
Parameters:
pin_name For TIE pins, this is the pin name as generated by the TIE compiler which
will always begin with the "TIE_" prefix. For system-level pins, this is the pin name
as specified in the Xtensa microprocessor data book.
Parameters:
input_pin_name For TIE input pins, this is the pin name as generated by the TIE
compiler which will always begin with the "TIE_" prefix. For system-level input
pins, this is the pin name as specified in the Xtensa microprocessor data book.
Parameters:
output_pin_name For TIE output pins, this is the pin name as generated by the TIE
compiler which will always begin with the "TIE_" prefix. For system-level output
pins, this is the pin name as specified in the Xtensa microprocessor data book.
Get the width in bits of the specified pin. Get the width in bits of the specified TIE or system
I/O pin.
Parameters:
pin_name For TIE pins, this is the Verilog name as generated by the TIE compiler.
This name always begins with the "TIE_" prefix and, for TIE lookups and queues,
has the suffixes specified in the TIE Reference Manual. For system I/O pins, this
is the name as specified in the Xtensa microprocessor data book.
See also:
get_sysio_bit_width for obtaining the width of system I/O TLM ports.
get_tie_bit_width for obtaining the width of TIE TLM ports.
Returns true if the named interface exists at pin-level. Returns true if the named interface
(lookup, input queue, output queue, import wire, export state, or system-level input/output)
exists at the pin-level.
Parameters:
interface_name This is either the TIE name as it appears in the user’s TIE code after
the lookup, queue, import_wire, or state keyword (this name should not begin with
the "TIE_" prefix) or it is the system-level input or output name as specified in the
Xtensa microprocessor data book.
Parameters:
sysio_name This is the name as specified in the Xtensa microprocessor data book.
Returns true if the named pin-level TIE interface exists. Returns true if the named pin-level
TIE interface (lookup, input queue, output queue, import wire, or export state) exists.
Parameters:
tie_name This is the name as it appears in the user’s TIE code after the lookup,
queue, import_wire, or state keyword. This name should not begin with the "TIE_"
prefix.
Parameters:
lookup_name Port name as it appears in the user’s TIE code after the lookup key-
word. This name should not begin with the "TIE_" prefix.
Parameters:
queue_name Port name as it appears in the user’s TIE code after the queue keyword.
This name should not begin with the "TIE_" prefix.
Parameters:
queue_name Port name as it appears in the user’s TIE code after the queue keyword.
This name should not begin with the "TIE_" prefix.
Parameters:
wire_name Port name as it appears in the user’s TIE code after the import_wire key-
word. This name should not begin with the "TIE_" prefix.
Parameters:
state_name Port name as it appears in the user’s TIE code after the state keyword.
This name should not begin with the "TIE_" prefix.
Get the width in bits of the specified TLM TIE interface. Get the width in bits of the specified
TLM TIE interface (lookup, input queue, output queue, import wire, or export state).
Note: For TIE lookups, the width returned is the width of the lookup response data (cor-
responding to the TIE_xxx_In Verilog port). See get_lookup_address_bit_width and get_-
lookup_data_bit_width.
Parameters:
tie_name This is the name as it appears in the user’s TIE code after the state, import_-
wire, queue, or lookup keyword. This name should not begin with the "TIE_"
prefix.
See also:
get_sysio_bit_width for obtaining the width of system I/O TLM ports.
get_pin_bit_width for obtaining the width of input/output pins.
Get the width in bits of the specified TLM TIE lookup request address. Get the width in
bits of the specified TLM TIE lookup request address (corresponding to the width of the
TIE_xxx_Out Verilog port, where xxx = lookup_name).
Parameters:
lookup_name Port name as it appears in the user’s TIE code after the lookup key-
word. This name should not begin with the "TIE_" prefix.
Get the width in bits of the specified TIE lookup response data. Get the width in bits of the
specified TIE lookup response data (corresponding to the width of the TIE_xxx_In Verilog
port, where xxx = lookup_name).
Parameters:
lookup_name Port name as it appears in the user’s TIE code after the lookup key-
word. This name should not begin with the "TIE_" prefix.
Get the latency of the specified TIE lookup. Get the latency of the specified TIE lookup.
Latency is defined as def_stage minus use_stage (where def_stage and use_stage are
specified in the TIE lookup section).
Parameters:
lookup_name Port name as it appears in the user’s TIE code after the lookup key-
word. This name should not begin with the "TIE_" prefix.
Get the width in bits of the specified system-level I/O TLM port. Get the width in bits of the
specified system-level input or output TLM port.
Parameters:
sysio_name This is the system-level input or output name as it appears in the Xtensa
microprocessor data book. sysio_name must refer to a TLM port.
See also:
get_system_input_wire for a list of valid input names.
get_system_output_wire for a list of valid output names.
get_tie_bit_width for obtaining the width of TIE TLM ports.
get_pin_bit_width for obtaining the width of input/output pins.
Dump a list of all system-level wires. Dump a list of all system-level wires showing name
and width in bits to the specified ostream object.
Dump a list of all system-level input wires. Dump a list of all system-level input wires
showing name and width in bits to the specified ostream object.
Dump a list of all system-level output wires. Dump a list of all system-level output wires
showing name and width in bits to the specified ostream object.
Parameters:
wire_name This is the system-level input or output wire name as it appears in the
Xtensa microprocessor data book.
Parameters:
wire_name This is the system-level input wire name as it appears in the Xtensa mi-
croprocessor data book.
Parameters:
wire_name This is the system-level output wire name as it appears in the Xtensa
microprocessor data book.
Get the value of the named ISS counter. If the named counter is not used on this core then
a value of 0 is returned. If an unrecognized counter name is passed in, an exception is
thrown.
Parameters:
counter_name The name of the counter whose value is desired.
"Instructions"
"TakenBranches"
"ICacheReads"
"ICacheRefills"
"DCacheReads"
"DCacheWrites"
"DCacheRefills"
"DCacheCastouts"
Get the number of the commit (W) stage of the pipeline. Pipeline stages are numbered as
follows:
Stage number: 0 1 2 3 4
5-stage pipeline: P I R E M W
7-stage pipeline: P H I R E L M W
L = (letter before M)
M = Memory access
W = register Writeback (aka commit)
See also:
get_commit_stage
Get the byte address of the instruction (that is, the program counter or PC) in the given
pipeline stage.
Parameters:
stage The pipeline stage containing the instruction whose address is desired. If the
special stage value of 0x80000000 is passed in then all stages are checked in re-
verse order starting with the W (commit) stage and going to the I stage (Inst Fetch
= 0xFFFFFFFF) until a stage without a bubble and without an invalid instruction
is found. If no such stage is found, then 0xFFFFFFFF is returned.
Returns:
The byte address of the instruction in the given stage (if the given stage contains a
bubble or an invalid instruction, 0xFFFFFFFF is returned).
See also:
get_commit_stage
Parameters:
address8 The byte address to change the PC to.
Get the width (number of bytes) of the instruction pointed to by argument pc.
Parameters:
pc The address of the instruction whose width is desired. Default = 0xFFFFFFFF
which means to use the current PC.
Parameters:
buffer A reference to the string buffer in which to return the disassembly.
pc The address of the instruction to be disassembled. Default = 0xFFFFFFFF which
means to use the current PC.
Returns:
the width (number of bytes) of the instruction
Parameters:
register_name The name of the register.
Returns:
true if the core has the named register, else return false.
Parameters:
register_name The name of the desired register.
value A reference to an sc_unsigned object in which to put the register value.
Parameters:
register_name The name of the desired register.
Returns:
the value in the register.
Parameters:
register_name The name of the desired register.
value The new value of the register.
Get a map of all registers. Get a map of name-value pairs for all registers in this core
(including TIE state and TIE register files). The first item of the map pair is the name of the
register. The second item of the map pair is the value of the register as an sc_unsigned
object.
Set multiple registers. Use a map of name-value pairs to set multiple registers in this core
(including TIE state and TIE register files).
Parameters:
register_map A map of name-value pairs. The first item of the map pair is the name
of the register. The second item of the map pair is the value of the register as an
sc_unsigned object.
xtsc_exception if any name in the map is not a valid register name for this core.
Dump all registers. Dump information about all registers in this core (including TIE state
and TIE register files) to the specified ostream object.
Parameters:
os The ostream object.
Parameters:
register_name The name of the desired register.
Get the latched value of the static vector select input. xtsc_exception if config does not
have the relocatable vectors option.
Returns:
the latched value of the static vector select input.
Parameters:
value The new value of the static vector select input. If the core is already running this
value will not take effect until the core next comes out of reset.
Get the latched value of the AltResetVec input. xtsc_exception if config does not have the
AltResetVec input.
Returns:
the latched value of the AltResetVec input.
Parameters:
address The new value of the AltResetVec input. If the core is already running this
value will not take effect until the core next comes out of reset.
Parameters:
binterrupt_index The BInterrupt index of the pin whose corresponding interrupt num-
ber is desired.
Parameters:
interrupt_number The external interrupt number whose corresponding BInterrupt in-
dex is desired.
Load the specified file into target memory. Load bytes read from the specified text file
into target memory using calls to poke_physical(). The text file should contain lines in the
following format:
([@<Address>] <Byte>*)*
The file can be created by hand or by passing the --xtsc option to xt-dumpelf. For example:
xt-dumpelf --xtsc --width=32 a.out > loadfile.txt
If this method is called before simulation starts, then file_name is saved for later loading
during the SystemC start_of_simulation() callback.
Parameters:
file_name The path and name of file to be loaded. If desired multiple files can be
specfied by separating them with a comma.
See also:
xtsc_core_parms "SimLoadFile"
poke_physical
Load the specified program into target memory. When this method is called, if sc_start()
has not yet been called (i.e. during elaboration), the program name and arguments are
saved for later loading during the SystemC end_of_elaboration() callback. If sc_start() has
been called (i.e. after elaboration), then the program is loaded during the load_program
call.
Parameters:
program_name The path and name of the Xtensa executable to be loaded. If desired
multiple files to be loaded can be specfied by separating them with a comma.
arguments A pointer to a NULL-terminated array of c-strings. Each array entry except
the last is an additional command- line argument to be passed to the target pro-
gram’s main function as part of argv[]: int main(int argc, char ∗argv[]) The last ar-
ray entry must be NULL. If desired, arguments itself can be NULL, in which case
no additional command-line arguments will be passed to the target program’s
main() function (i.e. argc will be 1 and argv[0] will be the program name). Note:
The program name is always passed into main in argv[0] and should NOT be in-
cluded in arguments[]. Note: The "SimTargetProgram" parameter, if not NULL,
overrides any call to this method that occurs prior to the first call to sc_start().
Load the specified client to this core. See Chapter 5, Client Packages, of the Xtensa ISS
UG.
Parameters:
client_package The client package to load.
--cycles
--dcmiss
--dcmiss-cycles
--disable
--force-suffix
--icmiss
--icmiss-cycles
--instructions
--interlock
--uncached-ifetch
--uncached-load
"stackuse"
"summary [--disable] [<FileName>]"
"trace [<Arguments>] [<FileName>]"
Valid <Arguments> include:
--level 0|1|2|3|4|5|6
--nopeek
--peek
--short
--start <InstructionNumber>
--stop <InstructionNumber>
--tieprint
--wtime
See also:
xtsc_core_parms "SimClients" parameter
setup_debug() for information on using --xxprofile as a command line argument to
cause this method to be called for the "profile --all" client.
Load clients from a file. Load all clients in the specified file to this core. See Chapter 5,
Client Packages, of the Xtensa ISS UG.
Parameters:
file_name The name of a file containing a list of clients (one per line) to load to this
core.
See also:
load_client
xtsc_core_parms "SimClientFile" parameter
Send a client command. See Chapter 5, Client Packages, of the Xtensa ISS UG.
Parameters:
command The client command to send.
Get the number of committed store-buffer entries. This method returns the number of
committed store-buffer entries in the specified load/store unit (cycle-accurate simulation
mode only).
Parameters:
ls_unit Zero-based index of the load/store unit of interest.
Note: This method is for internal/future use and may change without notice.
Returns:
the number of committed store-buffer entries.
This method retrieves the information about the store-buffer entry specified by input pa-
rameters ls_unit and sb_index. The information is returned through output parameters
p_sb_state, p_address, p_byte_enables, and p_dram_attribute.
Parameters:
ls_unit Zero-based index of the load/store unit of interest.
sb_index Zero-based index of the store-buffer entry of interest. Must be less than the
value returned by get_store_buffer_count(ls_unit).
p_sb_state If non-NULL, upon return will be set to indicate the state of the specified
store-buffer entry:
• XTSC_SB_PENDING
• XTSC_SB_DISPATCHING
• XTSC_SB_DISPATCHED
p_address If non-NULL, upon return will be set to indicate the address for the speci-
fied store-buffer entry. The address is aligned to the load/store access width.
p_byte_enables If non-NULL, upon return will be set to indicate the byte enables for
the specified store-buffer entry.
p_dram_attribute If non-NULL, must point to a user-constructed sc_unsigned of
length 160 bits which upon return will be set to indicate the DRamWrAttr inter-
face value for the specified store-buffer entry.
Note: This method is for internal/future use and may change without notice.
Returns:
true on success (output parameters are set), false on failure (output parameters are
not set).
This method retrieves the information about a store operation in the pipeline specified by
input parameters ls_unit and stage. The information is returned through output parameters
p_address, p_byte_enables, and p_dram_attribute.
Parameters:
ls_unit Zero-based index of the load/store unit of interest.
stage The number of the pipeline stage of interest. Must be 1 (E), 2 (L), or 3 (M) for
the 7-stage pipe;
p_address If non-NULL, upon return will be set to indicate the address for the spec-
ified pipeline store operation. The address is aligned to the load/store access
width.
p_byte_enables If non-NULL, upon return will be set to indicate the byte enables for
the specified pipeline store operation.
p_dram_attribute If non-NULL, must point to a user-constructed sc_unsigned of
length 160 bits which upon return will be set to indicate the DRamWrAttr inter-
face value for the specified pipeline store operation.
Note: This method is for internal/future use and may change without notice.
Returns:
true if a valid store operation is found, false otherwise. Output parameters are set only
when the return value is true.
Get a vector of all cores in the system. The cores appear in the vector in order of construc-
tion.
Set the relative timing of the 3 clock phases (A, B, and C) for all cores. If the default
phase timing is not desired, this method can be used to set when the 3 clock phases (A,
B, and C) occur during a system clock period (the clock period can be obtained using the
xtsc_get_system_clock_period() method). The first posedge of system clock occurs at the
time specified by the "posedge_offset_factor" parameter of xtsc_initialize_parms and each
subsequent posedge clock occurs one system clock period later.
The phases, relative to the posedge of the system clock, are set by specifying what we will
call a "phase delta factor" or PDF.
The "phase delta" for a particular phase is defined as the time from the previous phase (or
posedge system clock in the case of phase A) to this phase.
posedge posedge
system clock system clock
N Phase Phase Phase N+1
| A B C |
| 0.2 0.3 0.9 |
| | | | |
<==============================================================================>
| | | |
| Phase | Phase | Phase |
| Delta | Delta | Delta |
| A | B | C |
|<------------->|<----->|<------------------------------------->|
The "phase delta factor" for a particular phase is defined as the number to multiply the
SystemC time resolution by to get the "phase delta".
The "SystemC time resolution" is a SystemC concept. It can be obtained by calling sc_-
get_time_resolution().
The sum of the 3 "phase deltas" may not exceed the system clock period.
The system clock is a conceptual thing, not an actual sc_clock. Given the system clock
period (from xtsc_get_system_clock_period()) and the system clock posedge offset (from
xtsc_get_system_clock_posedge_offset()), one can compute what phase of which system
clock period any given SystemC simulation time (from sc_time_stamp()) corresponds to.
The events and deadlines that occur in each of the three phases are shown below (the
ordering is only BETWEEN clock phases--no ordering is implied WITHIN a clock phase):
Parameters:
pdf_a The "phase delta factor" for phase A.
pdf_b The "phase delta factor" for phase B.
pdf_c The "phase delta factor" for phase C.
Note: The above discussion assumes the core’s clock period is the same as the system
clock period, that is, that "SimClockFactor" is 1. For a core whose "SimClockFactor" is
greater than 1, the core’s phase A and phase B take place during the first system clock
period of the core’s clock period and the core’s phase C takes place during the last system
clock period of the core’s clock period. As an example, consider a core whose "SimClock-
Factor" is 3 running in a simulation with the system clock period equal to 1000 ps and with
default clock phase delta factors. In this case, the core’s first clock cycle is from 0 ps to
3000 ps and its phase A, phase B, and phase C for its first clock cycle occur at 200 ps, 300
ps, and 2900 ps respectively. The core’s second clock cycle is from 3000 to 6000 ps and
its phase A, phase B, and phase C for its second clock cycle occur at 3200 ps, 3300 ps,
and 5900 ps respectively. And so on. This assumes the "posedge_offset_factor" value of
xtsc_initialize_parms is 0 (the default). If a non-zero value for this parameter is specified
then all the times would be increased by an amount equal to the "posedge_offset_factor"
multiplied by the SystemC time resolution.
See also:
xtsc_initialize_parms
xtsc_respond_if::nb_respond
xtsc_set_system_clock_factor
xtsc_get_system_clock_factor
xtsc_get_system_clock_period
get_clock_phase_delta_factors
Information_on_memory_interface_protocols
7.51.5.173 static void get_clock_phase_delta_factors (u32 & pdf_a, u32 & pdf_b,
u32 & pdf_c) [static]
Get the relative timing of the 3 clock phases (A, B, and C) for all cores. This method gets
when the 3 clock phases (A, B, and C) occur during a system clock cycle.
Parameters:
pdf_a A reference to the object in which to return the "phase delta factor" for phase A.
pdf_b A reference to the object in which to return the "phase delta factor" for phase B.
pdf_c A reference to the object in which to return the "phase delta factor" for phase C.
See also:
set_clock_phase_delta_factors
Set max relaxed cycles for TurboXim. Sets this core’s relaxed cycle limit.
Parameters:
cycle_limit The max relaxed cycles expressed in terms of system clock periods.
Returns:
This core’s max relaxed cycles in terms of system clock periods.
Instructions for doing port binding in XTSC. The XTSC generic connection mechanism,
when available, is the recommended approach to perform port binding in XTSC. This
approach is available as long as both modules implement the xtsc_connection_interface
(which all modules in the XTSC core and component libraries do). The XTSC generic con-
nection mechanism is primarily documented under xtsc_connect(), xtsc::xtsc_port_type,
and xtsc_connection_interface; however, a brief summary with some tips, examples, and
links is given here.
A typical invocation of the xtsc_connect() method looks like this:
You can access the xtsc_connect() method from xtsc-run using the --connect command.
For example:
Regardless of whether you are building your system using xtsc-run or sc_main, the xtsc-
run program can be used to get a list of port tables and elementary ports that an XTSC
module has once an instance of that module is created. Here are some examples:
You can get more information about xtsc-run from the XTSC User’s Guide (xtsc_ug.pdf) or
from xtsc-run itself using the --man command. For example:
Many examples of using xtsc_connect() and xtsc-run --connect can be found in the sc_-
main.cpp files (for xtsc_connect()) and in the ∗.inc files (for xtsc-run) in the XTSC examples
of your config installation. Here is an example location on Linux for the sample_config:
/xplorer/RF-2015.2/XtDevTools/install/builds/RF-2015.2-linux/sample_config/examples/XTSC
C:\xplorer\RF-2015.2\XtDevTools\install\builds\RF-2015.2-win32\sample_config\examples\XTSC
When xtsc_connect() and the xtsc-run --connect command are not available (because one
or both of the modules does not implement the xtsc_connection_interface), then manual
SystemC port binding must be done (typically in your sc_main.cpp code); however, this is
complicated somewhat by the fact that the ports (sc_port<T> and sc_export<T> objects)
are not named members of xtsc_core. Because of this, you must use an xtsc_core member
function to get each desired port object so that port binding can be done. Which member
function is used depends upon which Xtensa interface type is involved. See the applicable
How_to_do_XXX_binding links below.
See also:
How_to_do_memory_port_binding
How_to_do_tx_xfer_port_binding
How_to_do_tie_lookup_binding
How_to_do_tie_queue_binding
How_to_do_tie_import_wire_binding
How_to_do_tie_export_state_binding
How_to_do_system_input_wire_binding
How_to_do_system_output_wire_binding
How_to_do_output_pin_binding;
How_to_do_input_pin_binding;
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing memory port binding. The XTSC generic connection mechanism,
when available, is the recommended approach to perform port binding in XTSC. This ap-
proach is available as long as both modules implement the xtsc_connection_interface. The
XTSC generic connection mechanism is primarily documented under xtsc_core::How_to_-
do_port_binding, xtsc_connect(), xtsc::xtsc_port_type, and xtsc_connection_interface and
is only briefly mentioned here.
Port binding of non-cache memory ports (both local memories and PIF/iDMA) can also be
accomplished by calling the get_request_port() and get_respond_export() methods to get
references to the appropriate sc_port and sc_export objects and then using these refer-
ences to do port binding in the callee’s code.
There are two versions of each of these latter two methods. The primary version takes a
memory port name and the secondary version takes a xtsc_core::memory_port enum.
The following table shows the legal memory port names. Although only lower-case names
are shown, the memory port name arguments in XTSC methods are case-insensitive.
Important Exception: the xtsc_connection_interface and related methods, most impor-
tantly, the xtsc_connect() method, are all case-sensitive,
When using the following table for the get_request_port() and get_respond_export() meth-
ods, each row represents one memory port. Multiple names on a single row are aliases for
the same memory port. For example, "dram" refers to the same memory port as "dram0".
When using the following table for the xtsc_connect() method (or the xtsc-run --connect
command) only the Second Column and last column are used (where the last column is
determined with respect to the row whose Second Column is being used). The Second Col-
umn shows the top-level port table name used to refer to all ports of that memory interface
and the last column shows the port table names of the memory ports that memory inter-
face potentially has (it may have fewer ports). For example, if the following xtsc_connect()
call is made and core0 has a dual-ported DataRAM0 interface and mem_dram0 has been
properly constructed to also be dual-ported, then the xtsc_connect() method will connect
both the "dram0p0" and "dram0p1" ports.
The xtsc-run --connect command has the same arguments and order as the xtsc_connect()
method except that quotation marks and spaces are not used. For example:
Table of port table names and memory port names (Second Column and last
column):
Second
Column
---------
"dram" "dram0" "dramls0" "dram0ls0" "dram0b0" "dram0p0"
"dramls1" "dram0ls1" "dram0b1" "dram0p1"
"dram0b2" "dram0p2"
"dram0b3" "dram0p3"
"dram0rw" "dram0ls0rd"
"dram0ls0wr"
"dram0ls1rd"
"dram0ls1wr"
"dram0ls2rd"
"dram0ls2wr"
"dram0dmard"
"dram0dmawr"
"dram0bs" "dram0b0s00"
"dram0b0s01"
"dram0b0s02"
"dram0b0s03"
"dram0b0s04"
"dram0b0s05"
"dram0b0s06"
"dram0b0s07"
"dram0b0s08"
"dram0b0s09"
"dram0b0s10"
"dram0b0s11"
"dram0b0s12"
"dram0b0s13"
"dram0b0s14"
"dram0b0s15"
"dram0b1s00"
"dram0b1s01"
"dram0b1s02"
"dram0b1s03"
"dram0b1s04"
"dram0b1s05"
"dram0b1s06"
"dram0b1s07"
"dram0b1s08"
"dram0b1s09"
"dram0b1s10"
"dram0b1s11"
"dram0b1s12"
"dram0b1s13"
"dram0b1s14"
"dram0b1s15"
"dram0b2s00"
"dram0b2s01"
"dram0b2s02"
"dram0b2s03"
"dram0b2s04"
"dram0b2s05"
"dram0b2s06"
"dram0b2s07"
"dram0b2s08"
"dram0b2s09"
"dram0b2s10"
"dram0b2s11"
"dram0b2s12"
"dram0b2s13"
"dram0b2s14"
"dram0b2s15"
"dram0b3s00"
"dram0b3s01"
"dram0b3s02"
"dram0b3s03"
"dram0b3s04"
"dram0b3s05"
"dram0b3s06"
"dram0b3s07"
"dram0b3s08"
"dram0b3s09"
"dram0b3s10"
"dram0b3s11"
"dram0b3s12"
"dram0b3s13"
"dram0b3s14"
"dram0b3s15"
"dram1b0s03"
"dram1b0s04"
"dram1b0s05"
"dram1b0s06"
"dram1b0s07"
"dram1b0s08"
"dram1b0s09"
"dram1b0s10"
"dram1b0s11"
"dram1b0s12"
"dram1b0s13"
"dram1b0s14"
"dram1b0s15"
"dram1b1s00"
"dram1b1s01"
"dram1b1s02"
"dram1b1s03"
"dram1b1s04"
"dram1b1s05"
"dram1b1s06"
"dram1b1s07"
"dram1b1s08"
"dram1b1s09"
"dram1b1s10"
"dram1b1s11"
"dram1b1s12"
"dram1b1s13"
"dram1b1s14"
"dram1b1s15"
"dram1b2s00"
"dram1b2s01"
"dram1b2s02"
"dram1b2s03"
"dram1b2s04"
"dram1b2s05"
"dram1b2s06"
"dram1b2s07"
"dram1b2s08"
"dram1b2s09"
"dram1b2s10"
"dram1b2s11"
"dram1b2s12"
"dram1b2s13"
"dram1b2s14"
"dram1b2s15"
"dram1b3s00"
"dram1b3s01"
"dram1b3s02"
"dram1b3s03"
"dram1b3s04"
"dram1b3s05"
"dram1b3s06"
"dram1b3s07"
"dram1b3s08"
"dram1b3s09"
"dram1b3s10"
"dram1b3s11"
"dram1b3s12"
"dram1b3s13"
"dram1b3s14"
"dram1b3s15"
"iram" "iram0"
"iram1"
"irom" "irom0"
"uram" "uram0"
"pif" "pif"
"idma0"
"sys" "pif"
"idma0"
In the special case of inbound PIF, the get_request_export() and get_respond_port() meth-
ods are used to get references to the appropriate sc_export and sc_port objects.
Here is a diagram showing the connections of an example system with two xtsc_core ob-
jects with PIF interfaces and two xtsc_component::xtsc_memory objects (each of which
is single-ported) followed by the port-binding code using the get_request_port() and get_-
respond_export() methods:
RSP
+<---------------------------------------------------+
| |
| +----------+ +----------+ |
| +--| |--+ +--| |--+ |
| | | | | REQ | | | | |
+-->| | core0 | |-------->| | memory0 | |--->+
| | | | | | | |
+--| |--+ +--| |--+
+----------+ +----------+
+----------+ +----------+
+--| |--+ +--| |--+
| | | | REQ | | | |
+-->| | core1 | |-------->| | memory1 | |--->+
| | | | | | | | | |
| +--| |--+ +--| |--+ |
| +----------+ +----------+ |
| |
| RSP |
+<---------------------------------------------------+
core0.get_request_port("pif")(*memory0.m_request_exports[0]);
core1.get_request_port("pif")(*memory1.m_request_exports[0]);
(*memory0.m_respond_ports[0])(core0.get_respond_export("pif"));
(*memory1.m_respond_ports[0])(core1.get_respond_export("pif"));
Using the recommended XTSC generic connection mechanism, the above 4-line code snip-
pet would be replaced with the following 2 calls to xtsc_connect():
Note: If a local memory port is left unbound, then the Xtensa ISS will use an internal model
for that memory. If the PIF is left unbound, then any attempt by the Xtensa program to
access this memory will result in a simulator (not Xtensa) exception being thrown.
Note: The Xtensa ISS uses an internal model for instruction and data caches. Connecting
external models to the instruction and data cache interfaces is not supported.
See also:
How_to_do_port_binding
xtsc_request_if
xtsc_respond_if
get_request_port
get_respond_export
get_request_export
get_respond_port
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Information_on_memory_interface_protocols
Instructions for doing XFER port binding (the BootLoader interface). Port binding of XFER
ports can be accomplished by calling the get_tx_xfer_port() method of the upstream TX
core and the get_tx_xfer_export() method of the downstream TX core to get references to
the appropriate sc_port and sc_export objects and then using these references to do port
binding in the callee’s code (typically, sc_main).
To start the chain, the m_tx_xfer_port of an xtsc_tx_loader should be bound to the export
returned by the get_tx_xfer_export() method of the first TX in the chain.
To terminate the chain the port returned by the get_tx_xfer_port() of the last TX in the chain
should be bound to the m_tx_xfer_export of the xtsc_tx_loader.
Here is some example port-binding code for binding an xtsc_tx_loader, bootloader, to the
upstream TX, core0, thence to the downstream TX, core1, then terminating back at boot-
loader (this is shown here for documentation purposes; the recommended technique is to
use the appropriate connect() method):
bootloader.m_tx_xfer_port(core0.get_tx_xfer_export());
core0.get_tx_xfer_port()(core1.get_tx_xfer_export());
core1.get_tx_xfer_port()(bootloader.m_tx_xfer_export);
See also:
How_to_do_port_binding
xtsc_tx_xfer_if
get_tx_xfer_port
get_tx_xfer_export
xtsc_tx_loader
Instructions for doing TIE lookup port binding. The XTSC generic connection mechanism,
when available, is the recommended approach to perform port binding in XTSC. This ap-
proach is available as long as both modules implement the xtsc_connection_interface. The
XTSC generic connection mechanism is primarily documented under xtsc_core::How_to_-
do_port_binding, xtsc_connect(), xtsc::xtsc_port_type, and xtsc_connection_interface and
is only briefly mentioned here.
Port binding of TIE lookups can also be accomplished by calling the get_lookup() method
with the lookup name to get a reference to the appropriate sc_port and then using it to do
port binding in the callee’s code.
Here is a code snippet showing the instantiation of an xtsc_component::xtsc_lookup and
connecting it to the TIE lookup named "lut" of an xtsc_core object named core0 (it assumes
there is a lookup table file named "lut.rom"):
// Get the address and data bit widths and whether the lookup has a ready
u32 address_width = core0.get_lookup_address_bit_width("lut");
u32 data_width = core0.get_lookup_data_bit_width("lut");
u32 latency = core0.get_lookup_latency("lut");
bool has_ready = core0.has_lookup_ready("lut");
xtsc_lookup_parms lookup_parms(address_width,
data_width,
has_ready,
"lut.rom",
"0xDEADBEEF");
lookup_parms.set("latency", latency);
Using the recommended XTSC generic connection mechanism, the last line above would
be replaced by:
In the above call to xtsc_connect(), the third parameter is the empty string which means to
use the default port (which in this case is "lookup").
The xtsc_lookup_parms class has a convenience constructor that takes a reference to an
xtsc_core object and the name of a TIE lookup and uses them to find the address and
data bit widths, the latency, and whether or not the lookup has a ready interface. See
xtsc_component::xtsc_lookup_parms::xtsc_lookup_parms.
See also:
How_to_do_port_binding
xtsc_lookup_if
get_lookup
xtsc_component::xtsc_lookup_parms
xtsc_component::xtsc_lookup
has_lookup
has_lookup_ready
get_lookup_address_bit_width
get_lookup_data_bit_width
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing TIE queue port binding. The XTSC generic connection mechanism,
when available, is the recommended approach to perform port binding in XTSC. This ap-
Using the recommended XTSC generic connection mechanism, the last 2 lines above
would be replaced with the following 2 calls to xtsc_connect():
See also:
How_to_do_port_binding
xtsc_queue_push_if
xtsc_queue_pop_if
get_output_queue
get_input_queue
xtsc_component::xtsc_queue_parms::xtsc_queue_parms()
xtsc_component::xtsc_queue
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing TIE import wire port binding. The XTSC generic connection mech-
anism, when available, is the recommended approach to perform port binding in XTSC.
This approach is available as long as both modules implement the xtsc_connection_-
interface. The XTSC generic connection mechanism is primarily documented un-
der xtsc_core::How_to_do_port_binding, xtsc_connect(), xtsc::xtsc_port_type, and xtsc_-
connection_interface and is only briefly mentioned here.
As an alternative approach, the get_import_wire() method can be called by the user to get
a reference to the sc_port<xtsc_wire_read_if, NSPP> object that is the xtsc_core’s input
port for the import wire specified by wire_name.
One technique would be for the user’s code to instantiate an xtsc_component::xtsc_wire
object of the appropriate size, call get_import_wire(), and then bind the returned sc_-
port<xtsc_wire_read_if, NSPP> to the xtsc_component::xtsc_wire channel using normal
SystemC port binding.
See also:
How_to_do_port_binding
xtsc_wire_read_if
get_import_wire
get_export_state
xtsc_component::xtsc_wire
How_to_do_tie_export_state_binding for a code example.
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing TIE export state port binding. The XTSC generic connection mech-
anism, when available, is the recommended approach to perform port binding in XTSC.
This approach is available as long as both modules implement the xtsc_connection_-
interface. The XTSC generic connection mechanism is primarily documented un-
der xtsc_core::How_to_do_port_binding, xtsc_connect(), xtsc::xtsc_port_type, and xtsc_-
connection_interface and is only briefly mentioned here.
As an alternative approach, the get_export_state() method can be called by the user to get
a reference to the sc_port<xtsc_wire_write_if, NSPP> object that is the xtsc_core’s output
port for the export state specified by state_name.
One technique would be for the user’s code to instantiate an xtsc_component::xtsc_wire
object of the appropriate size, call get_export_state(), and then bind the returned sc_-
port<xtsc_wire_write_if, NSPP> to the xtsc_component::xtsc_wire channel using normal
SystemC port binding. For example, the following code snippet connects a 50-bit xtsc_-
component::xtsc_wire from the "status" export state of core0 to the "control" import wire of
core1.
Using the recommended XTSC generic connection mechanism, the last 2 lines above
would be replaced with the following 2 calls to xtsc_connect():
See also:
How_to_do_port_binding
xtsc_wire_write_if
get_export_state
get_import_wire
xtsc_component::xtsc_wire_parms::xtsc_wire_parms()
xtsc_component::xtsc_wire
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing output pin binding (Pin-level). The XTSC generic connection mech-
anism, when available, is the recommended approach to perform port binding in XTSC.
This approach is available as long as both modules implement the xtsc_connection_-
interface. The XTSC generic connection mechanism is primarily documented un-
der xtsc_core::How_to_do_port_binding, xtsc_connect(), xtsc::xtsc_port_type, and xtsc_-
connection_interface and is only briefly mentioned here.
As an alternative approach, the get_output_pin() method can be called by the user to get
a reference to the sc_out<sc_bv_base> object that is the xtsc_core’s pin-level output port
for the TIE or system output pin specified by output_pin_name.
Here are some of the things a system output pin can be connected to using an instance of
sc_signal<sc_bv_base> or the xtsc_signal_sc_bv_base convenience class:
• A Verilog module
Here is an example code snippet showing how to connect a pin-level output of an xtsc_core
(PWaitMode) to an sc_signal<sc_bv_base>:
See also:
How_to_do_port_binding
get_pin_bit_width
get_output_pin
xtsc_signal_sc_bv_base
xtsc_component::xtsc_wire_source
How_to_do_input_pin_binding;
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing input pin binding (Pin-level). The XTSC generic connection mech-
anism, when available, is the recommended approach to perform port binding in XTSC.
This approach is available as long as both modules implement the xtsc_connection_-
interface. The XTSC generic connection mechanism is primarily documented un-
der xtsc_core::How_to_do_port_binding, xtsc_connect(), xtsc::xtsc_port_type, and xtsc_-
connection_interface and is only briefly mentioned here.
As an alternative approach, the get_input_pin() method can be called by the user to get a
reference to the sc_in<sc_bv_base> object that is the xtsc_core’s pin-level input port for
the TIE or system input pin specified by input_pin_name.
Here are some of the things a system input pin can be connected to using an instance of
sc_signal<sc_bv_base> or the xtsc_signal_sc_bv_base convenience class:
• A Verilog module
• An xtsc_wire_source pin-level output port
• A pin-level export state of an xtsc_core
• A system output pin of an xtsc_core
Here is an example code snippet showing how to connect a pin-level output of an xtsc_-
wire_source to a pin-level input (BInterrupt) of an xtsc_core using the xtsc_signal_sc_bv_-
base convenience class:
source_parms.set("bit_width", num_bits);
source_parms.set("pin_level", true);
xtsc_wire_source source("source", source_parms);
source.get_output_pin("m_pin")(BInterrupt);
core.get_input_pin("BInterrupt")(BInterrupt);
See also:
How_to_do_port_binding
get_pin_bit_width
get_input_pin
xtsc_signal_sc_bv_base
xtsc_component::xtsc_wire_source
How_to_do_output_pin_binding;
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing system input wire port binding (TLM). The XTSC generic con-
nection mechanism, when available, is the recommended approach to perform port
binding in XTSC. This approach is available as long as both modules implement the
xtsc_connection_interface. The XTSC generic connection mechanism is primarily docu-
mented under xtsc_core::How_to_do_port_binding, xtsc_connect(), xtsc::xtsc_port_type,
and xtsc_connection_interface and is only briefly mentioned here.
As an alternative approach, the get_system_input_wire() method can be called by the user
to get a reference to the sc_export<xtsc_wire_write_if> object that is the xtsc_core’s TLM
input port for the system input wire specified by wire_name.
Some of the things a system input wire can be bound to are:
One example usage would be for the user’s code to instantiate an xtsc_component::xtsc_-
wire_source object of the appropriate size, call get_system_input_wire(), and then bind the
returned sc_export<xtsc_wire_write_if> with the xtsc_component::xtsc_wire_source::m_-
write member (which is of type sc_port<xtsc_wire_write_if, NSPP>) using normal Sys-
temC port binding as illustrated below:
Using the recommended XTSC generic connection mechanism, the last line above would
be replaced with the following call to xtsc_connect():
See also:
How_to_do_port_binding
xtsc_wire_write_if
get_sysio_bit_width
get_system_input_wire
get_system_output_wire
xtsc_component::xtsc_mmio
xtsc_component::xtsc_wire_logic
xtsc_component::xtsc_wire_source
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
Instructions for doing system output wire port binding. The XTSC generic connec-
tion mechanism, when available, is the recommended approach to perform port bind-
ing in XTSC. This approach is available as long as both modules implement the xtsc_-
connection_interface. The XTSC generic connection mechanism is primarily docu-
mented under xtsc_core::How_to_do_port_binding, xtsc_connect(), xtsc::xtsc_port_type,
and xtsc_connection_interface and is only briefly mentioned here.
As an alternative approach, the get_system_output_wire() method can be called by the
user to get a reference to the sc_port<xtsc_wire_write_if, NSPP> object that is the xtsc_-
core’s output port for the system output wire specified by wire_name.
Some of the things a system output wire can be bound to are:
• An xtsc_component::xtsc_wire
Using the recommended XTSC generic connection mechanism, the last line above would
be replaced with the following call to xtsc_connect():
See also:
How_to_do_port_binding
xtsc_wire_write_if
get_sysio_bit_width
get_system_output_wire
get_system_input_wire
xtsc_component::xtsc_wire_parms::xtsc_wire_parms()
xtsc_component::xtsc_wire
How_to_do_tie_export_state_binding
xtsc_connect()
xtsc_port_type
xtsc_connection_interface
The first 6 types above (DRAM, DROM, IRAM, IROM, URAM, and XLMI) are sometimes
refered to as the "local" memory interfaces.
The xtsc_core class uses the xtsc_request_if and xtsc_respond_if interfaces classes for
communications through each of the memory interfaces. The primary methods are xtsc_-
request_if::nb_request() and xtsc_respond_if::nb_respond() which move a payload object
of class xtsc_request and xtsc_response, respectively. This type of scheme is sometimes
referred to as a "split transaction" protocol because each complete transaction (for exam-
ple, a read transaction or a write transaction) is split into two phases: a request phase
(using the xtsc_request_if::nb_request() method) and a response phase (using the xtsc_-
response_if::nb_respond() method).
Note: Data object ownership: For all Xtensa TLM interface methods, the caller module
owns the data object being passed by the interface and the callee module may make no
assumptions about the data object’s validity after the callee module returns from the inter-
face method call. If the callee module will need information that is stored in the data object
after returning from the interface method call, then the callee module must make a copy
of that information prior to returning from the interface method call. As an example, if a
memory module needs access to information in the xtsc_request object passed in to it via
the xtsc_request_if::nb_request() call, then the memory module must copy that information
prior to returning from the xtsc_request_if::nb_request() call.
The xtsc_request class defines 6 request transaction types in xtsc_request::type_t that are
supported by xtsc_core. The 6 types are READ, BLOCK_READ, RCW, WRITE, BLOCK_-
WRITE, and SNOOP.
Note: Although, xtsc_core neither generates nor accepts BURST_WRITE and BURST_-
READ transactions, it does accept 16-byte WRITE transactions on the inbound PIF inter-
face with byte enables of 0x0FFF, 0xFFF0, and 0x0FF0.
The following table shows which of the 6 request transaction types supported by xtsc_core
are allowed on a particular memory interface type:
Footnote 1: The Xtensa core will only generate BLOCK_READ transactions for uncached
read requests when the load width is wider than the PIF data width and for cache line
misses on processor configurations which have a cache line that is wider than the PIF data
bus.
Footnote 2: The Xtensa core will only generate BLOCK_WRITE transactions for cache
castouts and this will only occur on processor configurations which have a write-back cache
whose cache line is wider than the PIF data bus.
Footnote 3: The Xtensa core will only generate RCW transactions for the S32C1I instruction
and this can only occur on processors which have the Xtensa LX synchronization option.
Footnote 4: The Xtensa core will split BLOCK_READ, RCW, and BLOCK_WRITE requests
received on the inbound PIF interface into individual READ and WRITE requests as re-
quired before re-issuing them to the appropriate IRAM, DRAM, or XLMI memory.
Footnote 5: Inbound PIF can target IRAM, DRAM, or XLMI if the processor was configured
to allow inbound PIF on that interface. Inbound PIF can never target IROM or DROM.
Footnote 6: Xtensa LX iDMA hardware prior to the RG-2017.8 release uses BLOCK_READ
and BLOCK_WRITE transactions on its iDMA PIF port; while Xtensa LX iDMA hardware
from RG-2017.8 and later uses BURST_READ and BURST_WRITE transactions on its
iDMA PIF port. Xtensa LX does not generate BURST_READ or BURST_WRITE trans-
actions on its main (non-iDMA) PIF interface. See "iDMAPIFBurst" in xtsc_core_parms.
A BURST_WRITE sequence consists of N consecutive BURST_WRITE request transfers
(2<=N<=16). A BURST_READ sequence consists of a single BURST_READ request for
N response transfers (2<=N<=16).
A BLOCK_WRITE sequence consists of 2, 4, 8, or 16 consecutive BLOCK_WRITE request
transfers.
Each request on a memory interface should occur in a different clock cycle (that is you
should not submit two requests on the same memory interface in the same clock cycle).
Each non-RSP_NACC response on a memory interface should occur in a different clock
cycle (that is you should not submit two non-RSP_NACC responses on the same memory
interface in the same clock cycle).
The xtsc_response class defines 5 response status values (in xtsc_response::status_t).
The 5 status values are RSP_OK, RSP_ADDRESS_ERROR, RSP_DATA_ERROR, RSP_-
ADDRESS_DATA_ERROR, and RSP_NACC.
The xtsc_response::RSP_OK response status is used to indicate a successfully completed
READ, RCW, WRITE, or BLOCK_WRITE request. It is also used with each successful
BLOCK_READ response. If the response status is RSP_OK to a READ, RCW, or BLOCK_-
READ request, then the response will also contain a data payload (available using the
xtsc_response.get_buffer() method). An RSP_OK response status to an RCW request
does NOT mean that the write took place; to determine if the write took place you must
compare the data payload returned with the response to the data value sent in the first
RCW request.
Note: The Xtensa Instruction Set Simulator (ISS) requires a response after each WRITE
transaction on all memory interface and after the last transfer of a sequence of BLOCK_-
WRITE transfers on the PIF and iDMA interfaces. This rule applies even to configurations
that don’t have the write response option. The "SimPIFFakeWriteResponses" parameter
controls whether or not xtsc_core will automatically supply write responses for requests on
the PIF and iDMA interfaces on configurations without the write response option.
The xtsc_response::RSP_NACC response status models the busy interface of a local
memory interface and it models the ReqRdy interface on the PIF/iDMA and inbound PIF
interfaces, respectively. See below for special timing requirements of RSP_NACC.
An error response status (xtsc_response::RSP_ADDRESS_ERROR, xtsc_-
response::RSP_DATA_ERROR, and xtsc_response::RSP_ADDRESS_DATA_ERROR)
typically results in an exception being raised on the processor that issued the request.
The nb_respond() return value is used to model the PORespRdy/PIRespRdy interface on
the PIF and inbound PIF interfaces, respectively. For the local memory interfaces, xtsc_-
core always returns true to the nb_respond() call.
Port Associated With Each Xtensa TLM Call of xtsc_request_if and xtsc_debug_if:
The xtsc_core model always sends xtsc_request_if::nb_request() calls out the port associ-
ated with the hardware operation being modeled. For the xtsc_debug_if::nb_peek(), xtsc_-
debug_if::nb_poke, and xtsc_debug_if::nb_fast_access calls associated with multi-ported,
non-banked local data memories there is some ambiguity in which port to use because the
port is associated with the hardware origin of the call (e.g. which Ld/St unit) and there is no
fixed concept of the "hardware origin" of the xtsc_debug_if calls. In these cases, xtsc_core
sends the call out the lowest numbered port as shown here:
A of clock cycle N+1 for a 5-stage pipeline and is Phase A of clock cycle N+2 for a 7-stage
pipeline. The deadline for an xtsc_response::RSP_NACC (to model the Busy signal) for a
request that was made in clock cycle N is Phase A of clock cycle N+1 for both 5-stage and
7-stage pipelines.
ISS Timing Requirements for PIF/iDMA devices: The deadline for a xtsc_response::RSP_-
NACC from a PIF device for a request that was made in clock cycle N is Phase A of clock
cycle N+1 regardless of the number of pipeline stages. Responses with a status_t of other
than xtsc_response::RSP_NACC do not have a deadline.
The above ISS timing requirements are more lenient then the real hardware timing require-
ments in the following ways:
1. An early response is accepted by the ISS as though it occurred at the proper time. For
example, local memory hardware timing requirements for a read request which occured in
clock cycle N dictate that the response occur in clock cycle N+1 (5-stage pipeline) or clock
cycle N+2 (7-stage pipeline). However, the ISS will accept the response in clock cycle N.
Of course, the response can never precede the request.
2. Although hardware timing requirements dictate that a xtsc_response::RSP_NACC to a
PIF/iDMA request occur in the same clock cycle (say clock cycle N) as the request, the ISS
will accept a slightly late xtsc_response::RSP_NACC as long as it occurs prior to Phase A
of clock cycle N+1.
See also:
xtsc_request_if::nb_request
xtsc_respond_if::nb_respond
xtsc_request
xtsc_response
set_clock_phase_delta_factors
How_to_do_memory_port_binding
• xtsc_core.h
xtsc_parms
xtsc_core_parms
xtsc_parms
xtsc_core_parms
Constructor parameters for a xtsc_core object. This class contains the parameters needed
to construct an xtsc_core object. When the xtsc_core_parms constructor is called, it
populates the xtsc_core_parms object with the three parameters passed in to it (i.e.
"XTENSA_CORE, "XTENSA_SYSTEM", and "XTENSA_PARAMS) and with numerous ad-
ditional Xtensa parameters obtained from the core’s configuration database in the Xtensa
registry. All the names and values of these additional parameters can be seen using the
xtsc_parms::dump() method. For example:
xtsc_core_parms core_parms("le_32");
core_parms.dump();
Most of the parameters in the core’s configuration database are read-only in XTSC. That is,
the only way to change them for an XTSC simulation is by building a new core configuration.
Here is an alphabetical list of read-only parameters:
3 2 1
10987654321098765432109876543210 (INTENABLE/INTERRUPT index)
0x1a8448b0 = 32'b00011010100001000100100010110000
98 7 6 5 4 3 2 10 (BInterupt index)
"HasPIFReqAttribute" bool True if config has PIF with the PIF Attribute
interface.
"HasPIFReqDomain" bool True if config has PIF with the PIF Request
Domain interface.
"HasPIFCriticalWordFirst" bool True if the config has PIF critical word first
configured.
The following parameters are obtained from the core’s configuration database in the Xtensa
registry, but, assuming "IsPreconfiguredCore" is false and the feature exists in the config,
the parameter values can be changed in XTSC (using the appropriate xtsc_parms::set()
method) to allow expermentation. For example:
xtsc_core_parms core_parms("le_32");
core_parms.set("DataCacheByteSize", 4096);
Warning: Changing these values in XTSC is for experimentation purposes only and will
NOT change the hardware.
Note: Except for "ProcessorID" the following parameters are not writeable for Diamond
Standard processors.
The following parameters are not obtained from the core’s configuration database in the
Xtensa registry. Most of the following parameters are used to control some aspect of the
simulation and are not related to hardware.
"SimExitLocation" char* The optional value to pass to the ISS using the
--exit_location option. The value should be a
10 character string representing a 32-bit value
in hexadecimal (for example, 0x60000000). See
the --exit_location command-line option in the
ISS User's Guide.
Default value = NULL (do not pass
--exit_location to the ISS).
"SimPrefetch" char* The optional value to pass to the ISS using the
--prefetch option. The value should be a 4
character string representing a 8-bit value in
hexadecimal (for example, 0x44). See --prefetch
command-line option in the ISS User's Guide.
Default value = NULL (do not pass --prefetch to
the ISS).
"SimTargetInput" char * The name of the file from which target stdin is
read. If NULL, target stdin is read from host
stdin.
Default value = NULL.
See also:
xtsc_core
xtsc_parms
xtsc_initialize_parms
Parameters:
XTENSA_CORE The name of the core configuration. If NULL (the default) or empty,
the core configuration name will be obtained from the XTENSA_CORE environ-
ment variable if it exists. If the XTENSA_CORE argument is NULL or empty and
the XTENSA_CORE environment variable does not exist, then a configuration
name of "default" will be used.
XTENSA_SYSTEM The Xtensa registry path. If NULL (the default), the registry path
will be obtained from the XTENSA_SYSTEM environment variable (which, in this
case, must exist). If desired, multiple directories may be specified using a semi-
colon separated list.
XTENSA_PARAMS The TDK directory for user TIE extensions. If NULL (the default),
the TDK directory will be obtained from the XTENSA_PARAMS environment vari-
able (if that environment variable exists). If the XTENSA_PARAMS argument is
the empty string (""), then no user TIE will be applied to this core regardless of
the contents of the XTENSA_PARAMS environment variable.
Note: XTENSA_SYSTEM here is a c-string (char ∗) but it will get stored as a c-string array
(char∗∗) in xtsc_parms::m_c_str_array_map using the name "XTENSA_SYSTEM".
The documentation for this class was generated from the following file:
• xtsc_core.h
xtsc_debug_if
xtsc_request_if_impl xtsc_slave
See also:
xtsc_request_if
This method is used to read memory without disturbing the memory hardware, the proces-
sor hardware, or the bus hardware.
Parameters:
address8 The byte address of the first byte to be peeked.
size8 The number of bytes to peek.
buffer The byte array in which to return the peeked data. The byte at address8 is
returned in buffer[0], the byte at address8+1 is returned in buffer[1], and so on up
to the byte at address8+size8-1 is returned in buffer[size8-1]. This format applies
regardless of host and memory client endianess.
Note: The implementation should support arbitrary values for address8 and size8 as long
as all locations map to the address space of the module. If an attempt is made to access a
location outside the address space of the module, an xtsc_exception should be thrown.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_request_if_impl, xtsc_-
request_if_impl, xtsc_slave, xtsc_debug_if_impl, xtsc_request_if_impl, xtsc_debug_if_-
impl, xtsc_request_if_impl, xtsc_debug_if_cap, and xtsc_request_if_impl.
This method is used to write memory without disturbing the memory controller hardware,
the processor hardware, or the bus hardware.
Parameters:
address8 The byte address of the first byte to be poked.
size8 The number of bytes to poke.
buffer The byte array in which to obtain the poked data. The byte in buffer[0] is
poked into memory at address8, the byte in buffer[1] is poked into memory at
address8+1, and so on up to the byte in buffer[size8-1] is poked into memory
at address8+size8-1. This format applies regardless of host and memory client
endianess.
Note: The implementation should support arbitrary values for address8 and size8 as long
as all locations map to the address space of the module. If an attempt is made to access a
location outside the address space of the module, an xtsc_exception should be thrown.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_request_if_impl, xtsc_-
request_if_impl, xtsc_slave, xtsc_debug_if_impl, xtsc_request_if_impl, xtsc_debug_if_-
impl, xtsc_request_if_impl, xtsc_debug_if_cap, and xtsc_request_if_impl.
Get information about fast access to a given address. Calls to this method are used to get
information about what fast access method, if any, is available for the address specified in
the xtsc_fast_access_request object.
Returns:
false to indicate that fast access is not available at this point in the simulation, but may
be re-request at some later time in the simulation.
See also:
xtsc_fast_access_request
Peek method for use by coherence devices. Guidelines: This method is for use by cache
coherence devices (specifically xtsc_core and an external coherence controller model).
Terminal devices can just use the default implementation of this method provided here.
Network devices such as routers and arbiters should just forward the call to the appropriate
downstream device (with any required address translations).
Parameters:
virtual_address8 The virtual byte address of the first byte to be peeked.
physical_address8 The physical byte address of the first byte to be peeked.
size8 The number of bytes to peek. xtsc_core will thrown an exception if an attempt
is made to peek more then 4 bytes at a time.
buffer The byte array in which to return the peeked data. The byte at address8 is
returned in buffer[0], the byte at address8+1 is returned in buffer[1], and so on up
to the byte at address8+size8-1 is returned in buffer[size8-1]. This format applies
regardless of host and memory client endianess.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Note: This method is reserved for future use.
Reimplemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_slave, xtsc_request_-
if_impl, and xtsc_debug_if_impl.
Definition at line 163 of file xtsc_request_if.h.
Poke method for use by coherence devices. Guidelines: This method is for use by cache
coherence devices (specifically xtsc_core and an external coherence controller model).
Terminal devices can just use the default implementation of this method provided here.
Network devices such as routers and arbiters should just forward the call to the appropriate
downstream device (with any required address translations).
Parameters:
virtual_address8 The virtual byte address of the first byte to be poked.
physical_address8 The physical byte address of the first byte to be poked.
size8 The number of bytes to poke. xtsc_core will thrown an exception if an attempt
is made to poke more then 4 bytes at a time.
buffer The byte array in which to obtain the poked data. The byte in buffer[0] is
poked into memory at address8, the byte in buffer[1] is poked into memory at
address8+1, and so on up to the byte in buffer[size8-1] is poked into memory
at address8+size8-1. This format applies regardless of host and memory client
endianess.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Note: This method is reserved for future use.
Reimplemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_slave, xtsc_request_-
if_impl, and xtsc_debug_if_impl.
Definition at line 202 of file xtsc_request_if.h.
The documentation for this class was generated from the following file:
• xtsc_request_if.h
To cap an unconnected m_debug_ports port when the user can’t bind anything to it.
#include <xtsc/xtsc_tlm2pin_memory_transactor.h>Inheritance diagram for xtsc_-
debug_if_cap:
xtsc_debug_if
xtsc_debug_if_cap
xtsc_request_if
xtsc_debug_if
m_debug_cap
xtsc_debug_if_cap
m_transactor xtsc_request_if_impl
xtsc_connection_interface m_transactor
xtsc_module
m_request_impl
xtsc_tlm2pin_memory_transactor
xtsc_resettable
xtsc_command_handler_interface
m_p_memory
xtsc_module_pin_base
m_p_initial_value_file
xtsc_script_file xtsc_memory_b
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
To cap an unconnected m_debug_ports port when the user can’t bind anything to it. For
example, when connecting to RTL and a DSO cannot be provided (see "dso_name").
Definition at line 1189 of file xtsc_tlm2pin_memory_transactor.h.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
The documentation for this class was generated from the following file:
• xtsc_tlm2pin_memory_transactor.h
Implementation of xtsc_debug_if.
#include <xtsc/xtsc_memory_pin.h>Inheritance diagram for xtsc_debug_if_impl:
xtsc_debug_if
xtsc_debug_if_impl
m_p_initial_value_file
xtsc_memory_pin
• bool is_connected ()
Return true if a port has bound to this implementation.
Protected Attributes
• xtsc_memory_pin & m_memory_pin
Our xtsc_memory_pin object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
Implementation of xtsc_debug_if.
Definition at line 916 of file xtsc_memory_pin.h.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
The documentation for this class was generated from the following file:
• xtsc_memory_pin.h
Implementation of xtsc_debug_if.
#include <xtsc/xtsc_pin2tlm_memory_transactor.h>Inheritance diagram for xtsc_-
debug_if_impl:
xtsc_debug_if
xtsc_debug_if_impl
xtsc_respond_if xtsc_pin2tlm_memory_transactor
m_pin2tlm m_respond_impl
xtsc_respond_if_impl
• bool is_connected ()
Return true if a port has been bound to this implementation.
Protected Attributes
• xtsc_pin2tlm_memory_transactor & m_pin2tlm
Our xtsc_pin2tlm_memory_transactor object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
Implementation of xtsc_debug_if.
Definition at line 771 of file xtsc_pin2tlm_memory_transactor.h.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
Receive requests for fast access information from the memory interface master.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
The documentation for this class was generated from the following file:
• xtsc_pin2tlm_memory_transactor.h
This struct is plain old data (POD) used to define each descriptor of a DMA request.
#include <xtsc/xtsc_dma_request.h>
Public Attributes
This struct is plain old data (POD) used to define each descriptor of a DMA request. DMA
descriptors are numbered using index N where N ranges from 1 to num_descriptors.
Each entry in this struct defines the value that should be written into its corresponding DMA
control register at the DMA registers base address plus the BYTE_OFFSET shown.
The DMA control register base address is defined by the xtsc_dma_engine_parms param-
eter "reg_base_address".
Note: If num_transfers is 1 then single READ|WRITE PIF requests are used to perform the
DMA. If num_transfers is 2|4|8|16 then BLOCK_READ|BLOCK_WRITE PIF requests are
used to perform the DMA.
Note: source_address8, destination_address8, and size8 must each be evenly divisible by
num_transfers ∗ (PIF bus width).
Note: source_address8 and destination_address8 must be physical (not virtual).
Note: Each byte address in a sequence of num_tranfers ∗ (PIF bus width) byte addresses
starting with source_address8 and ending with source_address8+size8-1 must map to the
same source device.
Note: Each byte address in a sequence of num_tranfers ∗ (PIF bus width) byte addresses
starting with destination_address8 and ending with destination_address8+size8-1 must
map to the same destination device.
See also:
xtsc_dma_request
xtsc_dma_engine
• xtsc_dma_request.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_memory
xtsc_dma_engine
m_p_active_request_info
request_info
m_request xtsc_request_if
xtsc_parms xtsc_memory_parms m_memory_parms
xtsc_fast_access_if
m_fast_access_object
xtsc_resettable
xtsc_module
xtsc_connection_interface
xtsc_respond_if
xtsc_command_handler_interface
xtsc_memory m_request_impl
m_p_memory
xtsc_request_if_impl
m_memory
xtsc_memory_b
m_p_initial_value_file
m_p_exclusive_script_stream
xtsc_script_file
m_p_script_stream xtsc_respond_if_impl
m_respond_impl
m_filtered_request m_dma
xtsc_dma_engine
m_p_block_read_response
m_filtered_response m_p_single_response
m_p_active_response m_p_block_write_response
xtsc_request m_p_request
m_stream_dumper
stream_dumper xtsc_response
m_stream_dumper
m_request
Classes
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Public Types
• typedef xtsc::xtsc_request xtsc_request
Dump count (max 255) descriptors starting at start_idx (wrap after 255 to 1) to the specified
ostream object.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• void dma_thread ()
DMA engine thread.
• void request_thread ()
Send read/write requests.
• void write_thread ()
• xtsc_request ∗ new_request ()
Get a new xtsc_request (from the pool).
Protected Attributes
• xtsc_respond_if_impl m_respond_impl
m_respond_export binds to this
• xtsc_request m_request
For sending non-overlapped DMA requests.
• xtsc::u32 m_reg_base_address
DMA registers base address ("reg_base_address" parameter).
• xtsc::u32 m_max_reads
See parameter "max_reads".
• xtsc::u32 m_max_writes
See parameter "max_writes".
• xtsc::u32 m_descriptor_delay
See parameter "descriptor_delay".
• xtsc::u8 m_read_priority
See parameter "read_priority".
• xtsc::u8 m_write_priority
See parameter "write_priority".
• bool m_overlap_descriptors
See parameter "overlap_descriptors".
• bool m_clear_notify_value
See parameter "clear_notify_value".
• bool m_reuse_tag
See parameter "reuse_tag".
• bool m_allow_size_zero
See parameter "allow_size_zero".
• bool m_start_at_index_1
• bool m_turbo
See parameter "turbo" and method set_turbo().
• bool m_big_endian
Determined by write to "go" byte.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• sc_core::sc_time m_posedge_offset_plus_one
m_posedge_offset plus m_clock_period
• bool m_busy
True if a DMA is in progress.
• sc_core::sc_event m_dma_thread_event
Used to notify dma_thread that "go" byte was written.
• sc_core::sc_event m_request_thread_event
Used to notify request_thread that an xtsc_request is ready to send out.
• sc_core::sc_event m_write_thread_event
Used to notify write_thread.
• sc_core::sc_event m_got_read_response_event
Notified when a read response is received.
• sc_core::sc_event m_no_reads_or_writes_event
• sc_core::sc_event m_single_response_available_event
Notified when READ or WRITE rsp is received (id=0x2|0x3).
• sc_core::sc_event m_block_read_response_available_event
Notified when a BLOCK_READ rsp is received (id=0x4).
• sc_core::sc_event m_block_write_response_available_event
Notified when a BLOCK_WRITE rsp is received (id=0x5).
• bool m_overlap_read_write
True if "max_reads" and "max_writes" are non-zero, else false.
• xtsc::u32 m_num_reads
Number of outstanding read transactions.
• xtsc::u32 m_num_writes
Number of outstanding write transactions.
• bool m_waiting_for_nacc
True if request_thread is waiting for RSP_NACC from downstream.
• bool m_request_got_nacc
True if request_thread request got RSP_NACC.
• xtsc::u32 m_num_block_transfers
Number of BLOCK_READ responses in currect descriptor.
• xtsc::u32 m_block_read_response_count
Number of BLOCK_READ responses received so far.
• xtsc::u32 m_block_write_sent_count
Number of BLOCK_WRITE requests sent so far.
• sc_core::sc_time m_nacc_wait_time
See "nacc_wait_time" in xtsc_dma_engine_parms.
• This DMA engine module implements a single DMA channel. If multiple DMA chan-
nels are desired, then instantiate this module multiple times and use xtsc_router and
xtsc_arbiter objects to connect everything together.
• By default the DMA engine module does non-overlapped data transfers; however, the
"max_reads" and "max_writes" parameters may be set to allow multiple, overlapped
reads and writes.
• By default the DMA engine module completes one descriptor before starting the
next; however, when overlapped reads and writes are enabled then the "overlapped_-
descriptors" parameter may be set to true to allow the next descriptor to be started
as soon as all the reads are queued for the previous descriptor.
Note: The throughput of the xtsc_dma_engine model is determined not only by its own
parameters such as "max_reads", "max_writes", and "overlapped_descriptors", but also
by the rest of the system. Some of the parameters of other XTSC models that can affect
throughput include the "∗_delay" and "request_fifo_depth" parameters of xtsc_memory and
"flexible_request_id" of xtsc_router.
Only the DMA register space is internally accessed by the xtsc_dma_engine module. If
you wish to use an xtsc_dma_engine instance to perform DMA data movements either
from or to itself, then the master port pair (m_request_port and m_respond_export) must
be externally connected to one of the slave port pairs (m_request_ports[i] and m_respond_-
exports[i], defined in the xtsc_memory base class). This can be done, for example, using
an xtsc_router at the output and an xtsc_arbiter on the input.
See xtsc_dma_request and xtsc_dma_descriptor for information on programming a DMA
request.
Here is a block diagram of an xtsc_dma_engine as it is used in the xtsc_dma_engine
example:
nb_write()
BInterrupt01
0xC0000000 req
0xC0000003 2 0 BInterrupt01
req req
pif 0x5FB80000
1
0x5FBBFFFF
0xC0001000 req xtsc_dma_engine req
0xC0001FFF 1 dma
xtsc_router xtsc_router
core0_router dma_router
xtsc_core dma_routing
core0 .tab
(main.out)
inbound_pif
xtsc_memory
dram0
req
dram0
ping pong
See also:
xtsc_dma_engine_parms
xtsc_memory
xtsc_dma_request
xtsc_dma_descriptor
xtsc_arbiter
xtsc_mmio
xtsc_router
Constructor.
Parameters:
module_name The SystemC module name.
dma_parms The xtsc_dma_engine and xtsc_memory contruction parameters.
See also:
xtsc_dma_engine_parms
xtsc_memory_parms
7.58.3.1 void execute (const std::string & cmd_line, const std::vector< std::string
> & words, const std::vector< std::string > & words_lc, std::ostream &
result) [virtual]
dump_descriptor <Index>
Call xtsc_dma_engine::dump_descriptor(<Index>).
Set whether or not nb_peek/nb_poke are used to perform the DMA data movement.
Parameters:
turbo If true, then nb_peek/nb_poke will be used to perform the DMA data movement.
If false, then READ|WRITE or BLOCK_READ| BLOCK_WRITE PIF requests will
be used (depending on the xtsc_dma_descriptor::num_transfers register);
deque to track when overlapped descriptor complete. There is one zero entry for each
non-last read request of the descriptor. The entry for the last read request of the descriptor
is the descriptor index to be written to the done_descriptor field.
Definition at line 539 of file xtsc_dma_engine.h.
The documentation for this class was generated from the following file:
• xtsc_dma_engine.h
xtsc_parms
xtsc_memory_parms
xtsc_dma_engine_parms
xtsc_parms
xtsc_memory_parms
xtsc_dma_engine_parms
Constructor parameters for a xtsc_dma_engine object. This class has the same contructor
parameters as an xtsc_memory_parms object plus the following additional ones.
"reg_base_address" u32 The base address of the DMA programming registers. The
BYTE_OFFSET specified in xtsc_dma_request and
xtsc_dma_descriptor documentation is refering to this
base address.
"clear_notify_value" bool If true, then when the DMA request completes, the
DMA request notify_address8 will be written twice in a
row. The first write will contain the value specified by
DMA request notify_value, and the second write will
contain the value 0. If false, then only the
notify_value will be written. The purpose of writing
the notify_address8 twice is to support edge-triggered
interrupts. If you are using a level-triggered
interrupt or if you are going to poll the
notify_address8 for the notify_value, then leave this
parameter at its default setting of false. If you are
using an edge-triggered interrupt, then change this
parameter to true.
Note: To support a "dma done" interrupt, an xtsc_mmio
device can be connected at the notify_address8 to
convert the memory-mapped write into an interrupt.
Caution: Use care when using interrupts to avoid a race
condition that can occur if the processor
interrupt level is not properly handled and the
target has code to check if an interrupt has
"overlap_descriptors" bool If false, then the DMA engine will wait for all data
movement to complete on one descriptor before starting
the next descriptor. If true, then the DMA engine will
move on to the next descriptor as soon as all reads for
the previous descriptor have been queued. This
parameter must be left at its default value of false if
"max_reads" and "max_writes" are 0.
Default = false.
"descriptor_delay" u32 If non-zero, then a delay for this many clock periods is
done at the start of each descriptor to model the time
it takes to retrieve the descriptor from memory. This
parameter is ignored when "turbo" is in effect.
Default = 0.
"reuse_tag" bool If true, each DMA write request will use the same tag as
its corresponding DMA read request. If false, a
different tag will be used.
Default = true.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
See also:
xtsc_memory_parms
xtsc_dma_request
xtsc_dma_request::notify_address8
xtsc_dma_descriptor
xtsc_dma_engine
xtsc_mmio
• xtsc_dma_engine.h
This struct is plain old data (POD) used to define a DMA request.
#include <xtsc/xtsc_dma_request.h>
Public Attributes
This struct is plain old data (POD) used to define a DMA request. The complete DMA
is specified by one xtsc_dma_request register set and one or more xtsc_dma_descriptor
register sets (as specified by the num_descriptors register). Each entry in this struct defines
the value that should be written into its corresponding DMA control register at the DMA
registers base address plus the BYTE_OFFSET shown.
Write a 32-bit value between 1 and 255 to the num_descriptors register to start the DMA.
The DMA control register base address is defined by the xtsc_dma_engine_parms param-
eter "reg_base_address".
Note: The num_descriptors register should be written last because the DMA engine will
start running as soon as the num_descriptors register is written with a non-zero value.
Note: The num_descriptors register should be written using a 32-bit write and the value
written should be between 1 and 255. The DMA engine detects big or little endian based
on the location in the 32-bit value of the non-zero byte.
See also:
xtsc_dma_descriptor
xtsc_dma_engine
xtsc::xtsc_fire_turboxim_event_id();
• xtsc_dma_request.h
• xtsc_exception.h
Private Attributes
• xtsc_address m_address
• xtsc_address m_block_address
• xtsc_address m_block_end_address
Constructor for a block that surrounds a target address This constructor will throw an ex-
ception if the target address is not contained in the block.
Parameters:
address target address
block_address first address in the block
block_end_address last address in the block
Parameters:
address target address
Method to remove an address range from a block. This method will throw an exception if
the local address is contained in the block to be removed.
Parameters:
block_address first address in the block to be removed
block_end_address last address in the block to be removed
local_address translated block address.
Returns:
true if any addresses were removed from the block
Parameters:
block the bounding block where the block address is the translation of this block’s
address.
Returns:
true if any addresses were removed from the block
Method to change the target address of a block. The block address and block_end_address
will be moved relative to the new target address
Parameters:
address the new target address
Query method to get the target address of this block. The target address will always be
inside the block
Returns:
the target address of this block
Returns:
the first address in the block
Returns:
the last address in the block
• xtsc_fast_access.h
• virtual ∼xtsc_fast_access_if ()
virtual destructor
Interface for fast access (turbo mode). In order to use fast access with callbacks for a
memory, the user designer should implement this interface.
When the core wants access to a memory for the first time, it will make a fast_access_-
request. The memory should then return an object that implements this interface.
After the request has been granted, memory accesses to the specified block of memory
will be made as a series of nb_fast_access_read and nb_fast_access_write requests.
Definition at line 41 of file xtsc_fast_access.h.
Parameters:
address Local memory address
size8 Number of bytes to read. size8 is a power 2 <= the size passed when the fast
access was requested.
dst memory to store the result. This buffer is byte-ordered.
Parameters:
address Local memory address
size8 Number of bytes to write. size8 is a power 2 <= the size passed when the fast
access request word size.
src value that should be written. This buffer is byte ordered.
The documentation for this class was generated from the following file:
• xtsc_fast_access.h
Class to hold request and response information to set up fast access data transfers.
#include <xtsc/xtsc_fast_access.h>Collaboration diagram for xtsc_fast_access_-
request:
m_response_block
m_access_if m_fast_access_revocation_if
m_result_block
xtsc_fast_access_request
Public Types
• enum access_type {
ACCESS_NONE,
ACCESS_DENY,
ACCESS_RAW,
ACCESS_CALLBACKS,
ACCESS_CUSTOM_CALLBACKS,
ACCESS_INTERFACE,
ACCESS_PEEKPOKE }
• typedef void(∗ xtsc_fast_access_read_callback )(void ∗, u32 ∗dst, xtsc_address
address, u32 size8)
• typedef void(∗ xtsc_fast_access_write_callback )(void ∗, xtsc_address address,
u32 size8, const u32 ∗src)
• typedef void(∗ xtsc_fast_access_custom_read_callback )(void ∗, u32 ∗dst, xtsc_-
address address, u32 size8, const u32 ∗custom_data)
• typedef void(∗ xtsc_fast_access_custom_write_callback )(void ∗, xtsc_address
address, u32 size8, const u32 ∗src, const u32 ∗custom_data)
• ∼xtsc_fast_access_request ()
Destructor for a request object.
• void deny_access ()
Method to deny fast access for the request.
• void allow_peek_poke_access ()
Method to allow fast access using the nb_peek and nb_poke methods Data transfers will
NOT bypass routers and arbitors with this method of fast access.
• void deny_read_access ()
Method to deny read access. Invoke after allowing access.
• void deny_write_access ()
Method to deny write access. Invoke after allowing access.
Protected Attributes
• sc_core::sc_object ∗ m_request_object
• xtsc_address m_request_address
• u32 m_request_word_size8
• bool m_request_big_endian
• xtsc_address m_translated_request_address
• xtsc_fast_access_revocation_if ∗ m_fast_access_revocation_if
• access_type m_access_type
• xtsc_fast_access_block m_response_block
• xtsc_fast_access_block m_result_block
• bool m_is_readable
• bool m_is_writable
• xtsc_raw_block ∗ m_raw_block
• xtsc_fast_access_callbacks ∗ m_access_callbacks
• xtsc_fast_access_custom_callbacks ∗ m_access_custom_callbacks
• xtsc_fast_access_if ∗ m_access_if
Class to hold request and response information to set up fast access data transfers. A
fast access request is issued when a core first needs the data at a memory address. The
request includes the original request address and the endianness and word size of the
core.
Routers and arbiters will translate the request address and forward it. The translated ad-
dress can be queried with get_translated_request_address()
Terminal devices (for example, memories) should invoke one of deny_access() allow_raw_-
access() allow_callbacks_access() allow_custom_callbacks_access() allow_peek_poke_-
access() allow_interface_access()
If the permissions are only valid for a subset of the range that the device maps, use
restrict_to_block() or remove_address_range().
When allowing only read or write access use deny_read_access() and deny_write_-
access() after the appropriate allow_∗ method is invoked.
Parameters:
requestor A reference to the object that initiated this request.
request_address The original request address
request_word_size The maximum word size of a fast access data transfer resulting
from this request.
request_big_endian The endianness of the requestor.
Use the result of a fast access request to read data from the target.
Parameters:
request_if the interface for issuing an nb_peek request if the peek/poke method is
used.
address the address (in the request address space) must be aligned to size.
size a power of 2 no greater than the request word size
dst a byte-ordered buffer of size bytes where the response will be written
Returns:
false if the access cannot be performed because: size is not a power of 2 size is
greater than the request word size address is not aligned to size. the target denies
read access. the address is not in the range handled by the target.
Use the result of a fast access request to read data from the target.
Parameters:
request_if the interface for issuing an nb_poke request if the peek/poke method is
used.
address the address (in the request address space) must be aligned to size.
size a power of 2 no greater than the request word size
src a byte-ordered buffer of size bytes to write into the target.
Returns:
false if the access cannot be performed because: size is not a power of 2 size is
greater than the request word size address is not aligned to size. the target denies
write access. the address is not in the range handled by the target.
Method to translate a request address. This should be used by a router before forwarding
a fast access request
Method to allow direct memory access for the request. This method will throw an exception
if the difference between the original request address and the translated request address
is not divisible by 4. It will also throw an exception if (swizzle & 3) is not 0 or 3.
Parameters:
block_start The first address that is allowed fast access.
raw_data The host memory address for memory that includes the first stored word of
block_start
swizzle 0 for memories stored in byte order. See documentation for the swizzle of
more efficent orders when simulating a big endian host on a little endian target.
Method to allow fast access through an xtsc_fast_access_if object. Data transfers will
bypass routers and arbitors with this method of fast access.
Parameters:
access_if The object that implements nb_fast_access_read and nb_fast_access_-
write
Method to allow direct function callbacks for fast access. This can be faster than interface
access when the target and host endianness differ. However, the functions expect data in
a target-related order and must be implemented with care. The interface access uses this
method, but convert the data into a byte-ordered buffer to make it easier to use.
Parameters:
callback_arg Argument to pass to the read and write callbacks when they are in-
voked. This should be a pointer to a persistent object.
read_callback The function to invoke to read data from a memory
write_callback The function to invoke to write data to a memory.
Method to allow direct function callbacks for fast access with custom data.
Parameters:
callback_arg Argument to pass to the read and write custom callbacks when they are
invoked.
custom_read_callback Function to invoke to read data from a memory.
custom_write_callback Function to invoke to write data to a memory.
Method to remove a range of addresses from a fast address response. It may be used
when a device only allows fast access on a subset of its address space or by routers.
Parameters:
local_address translated request/response address. In the device allowing fast ac-
cess, this is translated_request_address from the request.
start_address first address to remove
end_address last address to remove
Method to remove the range of addresses from a request that are outside of the specified
block.
Parameters:
min_block block that specifies a range from block_address to block_end_address
that should not be removed from the response. The address of the min_block
is the translated_request_address from the request.
Returns:
response access type.
Returns:
response access type as a C-string.
Returns:
true if the response allows write access
Returns:
true if the response allows read access
Get the original response block. For all but the raw access, this block will contain all of
memory. For any response the target address of the block will be the translated request
address.
Returns:
block initially specified in the allow or deny method invoked on the request.
Get the result block. The target address for the block is the original request address. The
block start and block end are the ones resulting after all removals and restrictions have
been applied.
Returns:
the fast access result block
Get the result block translated to a local_address. The local_address will usually be the
translated_request_address when the nb_fast_access method is invoked.
Parameters:
local_address the local translation of the original request address.
Returns:
the translated fast access result block
Returns:
the translated request address.
For raw access, get the raw pointer address associated with the first word of the result
block. This method will throw an exception if the access type is not ACCESS_RAW.
Returns:
the raw pointer address of the first word of the result block.
For raw access, get the raw pointer address associated with the first word of the response
block. This method will throw an exception if the access type is not ACCESS_RAW.
Returns:
the raw pointer address of the first word of the response block.
For raw access, get the swizzle that defines the memory layout. This method will throw an
exception if the access type is not ACCESS_RAW.
Returns:
the swizzle that defines the memory layout.
For interface access, get the interface object. This method will throw an exception if the
access type is not ACCESS_INTERFACE.
Returns:
the interface object for INTERFACE access
For callback access, get the read callback function. This method will throw an exception if
the access type is not ACCESS_CALLBACKS.
Returns:
the read callback function for CALLBACK access
For callback access, get the write callback function. This method will throw an exception if
the access type is not ACCESS_CALLBACKS.
Returns:
the write callback function for CALLBACK access
For callback access or custom callback access, get the callback argument. This method
will throw an exception if the access type is neither ACCESS_CALLBACKS nor ACCESS_-
CUSTOM_CALLBACKS.
Returns:
the callback argument for callback access or custom callback access.
For custom callback access, get the custom read callback function. This method will throw
an exception if the access type is not ACCESS_CUSTOM_CALLBACKS.
Returns:
the custom read callback function for custom callback access
For custom callback access, get the custom write callback function. This method will throw
an exception if the access type is not ACCESS_CUSTOM_CALLBACKS.
Returns:
the custom write callback function for custom callback access
The documentation for this class was generated from the following file:
• xtsc_fast_access.h
• virtual ∼xtsc_fast_access_revocation_if ()
virtual destructor
This method revokes any previously-granted fast access requests. The callee is allowed to
re-request fast access by subsequently re-calling the nb_fast_access() method.
The documentation for this class was generated from the following file:
• xtsc_fast_access.h
The xtsc_filter class, in conjunction with the xtsc_filter_XXX() and xtsc_event_XXX() meth-
ods and the XTSC command facility, help support the system control and debug framework
in XTSC.
#include <xtsc/xtsc.h>
Private Attributes
• std::string m_kind
The kind of xtsc_filter.
• std::string m_name
The unique name of this xtsc_filter.
• xtsc_filter_table m_key_value_pairs
The key-value pairs specified by this filter. Both keys and values are strings.
Friends
The xtsc_filter class, in conjunction with the xtsc_filter_XXX() and xtsc_event_XXX() meth-
ods and the XTSC command facility, help support the system control and debug framework
in XTSC. Typically an xtsc_filter is used to define a pattern that is applied to the payloads
being passed by one of the Xtensa TLM interfaces method calls (for example, nb_request(),
nb_respond(), nb_peek, and nb_poke()). If a payload matches the filter then an sc_event
associated with that application of the xtsc_filter is notified.
Note: The filter does NOT determine whether of not the payload is allowed through the
interface (the payload always goes through). The filter only determines whether or not the
associated sc_event is notified.
The basic idea is that something in the simulation will be waiting on the associated sc_-
event. Usually, this would be either the XTSC command prompt, the lua command prompt,
or one of the lua script file threads, but it could also be any other SystemC thread or method
process in the simulation. If either of the command prompts is waiting on the sc_event, then
when it is notified, the user is presented with the command prompt and can then use any
of the XTSC commands to probe the system or issue a breakpoint_interrupt to the ISS to
allow probing the system from xt-gdb or Xtensa Xplorer.
The xtsc_filter class is a container for a table of key-value pairs (xtsc_filter_table). An xtsc_-
filter instance must be of a registered filter kind. The kind of filter defines what keys are
allowed. Filter kinds must be registered with XTSC using xtsc_filter_kind_register().
The xtsc_filter kinds currently supported by the XTSC libraries and their allowed keys are:
route_id* route_id*
size* size* size* size*
status
tag* tag*
type
Note: Filter kinds starting with "xtsc" are reserved to the XTSC libraries.
In the above list an asterisk (∗) after a key indicates the key supports values with ranges.
This also indicates that the value (or value range) will be converted to a number (or a pair
of numbers) and a numeric comparision will be done with the payload item identified by the
key.
Key values are strings and the xtsc_filter kinds listed above all support the key value being
a comma-separated list of values. The comma is taken as a logical OR for all the above
keys except buffer_not where it is taken as a logical AND.
For keys listed above without an asterisk, the following special considerations or allowed
values apply:
buffer: A string comparison is done with the buffer contents as they would be shown in
the xtsc.log file. The period is a wildcard that means one don’t-care character. Each byte
of the payload buffer is specified using 3 characters (a triplet) in the buffer value. The first
character of the triplet specifies the high nibble of the payload byte, the second character of
the triplet specifies the low nibble of the payload byte, and the third character of the triplet
must always be the period wildcard. If desired either or both of the first two characters of a
triplet can also be periods. The length of the buffer value must be exactly 3 times the size
of the buffer in the payload. Multiple comma-separated buffer values are allowed and each
comma is interpreted as a logical OR. For example, to match the 1st, 2nd, and 4th byte
(and ignore the 3rd byte) of a 4 byte payload that shows in the xtsc.log file as:
00 01 02 03
00.01....03.
In the context of the XTSC command prompt, it would look something like:
buffer_not: Same rules as shown for buffer above except that multiple comma-separated
values imply a logical AND between them instead of a logical OR.
exclusive: 0 | 1
instruction_fetch: 0 | 1
./xtsc_router -xtsc_command_prompt=true
1) cmd: xtsc xtsc_filter_create xtsc_request filt1 address=0x60000000-0x6FFFFFFF
type=WRITE,BLOCK_WRITE
2) cmd: router watchfilter_add filt1 xtsc_command_prompt_event
1
3) cmd: c
44708.3/623:
4) cmd: router dump_filtered_request
tag=4162 pc=0x40000101 WRITE* [0x6000a47c/4/0x000f/0/01/0x4b0]= 9c 81 00 60
5) cmd: core0 dasm pc
0x40000103: l32r a4,0x4000002c
6) cmd: core0 enable_debug 1 0
core0: SOCKET:20000
NOTE core0 - 44708.3/623: Debug info: port=20000 wait=true (target/router_test.out)
7) cmd: c
44732.3/706:
8) cmd: core0 breakpoint_interrupt
9) cmd: sc wait 1
44733.3/709:
10) cmd: router watchfilter_remove *
1
11) cmd: c
See also:
xtsc_filter_table
xtsc_filter_kind_register
xtsc_filter_kind_dump
xtsc_filter_exists
xtsc_filter_create
xtsc_filter_dump
xtsc_filter_get
xtsc_filter_apply_xtsc_peek
xtsc_filter_apply_xtsc_poke
xtsc_filter_apply_xtsc_request
xtsc_filter_apply_xtsc_response
xtsc_get_next_watchfilter_number()
xtsc_event_register
xtsc_event_exists
xtsc_event_get
xtsc_event_dump
xtsc_component::xtsc_router::watchfilter_add
xtsc_component::xtsc_router::watchfilter_dump
xtsc_component::xtsc_router::watchfilter_remove
xtsc_component::xtsc_router::execute command dump_filtered_request
xtsc_component::xtsc_router::execute command dump_filtered_response
xtsc_initialize_parms parameter "xtsc_command_prompt"
xtsc_initialize_parms parameter "lua_command_prompt"
xtsc_initialize_parms parameter "lua_script_files"
Method to create an xtsc_filter of the specified kind with the specified name. This method
creates and returns an xtsc_filter of the specified kind and with the specified name and
key-value pairs. An exception is thrown if kind is not registered, if name already exists,
or if key_value_pair contains a key which was not specified when the xtsc_filter kind was
registered.
Parameters:
kind The kind of the xtsc_filter object. This kind must have already been registered
with XTSC.
name The name of the xtsc_filter object. No other xtsc_filter (even of a different kind)
may have this same name. Filter names may be formed using the same character
requirements as C/C++ identifiers.
key_value_pairs The table (vector) of key-value pairs. Both keys and values are
strings.
See also:
xtsc_filter_kind_register
xtsc_filter
xtsc_filter_dump
xtsc_filter_exists
xtsc_filter_get
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_parms
xtsc_initialize_parms
xtsc_parms
xtsc_initialize_parms
See also:
xtsc_initialize
xtsc_parms
xtsc_core_parms
Parameters:
text_logging_config_file The value for the "text_logging_config_file" parameter.
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_lookup
xtsc_connection_interface
xtsc_module
xtsc_lookup_if
xtsc_resettable
xtsc_lookup m_lookup_impl
m_file
xtsc_script_file
m_lookup_parms
xtsc_parms xtsc_lookup_parms
Classes
• class xtsc_lookup_if_impl
Implementation of xtsc_lookup_if.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void end_of_simulation ()
• log4xtensa::TextLogger & get_text_logger ()
Get the TextLogger for this component (e.g. to adjust its log level).
Public Attributes
• sc_core::sc_export< xtsc::xtsc_lookup_if > m_lookup
Driver binds to this.
• void compute_delays ()
Common method to compute/re-compute time delays.
• bool pipeline_full ()
Return true if the pipeline is full.
• void do_lookup ()
Do the lookup.
Protected Attributes
• xtsc_lookup_if_impl m_lookup_impl
m_lookup binds to this
• xtsc_lookup_parms m_lookup_parms
Copy of xtsc_lookup_parms.
• bool m_ram
True if lookup is a RAM, otherwise false.
• bool m_override_lookup
See the "override_lookup" parameter.
• xtsc::u32 m_address_bit_width
The lookup address bit width.
• xtsc::u32 m_ram_address_bits
The RAM address bit width (if m_ram).
• xtsc::u32 m_data_bit_width
The lookup data bit width.
• bool m_active_high_strobe
The write strobe is active high.
• xtsc::u32 m_write_strobe_bit
The bit position in the lookup address of the write strobe.
• xtsc::u32 m_ram_address_lsb
The starting bit position in the lookup address of the RAM address.
• xtsc::u32 m_ram_address_msb
The ending bit position in the lookup address of the RAM address.
• xtsc::u32 m_write_data_lsb
The starting bit position in the lookup address of the write data.
• xtsc::u32 m_write_data_msb
The ending bit position in the lookup address of the write data.
• bool m_has_ram_write_enables
true if "ram_write_enables" is specified
• bool m_has_ready
True if lookup has a ready signal.
• xtsc::u32 m_latency
Latency from request/ready to valid data.
• xtsc::u32 m_pipeline_depth
Pipeline depth.
• bool m_enforce_latency
Check timing of nb_get_data() call.
• xtsc::u32 m_delay
Default delay from request to ready as cycles.
• xtsc::u32 m_delay_next
Delay to apply after this lookup.
• bool m_ready_enable
Enable as set by set_ready_enable(). Initially true.
• bool m_ready
The ready signal (must be AND’d with m_ready_enable).
• sc_core::sc_time m_ready_net_time
• sc_dt::sc_unsigned m_default_data
Data to use if address is not in lookup table.
• std::string m_lookup_table
Name of "lookup_table" file.
• std::string m_lua_data_function
From <LuaDataFunction> in lua_function line of "lookup_table" file.
• std::string m_lua_delay_function
From <LuaDelayFunction> in lua_function line of "lookup_table" file.
• bool m_lua_function
True if there was a lua_function line in "lookup_table" file.
• bool m_file_logged
True if contents of m_file have been logged.
• xtsc::xtsc_script_file ∗ m_file
The lookup_file.
• std::string m_line
Current line from m_file.
• xtsc::u32 m_line_count
Current line number from m_file.
• sc_dt::sc_unsigned m_data
Current request data.
• sc_dt::sc_unsigned m_data_temp
• sc_dt::sc_unsigned m_old_data
Data previously at current request address.
• sc_dt::sc_unsigned m_poke_data
Buffer for poke().
• sc_dt::sc_unsigned m_address
Current request address.
• bool m_write
True if lookup is a write, false if lookup is a read.
• sc_core::sc_event m_lookup_ready_event
Notified when lookup might be ready (i.e. "ask me again").
• sc_dt::sc_unsigned m_zero
Constant 0.
• sc_dt::sc_unsigned m_one
Constant 1.
• sc_core::sc_time m_time_resolution
SystemC time resolution.
• sc_core::sc_time m_clock_period
This module’s clock period.
• xtsc::u64 m_clock_period_value
Clock period as u64.
• bool m_has_posedge_offset
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_trace_file ∗ m_p_trace_file
From "vcd_handle" parameter.
• xtsc::u32 m_nb_send_address_cnt
Count nb_send_address() calls for vcd tracing.
• xtsc::u32 m_nb_is_ready_cnt
Count nb_is_ready() calls for vcd tracing.
• xtsc::u32 m_nb_get_data_cnt
Count nb_get_data() calls for vcd tracing.
• sc_dt::sc_unsigned m_address_trace
For vcd tracing.
• sc_dt::sc_unsigned m_data_trace
For vcd tracing.
• sc_dt::sc_unsigned ∗ m_p_ram_addr
RAM address unmodified.
• sc_dt::sc_unsigned ∗ m_p_effective_ram_addr
RAM address with enable bits (if any) forced to 0.
• bool m_dump_after_sim
Lookup contents are dumped to log after simulation if set to True.
An TIE lookup implementation that connects using TLM-level ports. Example XTSC module
implementing the xtsc::xtsc_lookup_if interface. This module can be configured to function
as a ROM-based lookup table which is initialized from a file or to function as a custom RAM.
In the latter case the TIE address signal is comprised of three bit fields: the RAM address,
the write data, and a write strobe.
This module can also be used to model a computed lookup (that is, a non-ROM based
lookup) using a Lua function. When modeling a lookup device with a ready signal, each
possible lookup address can have a custom delay associated with it that specifies how
long the ready signal is deasserted after a lookup to that particular address (so the delay
potentially affects the next lookup, not the current lookup). Note: This delay behavior is a
change from the RC-2010.1 and earlier behavior.
Alternatively, this class can be sub-classes to provide an arbitrary lookup function (i.e. not
ROM based) by overriding the get_data_from_address() virtual method.
Here is a block diagram of the system used in the xtsc_lookup example (memory not
shown):
nb_send_address()
nb_is_ready()
nb_get_data()
xtsc_core core0
xtsc_lookup tbl
(lookup_test.out)
lut.rom
core0.get_lookup("lut")
(tbl.m_lookup)
Here is the code to connect the system using the xtsc::xtsc_connect() method:
And here is the code to connect the system using manual SystemC port binding:
core0.get_request_port("pif")(*core0_pif.m_request_exports[0]);
(*core0_pif.m_respond_ports[0])(core0.get_respond_export("pif"));
core0.get_lookup("lut")(tbl.m_lookup);
See also:
xtsc_lookup_parms
xtsc::xtsc_lookup_if
xtsc::xtsc_core::How_to_do_port_binding
Parameters:
module_name Name of the xtsc_lookup sc_module.
lookup_parms The remaining parameters for construction.
See also:
xtsc_lookup_parms
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
Method to set or clear the m_ready_enable flag. When the m_ready_enable flag is false,
the nb_is_ready() method will always return false. When the m_ready_enable flag is true,
the nb_is_ready() method will return true or false depending on the pipeline and on the
delay.
Warning: This method should not be called in the same cycle that nb_send_address() is
called.
Note: The use of delay is deprecated. See the Deprecation Notice associated with "delay"
and "lookup_table" in xtsc_lookup_parms.
Parameters:
ready_enable Value of the m_ready_enable flag.
See also:
get_ready_enable().
See also:
set_ready_enable().
7.68.3.4 void execute (const std::string & cmd_line, const std::vector< std::string
> & words, const std::vector< std::string > & words_lc, std::ostream &
result) [virtual]
dump
Return the os buffer from calling xtsc_lookup::dump(os).
get_ready_enable
Return the value from calling xtsc_lookup::get_ready_enable().
peek <Address>
Call xtsc_lookup::peek(<Address>).
reset [<Hard>]
Call xtsc_lookup::reset(<Hard>). Where <Hard> is 0|1 (default 0).
set_ready_enable <ReadyEnable>
Call xtsc_lookup::set_ready_enable(<ReadyEnable>).
Implements xtsc_command_handler_interface.
Connect to a xtsc_core. This method connects this xtsc_lookup to the named lookup inter-
face of the specified xtsc_core.
Parameters:
core The xtsc_core to connect to.
lookup_name Lookup name as it appears in the user’s TIE code after the lookup
keyword. This name must NOT begin with the "TIE_" prefix.
Parameters:
driver The xtsc_lookup_driver to connect to.
Return the value stored at the specified address. If no value is stored at address, then an
empty string is returned.
Parameters:
address The address to poke. It must be in hex with a leading ’0x’ and contain
the number of nibbles implied by the "address_bit_width" and "data_bit_width"
(if "ram" is true) parameters.
7.68.3.8 void poke (const std::string & address, const std::string & data)
Parameters:
address The address to poke. It must be in hex with a leading ’0x’ and contain
the number of nibbles implied by the "address_bit_width" and "data_bit_width"
(if "ram" is true) parameters.
value The value to store (must be convertible to an sc_unsigned).
Get the data given the address. Sub-classes can override this virtual method to provide
their own way of determining the data (m_data) given a address (m_address) when using
an exhaustive mapping of addresses-to-data is undesirable.
Note: The input to this method is the m_address member variable and the output of this
method is the m_data member variable.
For example, the following code implements an xtsc_lookup sub-class that computes a
data value equal to double the address:
The documentation for this class was generated from the following file:
• xtsc_lookup.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_lookup_if
xtsc_lookup_driver
m_ready_floating
m_data_floating
m_test_vector_stream
m_req_floating
m_address_floating
xtsc_lookup_driver
• SC_HAS_PROCESS (xtsc_lookup_driver)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
Public Attributes
• void end_of_elaboration ()
Method to check interface width.
• bool nb_is_ready ()
This method is called by the TIE lookup client when it needs to determine if the TIE lookup
request (sent using the nb_send_address() method) was accepted.
• sc_dt::sc_unsigned nb_get_data ()
This method is called to get the TIE lookup response data.
• xtsc::u32 nb_get_address_bit_width ()
Get the address bit width that the lookup implementation expects.
• xtsc::u32 nb_get_data_bit_width ()
Get the data bit width that the lookup implementation will return.
Protected Attributes
• log4xtensa::TextLogger & m_text
For logging.
• bool m_has_ready
From "has_ready" paramter.
• xtsc::xtsc_script_file m_test_vector_stream
Script file from "script_file" parameter.
• std::string m_script_file
Script file name from "script_file" parameter.
• std::string m_line
Current line from "script_file".
• xtsc::u32 m_line_count
Current line number from "script_file".
• sc_core::sc_time m_latency
From "latency" parameter.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
From "clock_period" parameter.
• sc_core::sc_time m_poll_ready_delay
From "poll_ready_delay" parameter.
• sc_core::sc_time m_delay_after_ready
m_clock_period - m_poll_ready_delay
• sc_core::sc_time m_notify_delay
m_latency - m_poll_ready_delay
• sc_core::sc_time m_time_resolution
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_sample_phase
From "sample_phase" parameter.
• sc_core::sc_time m_deassert_delay
From "deassert_delay" parameter.
• sc_core::sc_time m_timeout
From <timeout> in current line from "script_file".
• bool m_no_timeout
True if <timeout> was not specified in "script_file" for this lookup.
• xtsc::u32 m_address_width1
From "address_bit_width" parameter.
• xtsc::u32 m_data_width1
From "data_bit_width" parameter.
• sc_dt::sc_unsigned m_lookup_address
From <address> in current line from "script_file".
• sc_dt::sc_bv_base m_lookup_address_bv
From <address> in current line from "script_file".
• bool m_pin_level
From "pin_level" parameter.
• sc_core::sc_trace_file ∗ m_p_trace_file
From "vcd_handle" parameter.
• sc_dt::sc_unsigned m_zero
Constant 0.
• sc_dt::sc_unsigned m_one
Constant 1.
• sc_dt::sc_bv_base m_zero_bv
Constant 0.
• sc_dt::sc_bv_base m_one_bv
Constant 1.
• sc_core::sc_event m_next_request
To notify script_thread to continue.
• sc_core::sc_event m_assert
To notify request_thread to assert lookup request.
• sc_core::sc_event m_deassert
To notify request_thread to deassert lookup request.
• sc_core::sc_event_queue m_sample_data
To notify sample_data_thread to sample the data.
• xtsc::xtsc_signal_sc_bv_base_floating m_address_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_req_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_data_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_ready_floating
A scripted driver for a lookup. This XTSC device implements a lookup driver that reads an
input file ("script_file") to determine when and what lookup requests to send to a lookup
device.
This device provides a simple means to deliver test transactions to a lookup at the TLM-
level (such as xtsc_lookup) or at the pin-level (such as xtsc_lookup_pin). To use pin-level
connections, you must set the "pin_level" parameter to true.
Here is a block diagram of an xtsc_lookup_driver as it is used in the driver example:
nb_send_address()
nb_is_ready()
nb_get_data()
xtsc_lookup_driver driver xtsc_lookup lut
driver.vec lut.rom
driver.m_lookup lut.m_lookup
See also:
xtsc_lookup_driver_parms
xtsc::xtsc_lookup_if
Parameters:
module_name Name of the xtsc_lookup_driver sc_module.
driver_parms The remaining parameters for construction.
See also:
xtsc_lookup_driver_parms
This method is called by the TIE lookup client to request that a lookup be performed using
the specified address. For the typical case of an xtsc_core TIE lookup client, this method is
called on each clock cycle in which the Xtensa core is driving the TIE_xxx_Out_Req signal
(where xxx is the lookup name in the user TIE code). If the "rdy" keyword was specified in
the user TIE code, then this method will be re-called by xtsc_core on each clock cycle after
nb_is_ready() returns false (unless the instruction performing the lookup is killed).
Parameters:
address The sc_unsigned object containing the lookup address. For an xtsc_core
TIE lookup client, this parameter corresponds to the TIE_xxx_Out signal, where
xxx is the lookup name in the user TIE code.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_lookup_if.
Definition at line 421 of file xtsc_lookup_driver.h.
This method is called by the TIE lookup client when it needs to determine if the TIE lookup
request (sent using the nb_send_address() method) was accepted. For the typical case
of an xtsc_core TIE lookup client, this method will not be called unless the lookup section
of the user TIE code specified the "rdy" keyword. If the "rdy" keyword was specified in the
user TIE code, then the TIE lookup implementation must override this virtual method.
Returns:
true if the TIE lookup request was accepted.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Reimplemented from xtsc_lookup_if.
Definition at line 422 of file xtsc_lookup_driver.h.
This method is called to get the TIE lookup response data. This method must be called
exactly one time for each nb_is_ready() call that returns true.
For hardware configurations where the nb_is_ready() call is not used (e.g. an Xtensa TIE
port defined without the "rdy" keyword), this method must be called exactly one time for
each nb_send_address() call.
For the typical case of an xtsc_core TIE lookup client, this method is called after a latency
of <use_stage> minus <def_stage> clock cycles, where <use_stage> and <def_stage>
are the values specified in the lookup section of the user TIE code. If the "rdy" keyword
was specified in the user TIE code, then the latency starts on the clock cycle in which nb_-
is_ready() returns true. If the "rdy" keyword was not specified, then the latency starts on
the clock cycle when nb_send_address() is called.
Returns:
The sc_unsigned object containing the response data. For an xtsc_core TIE lookup
client, this data corresponds to the TIE_xxx_In signal, where xxx is the lookup name
in the user TIE code.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_lookup_if.
Definition at line 423 of file xtsc_lookup_driver.h.
Get the address bit width that the lookup implementation expects. This method allows the
TIE lookup client to confirm that the implementation is using the correct size for the lookup
address. For an xtsc_core TIE lookup client, the data returned should be the width of the
TIE_xxx_Out signal as specified by <output_width> in the "lookup xxx" section of the user
TIE code.
Implements xtsc_lookup_if.
Definition at line 424 of file xtsc_lookup_driver.h.
Get the data bit width that the lookup implementation will return. This method allows the TIE
lookup client to confirm that the implementation is using the correct size for the response
data. For an xtsc_core TIE lookup client, the data returned should be the width of the TIE_-
xxx_In signal as specified by <input_width> in the the "lookup xxx" section of the user TIE
code.
Implements xtsc_lookup_if.
Definition at line 425 of file xtsc_lookup_driver.h.
The documentation for this class was generated from the following file:
• xtsc_lookup_driver.h
xtsc_parms
xtsc_lookup_driver_parms
xtsc_parms
xtsc_lookup_driver_parms
Constructor parameters for a xtsc_lookup_driver object. This class contains the constructor
parameters for a xtsc_lookup_driver object.
"has_ready" bool Specifies whether the lookup device has a ready signal.
This corresponds to the rdy keyword in the user's TIE
code for the lookup.
"script_file" char* The file to read the test vector commands from. Each
command occupies one line in the file. Valid command
formats are shown below (the first format shows a lookup
transaction command):
Note: The "poll_ready_delay" parameter was introduced after (not including) RC-2010.1
to allow the driver to better model xtsc_core behavior. To get the behavior of
RC-2010.1 and earlier, set "poll_ready_delay" to 0.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
See also:
xtsc_lookup_driver
xtsc::xtsc_parms
xtsc::xtsc_script_file
Parameters:
address_bit_width Width of request address in bits.
data_bit_width Width of response data in bits.
has_ready Specifies whether or not the lookup device has a ready signal (corre-
sponds to the rdy keyword in the user’s TIE code for the lookup).
script_file The file name to read the xtsc::xtsc_request test vectors from.
• xtsc_lookup_driver.h
xtsc_rer_lookup_if_impl
xtsc_wer_lookup_if_impl
xtsc_lookup_if
xtsc_lookup_if_impl
xtsc_lookup_driver
Interface for connecting a TIE lookup client to an implementation. This interface is for
connecting between a TIE lookup client (typically an xtsc_core) and a TIE lookup imple-
mentation provided by the user. The TIE lookup client has an sc_port<xtsc_lookup_if>
used to connect to the TIE lookup implementation which inherits from this interface.
Note: The methods of xtsc_lookup_if are all non-blocking in the OSCI TLM sense. That is,
they must NEVER call wait() either directly or indirectly. The "nb_" method prefix stands for
Non-Blocking.
See also:
xtsc_core::How_to_do_port_binding
xtsc_core::get_lookup
xtsc_component::xtsc_lookup
This method is called by the TIE lookup client to request that a lookup be performed using
the specified address. For the typical case of an xtsc_core TIE lookup client, this method is
called on each clock cycle in which the Xtensa core is driving the TIE_xxx_Out_Req signal
(where xxx is the lookup name in the user TIE code). If the "rdy" keyword was specified in
the user TIE code, then this method will be re-called by xtsc_core on each clock cycle after
nb_is_ready() returns false (unless the instruction performing the lookup is killed).
Parameters:
address The sc_unsigned object containing the lookup address. For an xtsc_core
TIE lookup client, this parameter corresponds to the TIE_xxx_Out signal, where
xxx is the lookup name in the user TIE code.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_lookup_if_impl, xtsc_lookup_driver, xtsc_rer_lookup_if_impl, and
xtsc_wer_lookup_if_impl.
This method is called by the TIE lookup client when it needs to determine if the TIE lookup
request (sent using the nb_send_address() method) was accepted. For the typical case
of an xtsc_core TIE lookup client, this method will not be called unless the lookup section
of the user TIE code specified the "rdy" keyword. If the "rdy" keyword was specified in the
user TIE code, then the TIE lookup implementation must override this virtual method.
Returns:
true if the TIE lookup request was accepted.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Reimplemented in xtsc_lookup_if_impl, xtsc_lookup_driver, xtsc_rer_lookup_if_impl, and
xtsc_wer_lookup_if_impl.
Definition at line 81 of file xtsc_lookup_if.h.
This method is called to get the TIE lookup response data. This method must be called
exactly one time for each nb_is_ready() call that returns true.
For hardware configurations where the nb_is_ready() call is not used (e.g. an Xtensa TIE
port defined without the "rdy" keyword), this method must be called exactly one time for
each nb_send_address() call.
For the typical case of an xtsc_core TIE lookup client, this method is called after a latency
of <use_stage> minus <def_stage> clock cycles, where <use_stage> and <def_stage>
are the values specified in the lookup section of the user TIE code. If the "rdy" keyword
was specified in the user TIE code, then the latency starts on the clock cycle in which nb_-
is_ready() returns true. If the "rdy" keyword was not specified, then the latency starts on
the clock cycle when nb_send_address() is called.
Returns:
The sc_unsigned object containing the response data. For an xtsc_core TIE lookup
client, this data corresponds to the TIE_xxx_In signal, where xxx is the lookup name
in the user TIE code.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_lookup_if_impl, xtsc_lookup_driver, xtsc_rer_lookup_if_impl, and
xtsc_wer_lookup_if_impl.
Get the address bit width that the lookup implementation expects. This method allows the
TIE lookup client to confirm that the implementation is using the correct size for the lookup
address. For an xtsc_core TIE lookup client, the data returned should be the width of the
TIE_xxx_Out signal as specified by <output_width> in the "lookup xxx" section of the user
TIE code.
Implemented in xtsc_lookup_if_impl, xtsc_lookup_driver, xtsc_rer_lookup_if_impl, and
xtsc_wer_lookup_if_impl.
Get the data bit width that the lookup implementation will return. This method allows the TIE
lookup client to confirm that the implementation is using the correct size for the response
data. For an xtsc_core TIE lookup client, the data returned should be the width of the TIE_-
xxx_In signal as specified by <input_width> in the the "lookup xxx" section of the user TIE
code.
Implemented in xtsc_lookup_if_impl, xtsc_lookup_driver, xtsc_rer_lookup_if_impl, and
xtsc_wer_lookup_if_impl.
Return the lookup-ready event. Clients can call this method to get a reference to an event
that will be notified when the lookup transitions from not-ready to ready.
Sub-classes must override this method and return their lookup-ready event. If the lookup
doesn’t have a ready then the sub-class should return an event that is never notified.
Reimplemented in xtsc_lookup_if_impl, xtsc_rer_lookup_if_impl, and xtsc_wer_lookup_if_-
impl.
Definition at line 145 of file xtsc_lookup_if.h.
The documentation for this class was generated from the following file:
• xtsc_lookup_if.h
Implementation of xtsc_lookup_if.
#include <xtsc/xtsc_lookup.h>Inheritance diagram for xtsc_lookup_if_impl:
xtsc_lookup_if
xtsc_lookup_if_impl
xtsc_lookup
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_lookup_if.
Definition at line 770 of file xtsc_lookup.h.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
See also:
xtsc::xtsc_lookup_if
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
Definition at line 790 of file xtsc_lookup.h.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
Definition at line 793 of file xtsc_lookup.h.
The documentation for this class was generated from the following file:
• xtsc_lookup.h
xtsc_parms
xtsc_lookup_parms
xtsc_parms
xtsc_lookup_parms
Constructor parameters for a xtsc_lookup object. This class contains the constructor pa-
rameters for a xtsc_lookup object.
"address_bit_width" u32 The width of the TIE address signal (i.e. request
address) in bits. Maximum is 1024.
Note: The interpretation of the "delay" parameter changed after (not including)
RC-2010.1 to better model recommended TIE lookup implementation behavior.
Deprecation Notice: The use of the "delay" parameter above and the <LuaDelayFunction>
and @<Delay> constructs in the "lookup_table" below are all deprecated. The purpose
of these constructs was to allow a limited ability to model the lookup device being
busy (for example, because it is shared with another Xtensa or because it is having
its values reloaded). The recommended technique for controlling the busy status of
the lookup device is to use the set_ready_enable method and/or command.
"lookup_table" char* The name of the file containing the address-data pairs
and/or just the data (with an implied address). Each
address-data pair can also have an optional delay
specified (which is only used if "ram" is false and
"has_ready" is true). If "ram" is false and this
parameter is NULL, then all lookups will return the
"default_data" value (unless a sub-class overrides the
xtsc_lookup::get_data_from_address() method). If "ram"
is true, the file acts as an initial value file. If
"ram" is true and this parameter is NULL, then all reads
to RAM addresses that have not been written will return
the "default_data" value.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
See also:
xtsc_lookup
xtsc::xtsc_parms
Parameters:
address_bit_width The width of the request address in bits.
data_bit_width The width of the response data in bits.
has_ready Specifies whether or not the xtsc_lookup has a ready signal (corresponds
to the rdy keyword in the user’s TIE code for the lookup).
lookup_table The name of the file containing the address-data pairs and/or just the
data (with an implied address).
default_data The data to use for addresses which aren’t in lookup_table.
ram If false, the default, this module functions as a lookup table. If true, this module
functions as a RAM with the RAM address, write data, and write strobe being bit
fields within the TIE address signal (i.e. the address argument of the nb_send_-
address() method).
Constructor for an xtsc_lookup_parms object based upon an xtsc_core object and a named
TIE lookup. This constructor will determine latency, address_bit_width, data_bit_width,
has_ready, and clock_period by querying the core object. If desired, after the xtsc_lookup_-
parms object is constructed, its data members can be changed using the appropriate
xtsc::xtsc_parms::set() method before passing it to the xtsc_lookup constructor.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_lookup_parms.
lookup_name The name of the TIE lookup as it appears in the user’s TIE code after
the lookup keyword.
lookup_table The name of the file containing the address-data pairs and/or just the
data (with an implied address).
default_data The data to use for addresses which aren’t in lookup_table.
ram If false, the default, this module functions as a lookup table. If true, this module
functions as a RAM with the RAM address, write data, and write strobe being bit
fields within the TIE address signal (i.e. the address argument of the nb_send_-
address() method).
The documentation for this class was generated from the following file:
• xtsc_lookup.h
xtsc_connection_interface xtsc_resettable
xtsc_module
xtsc_lookup_pin
m_file m_ready_floating
xtsc_lookup_pin
• SC_HAS_PROCESS (xtsc_lookup_pin)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
Public Attributes
• xtsc::xtsc_signal_sc_bv_base_floating m_ready_floating
Bind to m_ready when there is no TIE_xxx_Rdy.
• void before_end_of_elaboration ()
• void request_thread ()
• void ready_thread ()
• void data_thread ()
• void get_sc_bv_base (xtsc::u32 index, sc_dt::sc_bv_base &value)
Convert m_words[index] to sc_bv_base value.
• bool pipeline_full ()
Return true if pipeline is full.
Protected Attributes
• bool m_has_ready
True if lookup has a rdy signal (from "has_ready" parameter).
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• sc_core::sc_time m_clock_period
The lookup’s clock period (from "clock_period" parameter).
• xtsc::u64 m_clock_period_value
The lookup’s clock period expressed as u64 value.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_sample_phase
Phase of clock when m_req is sampled (0 => posedge clock) (from "sample_phase").
• xtsc::u64 m_sample_phase_value
Phase of clock when m_req is sampled expressed as u64 value.
• sc_core::sc_time m_latency
From xtsc_lookup_pin_parm "latency".
• xtsc::u32 m_delay
Default delay from xtsc_lookup_pin_parm "delay".
• sc_dt::sc_bv_base m_zero
Constant 0.
• sc_dt::sc_bv_base m_one
Constant 1.
• sc_core::sc_time m_delay_timeout
Time for the ready delay to expire.
• sc_core::sc_event m_ready_event
Pipeline full/not-full, or delay.
• sc_core::sc_event m_data_event
When to drive the next data.
• sc_core::sc_event m_timeout_event
Internal state machine state timeouts.
• xtsc::u32 m_address_bit_width
From "address_bit_width" parameter.
• xtsc::u32 m_data_bit_width
From "data_bit_width" parameter.
• sc_dt::sc_unsigned m_next_address
Keep track of implied next address to use if not explicit in lookup table file.
• sc_dt::sc_bv_base m_default_data
From "default_data" parameter.
• sc_dt::sc_bv_base m_data_registered
The registered lookup data being driven out.
• std::string m_lookup_table
The lookup table file name (from "lookup_table" parameter).
• xtsc::xtsc_script_file ∗ m_file
The lookup table file.
• std::string m_line
Current line in the lookup table.
• xtsc::u32 m_line_count
Current line number in the lookup table as it is being parsed.
• sc_core::sc_trace_file ∗ m_p_trace_file
VCD trace file (see "vcd_handle" parameter).
• xtsc::u32 m_pipeline_depth
Number of slots in m_pipeline_data from "pipeline_depth" or "latency".
• xtsc::u32 m_pipeline_wp
Write pointer into m_pipeline_data fifo.
• xtsc::u32 m_pipeline_rp
• sc_dt::sc_bv_base ∗∗ m_pipeline_data
• sc_core::sc_time ∗ m_pipeline_times
For reset.
A TIE lookup implementation using the pin-level interface. Example XTSC lookup imple-
mentation that connects at the pin-level and that uses a ROM like lookup table which is
initialized from a file.
This module can also be used to model a non-ROM lookup (for example, a computed
lookup) as long as all possible lookups can be enumerated individually without exceeding
the host memory system. When modeling a lookup device with a ready signal, each possi-
ble lookup address can have a custom delay associated with it that specifies how long the
TIE_xxx_Rdy signal is deasserted after a lookup to that particular address (so the delay
potentially affects the next lookup, not the current lookup). Note: This is a change from the
RC-2010.1 and earlier behavior.
Here is a block diagram of an xtsc_lookup_pin as it is used in the xtsc_lookup_pin example:
core0_TIE_lut_Out_Req_m_req_tbl
TIE_lut_Out_Req m_req
core0_TIE_lut_Out_m_address_tbl 8
TIE_lut_Out / m_address
tbl_m_ready_TIE_lut_Rdy_core0
TIE_lut_Rdy m_ready
32
tbl_m_data_TIE_lut_In_core0
TIE_lut_In / m_data
See also:
xtsc_lookup_pin_parms
Parameters:
module_name Name of the xtsc_lookup_pin sc_module.
lookup_parms The remaining parameters for construction.
See also:
xtsc_lookup_pin_parms
The documentation for this class was generated from the following file:
• xtsc_lookup_pin.h
xtsc_parms
xtsc_lookup_pin_parms
xtsc_parms
xtsc_lookup_pin_parms
Constructor parameters for a xtsc_lookup_pin object. This class contains the constructor
parameters for a xtsc_lookup_pin object.
Default = 0.
Note: The interpretation of the "delay" parameter changed after (not including) RC-2010.1
to better model proper TIE lookup interface protocol.
"lookup_table" char* The name of the file containing the address-data pairs
and/or just the data (with an implied address). Each
address-data pair can also have an optional delay
specified. If this parameter is NULL, then all lookups
will return the "default_data". This file must contain
lines in the following format:
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"sample_phase" u32 This specifies the phase (i.e. the point) in each clock
period at which the m_req signal is sampled. It is
expressed in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less than
the clock period as specified by the "clock_period"
parameter. A value of 0 means the m_req signal is
sampled on posedge clock as specified by
"posedge_offset".
Default = 0.
See also:
xtsc_lookup_pin
xtsc::xtsc_parms
xtsc::xtsc_initialize_parms
Parameters:
address_bit_width The width of the request address in bits.
data_bit_width The width of the response data in bits.
has_ready If true, xtsc_lookup_pin will drive the m_ready signal. If false, xtsc_-
lookup_pin will internally cap the m_ready signal and the user must not connect
to it.
lookup_table The name of the file containing the address-data pairs and/or just the
data (with an implied address).
default_data The data to use for addresses which aren’t in lookup_table.
p_trace_file Pointer to SystemC VCD object or 0 if tracing is not desired.
• xtsc_lookup_pin.h
xtsc_connection_interface xtsc_resettable
xtsc_master
xtsc_connection_interface
xtsc_module
xtsc_wire_write_if
xtsc_resettable
xtsc_master m_p_write_impl
xtsc_respond_if m_script_file_stream
m_p_return_value_file
xtsc_script_file
Classes
• class xtsc_wire_write_if_impl
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• sc_core::sc_port< xtsc::xtsc_request_if > m_request_port
From us to slave.
Protected Types
• typedef sc_core::sc_export< xtsc::xtsc_wire_write_if > wire_write_export
• int get_words ()
Get the next vector of words which define an xtsc::xtsc_request test vector.
• bool get_return_value ()
Get the next return value for a call to nb_respond.
Protected Attributes
• bool m_control
From "control" parameter.
• bool m_control_bound
Something is connected to the control input.
• wire_write_export ∗ m_p_control
Optional control input.
• xtsc_wire_write_if_impl ∗ m_p_write_impl
• sc_dt::sc_unsigned m_control_value
Current value of the control input.
• xtsc::u32 m_control_write_count
Number of times control input is written.
• xtsc::u32 m_control_change_count
Number of times input is written with a new value.
• bool m_wraparound
Should script file wraparound at EOF.
• bool m_zero_delay_repeat
See the "zero_delay_repeat" parameter.
• std::string m_script_file
The name of the script file.
• xtsc::xtsc_script_file m_script_file_stream
The script file object.
• std::string m_return_value_file
The name of the optional return value file.
• xtsc::xtsc_script_file ∗ m_p_return_value_file
Pointer to the return value file object.
• xtsc::u32 m_format
The format in effect. See "format" parameter.
• std::string m_line
The current script file line.
• xtsc::u32 m_line_count
The current script file line number.
• xtsc::u32 m_return_value_index
Current word of return value file.
• xtsc::u32 m_return_value_line_count
The current return value file line number.
• std::string m_return_value_line
The current return value file line.
• xtsc::u64 m_block_write_tag
Keep track of tag for BLOCK_WRITE.
• xtsc::u64 m_burst_write_tag
Keep track of tag for BURST_WRITE.
• xtsc::u64 m_rcw_tag
Keep track of tag for RCW.
• xtsc::u64 m_last_request_tag
Tag of most recent previous request sent.
• xtsc::xtsc_address m_virtual_address_delta
Amount to add to get snoop/coherent virtual addr.
• xtsc::u32 m_response_history_depth
As initially set by the "response_history_depth" parameter or overridden by the set_-
response_history_depth() method.
• bool m_last_request_got_response
Response received with tag of m_last_request_tag.
• bool m_last_request_got_nacc
RSP_NACC received with tag of m_last_request_tag.
• bool m_fetch
For xtsc_request::set_instruction_fetch().
• bool m_use_coherent_peek_poke
See "COHERENT ON|OFF" command.
• bool m_set_xfer_en
See "XFER_EN ON|OFF" command.
• bool m_set_user_data
See "USER_DATA value|OFF" command.
• void ∗ m_user_data
See "USER_DATA value|OFF" command.
• bool m_set_byte_enables
True if a "BE byte_enables" command is in effect.
• bool m_set_last_transfer
See "LAST_TRANSFER OFF" command.
• bool m_last_transfer
See "LAST_TRANSFER 0|1" command.
• bool m_do_dram_attribute
False when "DRAM_ATTRIBUTE OFF" is in effect.
• bool m_do_pif_attribute
False when "PIF_ATTRIBUTE OFF" is in effect.
• bool m_do_pif_domain
False when "PIF_DOMAIN OFF" is in effect.
• bool m_exclusive
False when "EXCLUSIVE OFF" is in effect.
• sc_dt::sc_unsigned m_dram_attribute
Value from "DRAM_ATTRIBUTE attr" command.
• xtsc::u32 m_pif_attribute
Value from "PIF_ATTRIBUTE attr" command.
• xtsc::u8 m_pif_domain
Value from "PIF_DOMAIN domain" command.
• xtsc::xtsc_byte_enables m_byte_enables
Byte enables from the "BE byte_enables" command.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
This device’s clock period.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_event m_control_write_event
Notified when control input is written.
• sc_core::sc_event m_response_event
Event to notify when a response is received.
• xtsc::xtsc_response::status_t m_last_response_status
Status of last response.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to m_respond_export.
A scripted memory interface master. This XTSC module implements a memory interface
master that reads an input file ("script_file") to determine when and what requests to send
to a memory interface slave module. An optional return value file can be named (in the
"return_value_file" parameter) from which the return value for calls to nb_respond() will be
obtained (if no return value file is provided, then nb_respond() always returns true).
This module provides a simple means to deliver xtsc::xtsc_request test transactions to an
xtsc_memory, to an xtsc_core (inbound PIF), or even to a system comprised of xtsc_-
arbiter, xtsc_core, xtsc_dma_engine, xtsc_memory, xtsc_memory_pin, xtsc_mmio, xtsc_-
router, xtsc_slave, and xtsc_tlm2pin_memory_transactor objects.
To provide an additional degree of feedback or control of the script (beyond what the mem-
ory interface slave can exert through memory responses), the "control" option can be set to
true and a wire writer such as xtsc_core, xtsc_mmio, or xtsc_wire_logic can be connected
to the control input. This allows the xtsc_master device to better model certain SoC com-
ponents. For example, if you are using an xtsc_master to program an xtsc_dma_engine,
then the memory-mapped write from the xtsc_dma_engine used to signal "DMA done" can
be routed through an xtsc_mmio device and thence to the control input of the xtsc_master
to cause it to program the next DMA movement.
Here is a block diagram of an xtsc_master as it is used in the master example:
nb_respond()
nb_request()
xtsc_master master xtsc_memory mem
request.vec
master.m_request_port (*mem.m_respond_ports[0])
master.m_respond_export *mem.m_request_exports[0]
See also:
xtsc_master_parms
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
Parameters:
module_name Name of the xtsc_master sc_module.
master_parms The remaining parameters for construction.
See also:
xtsc_master_parms
Dump the response history table. This method dumps the contents of the response history
table. Each response is shown on a separate line starting with the 1-based index of that
response in the table.
Example output using the XTSC cmd prompt:
Parameters:
n Get the nth most recent previous response from the response history table. Use n=1
for the most recent previous response, n=2 for the next most recent response,
See also:
get_response_history_count()
Get response count. This method returns the number of entries currently in the response
history table. The value returned by this method is guaranteed to be inclusively between 0
and the value set by the most recent previous call to set_response_history_depth().
See also:
set_response_history_depth()
Return the response history depth. This method returns the value set by the most recent
previous call to set_response_history_depth().
See also:
set_response_history_depth()
Set response history depth. This method sets the maximum number of responses that the
response history table may hold. If there are currently more enteries in the table, the oldest
entries are discarded. Setting depth to 0 will empty the response history table and turn
off response history capture until such time as this method is again called with a non-zero
value for depth. The initial response history depth is as set by the "response_history_depth"
parameter.
Parameters:
depth The maximum number of entries to maintain in the response history table.
See also:
get_response_history_depth()
7.76.3.6 void execute (const std::string & cmd_line, const std::vector< std::string
> & words, const std::vector< std::string > & words_lc, std::ostream &
result) [virtual]
dump_response_history
Return the os buffer from calling xtsc_master::dump_response_history(os).
get_response <N>
Return value from calling xtsc_master::get_response(<N>).
get_response_history_count
Return value from calling xtsc_master::get_response_history_count().
get_response_history_depth
Return value from calling xtsc_master::get_response_history_depth().
set_response_history_depth <Depth>
Call xtsc_master::set_response_history_depth(<Depth>).
Implements xtsc_command_handler_interface.
Return the sc_export of the optional control input. This method may be used for port binding
of the optional control input.
For example, to bind the TIE export state named "onebit" of an xtsc_core name core0 to
the control input of an xtsc_master named master:
core0.get_export_state("onebit")(master.get_control_input());
Connect an xtsc_wire_logic output to the control input of this xtsc_master. This method
connects the specified output of the specified xtsc_wire_logic to the optional control input
of this xtsc_master. This method should not be used unless the "control" parameter was
set to true.
Parameters:
logic The xtsc_wire_logic to connect to the control input of this xtsc_master.
output_name The output of the xtsc_wire_logic.
Connect an xtsc_mmio output to the control input of this xtsc_master. This method con-
nects the specified output of the specified xtsc_mmio to the optional control input of this
xtsc_master. This method should not be used unless the "control" parameter was set to
true.
Parameters:
mmio The xtsc_mmio to connect to the control input of this xtsc_master.
output_name The output of the xtsc_mmio.
7.76.3.10 void connect (xtsc::xtsc_core & core, const char ∗ port = "inbound_pif")
Parameters:
core The xtsc_core to connect to.
port Either "inbound_pif" or "snoop", case-insensitive.
Get the optional coherence value. If m_format is 1, then set offset to 0 and return a
coherence_t value of NONCOHERENT, otherwise, convert the word indicated by index
to a coherence_t value, set offset to 1, and return the coherence value.
Throw an exception if the current command has more parameters than number_expected.
Parameters:
number_expected The number of parameters expected.
Throw an exception if the current command has fewer parameters than number_expected.
Parameters:
number_expected The number of parameters expected.
• xtsc_master.h
xtsc_parms
xtsc_master_parms
xtsc_parms
xtsc_master_parms
Constructor parameters for a xtsc_master object. This class contains the constructor pa-
rameters for a xtsc_master object.
"control" bool If true, then a 1-bit control input will be created and
the "WAIT CONTROL" commands will be enabled in the
script file (see "script_file"). The control input can
be used to control the xtsc_master device with another
device.
Default = false.
"format" u32 Set the initial format expected in the script file. The
line format specified by this parameter can be changed
using the "FORMAT 1|2|3" command in the script file
itself.
Default 1.
"script_file" char* The file to read the requests from. Each request takes
one line in the file. The supported line formats are:
// All formats
delay POKE address size b0 b1 ... bN
delay PEEK address size
delay LOCK lock
delay RETIRE address
delay FLUSH
delay STOP
WAIT RESPONSE|RSP|TAG [repeat]
WAIT NACC [timeout [repeat]]
WAIT duration
WAIT CONTROL WRITE|CHANGE|value [count]
FETCH ON|OFF
SYNC time
NOTE message
INFO message
VIRTUAL addr_delta
FORMAT 1|2|3
COHERENT ON|OFF
DRAM_ATTRIBUTE attr|OFF
PIF_ATTRIBUTE attr|OFF
PIF_DOMAIN domain|OFF
XFER_EN ON|OFF
USER_DATA value|OFF
BE byte_enables|OFF
LAST_TRANSFER 0|1|OFF
EXCLUSIVE ON|OFF
// Format 1
delay READ address size route_id id priority pc
5. N = size - 1.
6. delay can be 0 (to mean 1 delta cycle), or "now" to
mean no delta cycle delay, or a positive integer or
floating point number to mean that many clock
periods.
7. A "FORMAT 1|2|3" line can be used to specify what
format the following lines will be in. The format
stays the same until another "FORMAT 1|2|3" line is
encountered. The initial format is as specified by
the "format" parameter which, by default, is 1.
8. The "delay LOCK lock" command causes a call to
nb_lock() with an argument of lock. lock can be
"true"|"1"|"on" for an argument of true or it can
be "false"|"0"|"off" for an argument of false. This
is for modelling the DRamnLockm signal of DRAM.
9. The "delay RETIRE address" command causes a call to
nb_load_retired() with an argument of address. This
is for modelling the DPortnLoadRetiredm signal of
the XLMI.
10. The "delay FLUSH" command causes a call to
nb_retire_flush(). This is for modelling the
DPortnRetireFlushm signal of the XLMI.
11. The "delay STOP" command causes simulation to stop
via a call to the sc_stop() method after the
specified delay.
12. The "WAIT RESPONSE|RSP" command causes a wait until
the next response is received without regard to
which request the response is for. The "WAIT TAG"
command causes a wait until a response is received
to the most recent previous request. A response is
deemed to be for the most recent previous request if
they have the same tag, i.e. if response.get_tag()
equals request.get_tag(). The repeat option
specifies how many times the preceeding request
should be repeated if the response is RSP_NACC. If
the repeat option is not present, the preceeding
request will be repeated until a response other than
RSP_NACC is received. If no repeat is desired,
specify 0 for the repeat option.
13. The "WAIT NACC" command causes a wait for the
specified timeout_period and then a check is made to
see if an RSP_NACC has been received for the
preceeding request. A response is deemed to be for
the most recent previous request if they have the
same tag, i.e. if response.get_tag() equals
request.get_tag(). The timeout_period is defined
based on the timeout argument using the formula:
timeout_period = timeout * clock_period
The timeout argument can be a positive integer or
floating point number. clock_period is based upon
the "clock_period" parameter. If no timeout
argument is specified, it defaults to 1 (which means
the timeout_period is the same as the xtsc_master's
clock period). At the end of the specified
timeout_period, if no RSP_NACC has been received for
the preceding request, then the xtsc_master
continues processing the script file. If an
"wraparound" bool Specifies what should happen when the end of file
(EOF) is reached on "script_file". When EOF is reached
and "wraparound" is true, "script_file" will be reset
to the beginning of file and the script will be processed
again. When EOF is reached and "wraparound" is false,
the xtsc_master object will cease issuing requests.
Default = false.
"zero_delay_repeat" bool A request line in the script file with a delay of either
"now" or 0 followed by a "WAIT RESPONSE|RSP|TAG" line
will result in a hung simulation if the downstream slave
is busy, requires a non-zero amount of SystemC time to
become non-busy, and sends its RSP_NACC without any
SystemC delay. To prevent a potential hung simulation,
leave this parameter at its default setting of false to
cause a one clock cycle delay to be inserted whenever
the downstream slave responds with RSP_NACC at the same
SystemC time as a request from a request line with a
"now" or 0 delay followed by a "WAIT RESPONSE|RSP|TAG"
line. Set this parameter to true to get the behavior of
RD-2011.2 and earlier (which allows a potential hung
simulation).
Default = false.
"return_value_file" char* The file to read the nb_respond return values from.
Each time xtsc_master::nb_respond() is called with a
non-RSP_NACC status, another word is read from this
file. If the word is "1", nb_respond returns true. If
the word is "0", nb_respond returns false. When the end
of the file is reached, the file pointer is reset to the
beginning of the file. If "return_value_file" is NULL
or empty, then nb_respond always returns true. Comments
and blank lines are ignored.
See xtsc::xtsc_script_file.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
See also:
xtsc_master
xtsc::xtsc_parms
xtsc::xtsc_request
xtsc::xtsc_request_if::nb_request
xtsc::xtsc_debug_if::nb_poke
xtsc::xtsc_debug_if::nb_peek
xtsc::xtsc_debug_if::nb_poke_coherent
xtsc::xtsc_debug_if::nb_peek_coherent
xtsc::xtsc_script_file
Parameters:
script_file The file name to read the xtsc::xtsc_request test vectors from.
wraparound Indicates if script_file should wraparound to the beginning of the file after
the end of file is reached.
return_value_file The optional file name to read the xtsc::nb_respond return values
from. If this argument is NULL or empty, then xtsc_master::nb_respond() will
always return true. When the end of this file is reached, the file pointer is reset to
the beginning of the file.
• xtsc_master.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_master_tlm2
xtsc_connection_interface
xtsc_module
xtsc_resettable
m_master
xtsc_command_handler_interface xtsc_master_tlm2 tlm_bw_transport_if_impl
m_script_file_stream m_tlm_bw_transport_if_impl
xtsc_script_file
Classes
• class tlm_bw_transport_if_impl
Implementation of tlm_bw_transport_if.
Public Types
• typedef tlm::tlm_initiator_socket< 32 > initiator_socket_4
initiator socket with BUSWIDTH = 32 bits ( 4 bytes)
• SC_HAS_PROCESS (xtsc_master_tlm2)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
For xtsc_connection_interface.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• tlm::tlm_generic_payload ∗ new_transaction ()
Get a new transaction object from the pool.
• int get_words ()
Get the next vector of words from the script_file.
Protected Attributes
• initiator_socket_4 ∗ m_initiator_socket_4
Initiator socket for 4-byte interface.
• initiator_socket_8 ∗ m_initiator_socket_8
Initiator socket for 8-byte interface.
• initiator_socket_16 ∗ m_initiator_socket_16
Initiator socket for 16-byte interface.
• initiator_socket_32 ∗ m_initiator_socket_32
Initiator socket for 32-byte interface.
• initiator_socket_64 ∗ m_initiator_socket_64
Initiator socket for 64-byte interface.
• tlm_bw_transport_if_impl m_tlm_bw_transport_if_impl
m_initiator_socket_BW binds to this
• xtsc::u32 m_width8
The bus width in bytes. See "byte_width".
• xtsc::u32 m_streaming_width
From the "streaming_width" parameter or STREAM script file cmd.
• xtsc::u8 m_data_fill_byte
From the "data_fill_byte" parameter.
• bool m_wraparound
Should script file wraparound at EOF.
• xtsc::xtsc_script_file m_script_file_stream
The script file object.
• std::string m_script_file
The name of the script file.
• std::string m_line
The current script file line.
• xtsc::u32 m_line_count
The current script file line number.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
This device’s clock period.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• std::string m_last_read_write
Log line from last read or write command.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• xtsc::u32 m_p_byte_enable_length
Current byte enable length. Initially, 0.
• xtsc::u8 ∗ m_p_byte_enables
Current byte enables. From "enables" command.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to m_respond_export.
A scripted OSCI TLM2 memory interface master. This XTSC module implements an OSCI
TLM2 memory interface master that reads an input file ("script_file") to determine when
and what transactions to send to an OSCI TLM2 memory interface slave module.
This module provides a simple means to deliver OSCI TLM2 generic payload test transac-
tions to an xtsc_memory_tlm2, to an xtsc_tlm22xttlm_transactor, or to any other memory-
interface slave component that supports the OSCI TLM2 base protocol.
Here is a block diagram of an xtsc_master_tlm2 as it is used in the xtsc_tlm22xttlm_-
transactor example:
(*tlm22xttlm.m_request_ports[0])
(core0.get_request_export(“inbound_pif”))
master.get_initiator_socket_4()
req
nb_request
xtsc_memory
pif
rsp
xtsc_tlm22xttlm_transactor
xtsc_master_tlm2 b_transport tlm22xttlm xtsc_core
master “num_ports” = 1 core0
req
master_tlm2.vec
nb_respond xtsc_memory
dram0
rsp
core0.get_respond_port(“inbound_pif”)
(*tlm22xttlm.m_respond_exports[0])
(tlm22xttlm.get_target_socket_4(0))
See also:
xtsc_master_tlm2_parms
xtsc_memory_tlm2
xtsc_tlm22xttlm_transactor
Parameters:
module_name Name of the xtsc_master_tlm2 sc_module.
master_parms The remaining parameters for construction.
See also:
xtsc_master_tlm2_parms
7.78.3.1 void execute (const std::string & cmd_line, const std::vector< std::string
> & words, const std::vector< std::string > & words_lc, std::ostream &
result) [virtual]
dump_last_read_write
Dump the log line from the most recent previous read or write command.
reset [<Hard>]
Call xtsc_memory_tlm2::reset(<Hard>). Where <Hard> is 0|1 (default 0).
Implements xtsc_command_handler_interface.
Parameters:
os The ostream object to which the log line of the most recent previous read or write
is to be dumped.
Throw an exception if the current command has more parameters than num_expected.
Parameters:
num_expected The number of parameters expected.
Throw an exception if the current command has fewer parameters than num_expected.
Parameters:
num_expected The number of parameters expected.
The documentation for this class was generated from the following file:
• xtsc_master_tlm2.h
xtsc_parms
xtsc_master_tlm2_parms
xtsc_parms
xtsc_master_tlm2_parms
Constructor parameters for a xtsc_master_tlm2 object. This class contains the constructor
parameters for a xtsc_master_tlm2 object.
"byte_width" u32 Bus width in bytes. Valid values are 4, 8, 16, 32, and
64.
"script_file" char* The file to read the requests from. Each request takes
one line in the file. The supported line formats are:
WAIT duration
SYNC time
NOTE message
INFO message
delay STOP
"wraparound" bool Specifies what should happen when the end of file
(EOF) is reached on "script_file". When EOF is reached
and "wraparound" is true, "script_file" will be reset
to the beginning of file and the script will be processed
again. When EOF is reached and "wraparound" is false,
the xtsc_master_tlm2 object will cease issuing requests.
Default = false.
"data_fill_byte" u32 The low byte specifies the value used to initialize
the data pointer array in each new transaction.
Default = 0.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
See also:
xtsc_master_tlm2
xtsc::xtsc_parms
xtsc::xtsc_request
xtsc::xtsc_script_file
Parameters:
script_file The file name to read the xtsc::xtsc_request test vectors from.
byte_width The byte width of the memory interface (BUSWIDTH)
wraparound Indicates if script_file should wraparound to the beginning of the file after
the end of file is reached.
• xtsc_master_tlm2.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_memory
xtsc_cache xtsc_dma_engine
xtsc_debug_if
xtsc_connection_interface xtsc_request_if
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
m_p_exclusive_script_stream
m_p_script_stream
xtsc_script_file m_p_initial_value_file
m_memory xtsc_request_if_impl
xtsc_memory_b m_p_memory
m_request_impl
xtsc_memory
m_filtered_request
m_filtered_response
m_p_request m_stream_dumper m_p_active_response
stream_dumper xtsc_response
xtsc_request
m_stream_dumper
m_request m_p_active_request_info
request_info
m_memory_parms
xtsc_memory_parms
xtsc_parms
m_fast_access_object
xtsc_fast_access_if
Classes
• class address_info
POD class to help keep track of information related to a special address or address range.
• class request_info
Information about each request.
• class watchfilter_info
Information about each watchfilter.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
Public Types
• enum request_type_t {
REQ_READ = 1 << 0,
REQ_WRITE = 1 << 1,
REQ_BLOCK_READ = 1 << 2,
REQ_RCW_1 = 1 << 3,
REQ_RCW_2 = 1 << 4,
REQ_BURST_READ = 1 << 5,
REQ_BURST_WRITE_1 = 1 << 8,
REQ_BURST_WRITE_2 = 1 << 9,
REQ_BURST_WRITE_3 = 1 << 10,
REQ_BURST_WRITE_4 = 1 << 11,
REQ_BURST_WRITE_5 = 1 << 12,
REQ_BURST_WRITE_6 = 1 << 13,
REQ_BURST_WRITE_7 = 1 << 14,
REQ_BURST_WRITE_8 = 1 << 15,
REQ_BLOCK_WRITE_1 = 1 << 16,
REQ_BLOCK_WRITE_2 = 1 << 17,
REQ_BLOCK_WRITE_3 = 1 << 18,
REQ_BLOCK_WRITE_4 = 1 << 19,
REQ_BLOCK_WRITE_5 = 1 << 20,
REQ_BLOCK_WRITE_6 = 1 << 21,
REQ_BLOCK_WRITE_7 = 1 << 22,
• void end_of_simulation ()
• virtual xtsc::u32 get_bit_width (const std::string &port_name, xtsc::u32 interface_-
num=0) const
For xtsc_connection_interface.
For xtsc_connection_interface.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void clear_addresses ()
Clear all addresses and address ranges that are to receive special responses.
• xtsc::u32 random ()
Compute a pseudo-random sequence based on George Marsaglia’s multiply-with-carry
method.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_request_if > ∗∗ m_request_exports
From the memory interface masters (e.g xtsc_core, xtsc_router, etc) to us.
Protected Types
• typedef std::pair< xtsc::xtsc_address, xtsc::xtsc_address > address_range
• void reset_fifos ()
Reset internal fifos.
• void script_thread ()
Process optional "script_file".
• void compute_let_through ()
• int get_words ()
Get the next vector of words from the script file.
• void load_initial_values ()
Helper function to initialize memory contents.
Protected Attributes
• xtsc_memory_parms m_memory_parms
Copy of xtsc_memory_parms.
• xtsc::u32 m_num_ports
The number of ports this memory has.
• xtsc::u32 m_next_port_num
Used by worker_thread entry to get its slave port number.
• xtsc_request_if_impl ∗∗ m_request_impl
The m_request_exports objects bind to these.
• xtsc::xtsc_memory_b ∗ m_p_memory
The memory itself.
• request_info ∗∗ m_p_active_request_info
The active (current) request on each port.
• xtsc::xtsc_response ∗∗ m_p_active_response
The active (current) response on each port.
• xtsc::u32 ∗ m_block_write_transfer_count
Keep track of block writes on each port.
• xtsc::u32 ∗ m_burst_write_transfer_count
Keep track of burst writes on each port.
• bool ∗ m_first_block_write
True if first block write request on each port.
• bool ∗ m_first_burst_write
True if first burst write request on each port.
• bool ∗ m_first_rcw
True if first RCW request on each port.
• sc_core::sc_time ∗ m_last_action_time_stamp
Time of last action on each port: recovery time starts from here.
• sc_core::sc_event ∗∗ m_worker_thread_event
To notify worker_thread of a request on each port.
• bool ∗ m_rcw_have_first_transfer
True if first RCW has been received but not second.
• xtsc::u8 ∗ m_rcw_compare_data
Comparison data from RCW request.
• sc_core::sc_time m_clock_period
The clock period of this memory.
• bool m_immediate_timing
True if requests should be handled without any delay.
• bool m_delay_from_receipt
True if delay timing starts from receipt of request.
• bool m_write_responses
See "write_responses" parameter.
• bool m_check_alignment
If true, check that address is size aligned.
• sc_core::sc_time m_recovery_time
See "recovery_time" parameter.
• sc_core::sc_time m_read_delay
See "read_delay" parameter.
• sc_core::sc_time m_block_read_delay
See "block_read_delay" parameter.
• sc_core::sc_time m_block_read_repeat
See "block_read_repeat" parameter.
• sc_core::sc_time m_burst_read_delay
See "burst_read_delay" parameter.
• sc_core::sc_time m_burst_read_repeat
See "burst_read_repeat" parameter.
• sc_core::sc_time m_rcw_repeat
See "rcw_repeat" parameter.
• sc_core::sc_time m_rcw_response
See "rcw_response" parameter.
• sc_core::sc_time m_write_delay
See "write_delay" parameter.
• sc_core::sc_time m_block_write_delay
See "block_write_delay" parameter.
• sc_core::sc_time m_block_write_repeat
See "block_write_repeat" parameter.
• sc_core::sc_time m_block_write_response
See "block_write_response" parameter.
• sc_core::sc_time m_burst_write_delay
See "burst_write_delay" parameter.
• sc_core::sc_time m_burst_write_repeat
See "burst_write_repeat" parameter.
• sc_core::sc_time m_burst_write_response
See "burst_write_response" parameter.
• sc_core::sc_time m_response_repeat
See "response_repeat" parameter.
• std::string m_script_file
The name of the optional script file.
• bool m_wraparound
Should script file wraparound at EOF.
• sc_core::sc_event m_script_thread_event
To notify script_thread of a request.
• xtsc::xtsc_script_file ∗ m_p_script_stream
Pointer to the optional script file object.
• std::string m_line
The current script file line.
• xtsc::u32 m_line_count
The current script file line number.
• std::string m_exclusive_script_file
See "exclusive_script_file" parameter.
• xtsc::xtsc_script_file ∗ m_p_exclusive_script_stream
Pointer to the optional exclusive script file object.
• std::string m_current_exclusive_file
"exclusive_script_file": Current file name (may be from include)
• xtsc::u32 m_exclusive_line_num
"exclusive_script_file": Current line number
• std::string m_exclusive_line
"exclusive_script_file": Current line
• bool m_support_exclusive
See "support_exclusive" parameter, method, and command.
• bool ∗ m_block_write_doit
Actually do the writes of an exclusive BLOCK_WRITE.
• xtsc::u32 m_exclusive_monitors
Total exclusive monitors created - logged at end of simulation.
• xtsc::u32 m_prev_type
type code of most recent previous request
• bool m_prev_hit
true if request address was in one of the address lists
• xtsc::u32 m_prev_port
port number of most recent previous request
• xtsc::xtsc_response::status_t m_fail_status
See "fail_status" parameter.
• xtsc::u32 m_fail_request_mask
See "fail_request_mask" parameter.
• xtsc::u32 m_fail_percentage
See "fail_percentage" parameter.
• xtsc::u32 m_fail_seed
See "fail_seed" parameter.
• xtsc::u32 m_z
For Marsaglia’s multipy-with-carry PRNG.
• xtsc::u32 m_w
For Marsaglia’s multipy-with-carry PRNG.
• xtsc::u32 m_let_through
Gate when "fail_request_mask" is non-zero.
• std::string m_lua_function
See LUA_FUNCTION under "script_file" parameter.
• bool m_last
See LAST under "script_file" parameter.
• bool m_read_only
See "read_only" parameter.
• xtsc::u32 m_log_user_data_bytes
See "log_user_data_bytes" parameter.
• xtsc::u32 m_user_data_type
0=none (use default), 1=value, 2=pointer
• xtsc::u32 m_user_data_length
Number of bytes in or pointed to by m_p_user_data.
• xtsc::u8 ∗ m_p_user_data
To override default response user data.
• bool m_host_shared_memory
See "host_shared_memory" parameter.
• bool m_host_mutex
See "host_mutex" parameter.
• bool m_use_fast_access
For turboxim. See "use_fast_access".
• bool m_use_raw_access
For turboxim. See "use_raw_access".
• bool m_use_callback_access
For turboxim. See "use_callback_access".
• bool m_use_custom_access
For turboxim. See "use_custom_access".
• bool m_use_interface_access
For turboxim. See "use_interface_access".
• xtsc::xtsc_fast_access_if ∗ m_fast_access_object
Object for fast access through CALLBACKS.
• bool m_filter_peeks
True if m_peek_watchfilters is non-empty.
• bool m_filter_pokes
True if m_poke_watchfilters is non-empty.
• bool m_filter_requests
True if m_request_watchfilters is non-empty.
• bool m_filter_responses
True if m_response_watchfilters is non-empty.
• xtsc::xtsc_request m_filtered_request
Copy of most recent previous filtered xtsc_request.
• xtsc::xtsc_response m_filtered_response
Copy of most recent previous filtered xtsc_response.
• xtsc::xtsc_address m_start_address8
The starting byte address of this memory.
• xtsc::u32 m_size8
The byte size of this memory.
• xtsc::u32 m_width8
The byte width of this memories data interface.
• xtsc::xtsc_address m_end_address8
Text logger.
Binary logger.
A PIF, XLMI, or local memory. Example XTSC module implementing a configurable mem-
ory.
On a given port, this memory model always processes transactions in the order they were
received.
You may use this memory directly or just use the code as a starting place for develop-
ing your own memory models. In some cases, this class can be sub-classed for special
functionality.
Note: The xtsc_memory module does not ensure RCW transactions are atomic. Ensuring
RCW transactions are atomic is the responsibility of upstream modules.
Here is a block diagram of an xtsc_memory as it is used in the hello_world example:
core0.get_request_port("pif")
(*core0_pif.m_request_exports[0])
nb_request()
xtsc_core core0
xtsc_memory core0_pif
(hello.out)
nb_respond()
(core0.get_respond_export("pif"))
(*core0_pif.m_respond_ports[0])
Here is the code to connect the system using the xtsc::xtsc_connect() method:
And here is the code to connect the system using manual SystemC port binding:
core0.get_request_port("pif")(*core0_pif.m_request_exports[0]);
(*core0_pif.m_respond_ports[0])(core0.get_respond_export("pif"));
See also:
xtsc_memory_parms
xtsc::xtsc_memory_b
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
xtsc::xtsc_core::How_to_do_port_binding
xtsc_arbiter
xtsc_dma_engine
xtsc_router
xtsc_master
Enumerator:
REQ_READ 0x00000001 = Single read
REQ_WRITE 0x00000002 = Write
REQ_BLOCK_READ 0x00000004 = Block read
REQ_RCW_1 0x00000008 = Read-conditional-write request #1
REQ_RCW_2 0x00000010 = Read-conditional-write request #2
REQ_BURST_READ 0x00000020 = Burst read
REQ_BURST_WRITE_1 0x00000100 = Burst write request #1
REQ_BURST_WRITE_2 0x00000200 = Burst write request #2
REQ_BURST_WRITE_3 0x00000400 = Burst write request #3
REQ_BURST_WRITE_4 0x00000800 = Burst write request #4
REQ_BURST_WRITE_5 0x00001000 = Burst write request #5
REQ_BURST_WRITE_6 0x00002000 = Burst write request #6
REQ_BURST_WRITE_7 0x00004000 = Burst write request #7
REQ_BURST_WRITE_8 0x00008000 = Burst write request #8
REQ_BLOCK_WRITE_1 0x00010000 = Block write request #1
REQ_BLOCK_WRITE_2 0x00020000 = Block write request #2
REQ_BLOCK_WRITE_3 0x00040000 = Block write request #3
REQ_BLOCK_WRITE_4 0x00080000 = Block write request #4
REQ_BLOCK_WRITE_5 0x00100000 = Block write request #5
REQ_BLOCK_WRITE_6 0x00200000 = Block write request #6
REQ_BLOCK_WRITE_7 0x00400000 = Block write request #7
REQ_BLOCK_WRITE_8 0x00800000 = Block write request #8
REQ_BLOCK_WRITE_9 0x01000000 = Block write request #9
REQ_BLOCK_WRITE_10 0x02000000 = Block write request #10
REQ_BLOCK_WRITE_11 0x04000000 = Block write request #11
REQ_BLOCK_WRITE_12 0x08000000 = Block write request #12
REQ_BLOCK_WRITE_13 0x10000000 = Block write request #13
REQ_BLOCK_WRITE_14 0x20000000 = Block write request #14
Parameters:
module_name Name of the xtsc_memory sc_module.
memory_parms The remaining parameters for construction.
See also:
xtsc_memory_parms
See also:
xtsc::xtsc_request_if::nb_peek
Reimplemented in xtsc_cache.
Definition at line 1071 of file xtsc_memory.h.
See also:
xtsc::xtsc_request_if::nb_poke
Reimplemented in xtsc_cache.
Definition at line 1078 of file xtsc_memory.h.
This method dumps the specified number of bytes from the memory. Each line of output is
divided into three columnar sections, each of which is optional. The first section contains
an address. The second section contains a hex dump of some (possibly all) of the data
(two hex nibbles and a space for each byte from the memory). The third section contains
an ASCII dump of the same data.
Parameters:
address8 The starting byte address in memory.
size8 The number of bytes of data to dump.
os The ostream object to which the data is to be dumped.
left_to_right If true, the data is dumped in the order: memory[0], memory[1],
..., memory[bytes_per_line-1]. If false, the data is dumped in the order:
memory[bytes_per_line-1], memory[bytes_per_line-2], ..., memory[0].
bytes_per_line The number of bytes to dump on each line of output. If bytes_per_line
is 0 then all size8 bytes are dumped on a single line with no newline at the end. If
bytes_per_line is non-zero, then all lines of output end in newline.
show_address If true, the first columnar section contains an address printed as an
8-hex-digit number with a 0x prefix. If false, the first columnar section is null and
takes no space in the output.
show_hex_values If true, the second (middle) columnar section of hex data values
is printed. If false, the second columnar section is null and takes no space in the
output.
do_column_heading If true, print byte position column headings over the hex val-
ues section. If false, no column headings are printed. If show_hex_values is
false, then the do_column_heading value is ignored and no column headings are
printed.
show_ascii_values If true, the third (last) columnar section of ASCII data values is
printed (if an ASCII value is a non-printable character a period is printed). If
show_ascii_values is false, the third columnar section is null and takes no space
in the output.
adjust_address If adjust_address is true and address8 modulo bytes_per_line is not
0, then offset the printed values on the first line of the hex and ASCII colum-
nar sections and adjust the printed address so that the printed address modulo
bytes_per_line is always zero. Otherwize, do not offset the first printed data val-
ues and do not adjust the printed address.
Set whether or not exlusive access requests are supported. Note: Calling this method when
xtsc_memory_parms "exclusive_script_file" is defined has no useful effect and results in a
warning.
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
7.80.4.6 void execute (const std::string & cmd_line, const std::vector< std::string
> & words, const std::vector< std::string > & words_lc, std::ostream &
result) [virtual]
change_clock_period <ClockPeriodFactor>
Call xtsc_memory::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this device.
dump_exclusive_monitors
Dump all exclusive monitors, one per line, with format:
<TranID>:<AddressBeg>-<AddressEnd>
dump_filtered_request
Dump the most recent previous xtsc_request that passed a xtsc_request
watchfilter.
dump_filtered_response
Dump the most recent previous xtsc_response that passed a xtsc_response
watchfilter.
get_exclusive_monitors_count
Return the number of exclusive monitors currently active.
get_total_exclusive_monitors_created
Return the total number of exclusive monitors created so far in the simulation.
reset [<Hard>]
Call xtsc_memory::reset(<Hard>). Where <Hard> is 0|1 (default 0).
support_exclusive [<Exclusive>]
Call xtsc_memory::support_exclusive(<Exclusive>), where <Exclusive> is 0|1, or
return xtsc_memory::m_support_exclusive.
watchfilter_dump
Return xtsc_memory::watchfilter_dump().
watchfilter_remove <Watchfilter> | *
Return xtsc_memory::watchfilter_remove(<Watchfilter>). An * removes all
watchfilters.
Implements xtsc_command_handler_interface.
Reimplemented in xtsc_cache, and xtsc_dma_engine.
Connect an xtsc_arbiter with this xtsc_memory. This method connects the master port pair
of the specified xtsc_arbiter with the specified slave port pair of this xtsc_memory.
Parameters:
arbiter The xtsc_arbiter to connect with this xtsc_memory.
port_num The slave port pair of this memory to connect the xtsc_arbiter with.
Connect an xtsc_core with this xtsc_memory. This method connects the specified memory
interface master port pair of the specified xtsc_core with the specified slave port pair of this
xtsc_memory.
Parameters:
core The xtsc::xtsc_core to connect with this xtsc_memory.
memory_port_name The name of the memory interface master port pair of the xtsc_-
core to connect with this xtsc_memory.
port_num The slave port pair of this xtsc_memory to connect the xtsc_core with.
single_connect If true only one slave port pair of this memory will be connected. If
false, the default, and if memory_port_name names the first port of an uncon-
nected multi-ported interface of core and if port_num is 0 and if the number of
ports this memory has matches the number of multi-ports in the core interface,
then all master port pairs of the core interface specified by memory_port_name
will be connected to the slave port pairs of this xtsc_memory.
Returns:
number of ports that were connected by this call (1 or 2)
Connect an xtsc_dma_engine with this xtsc_memory. This method connects the master
port pair of the specified xtsc_dma_engine with the specified slave port pair of this xtsc_-
memory.
Parameters:
dma The xtsc_dma_engine to connect with this xtsc_memory.
port_num The slave port pair of this memory to connect the xtsc_dma_engine with.
Connect an xtsc_master with this xtsc_memory. This method connects the master port
pair of the specified xtsc_master with the specified slave port pair of this xtsc_memory.
Parameters:
master The xtsc_master to connect with this xtsc_memory.
port_num The slave port pair of this memory to connect the xtsc_master with.
Connect an xtsc_memory_trace with this xtsc_memory. This method connects the speci-
fied master port pair of the upstream xtsc_memory_trace with the specified slave port pair
of this xtsc_memory.
Parameters:
memory_trace The xtsc_memory_trace to connect with this xtsc_memory.
trace_port The master port pair of the xtsc_memory_trace to connect with this xtsc_-
memory.
port_num The slave port pair of this memory to connect the xtsc_memory_trace with.
single_connect If true only one slave port pair of this memory will be connected. If
false, the default, then all contiguous, unconnected slave port pairs of this mem-
ory starting at port_num that have a corresponding existing master port pair in
memory_trace (starting at trace_port) will be connected with that corresponding
memory_trace master port pair.
Returns:
number of ports that were connected by this call (1 or more)
Parameters:
pin2tlm The xtsc_pin2tlm_memory_transactor to connect with this xtsc_memory.
tran_port The xtsc_pin2tlm_memory_transactor TLM master port pair to connect with
this xtsc_memory.
port_num The slave port pair of this xtsc_memory to connect the xtsc_pin2tlm_-
memory_transactor with.
single_connect If true only one slave port pair of this xtsc_memory will be connected.
If false, the default, then all contiguous, unconnected slave port pairs of this xtsc_-
memory starting at port_num that have a corresponding existing TLM master port
pair in pin2tlm (starting at tran_port) will be connected with that corresponding
pin2tlm master port pair.
Connect an xtsc_router with this xtsc_memory. This method connects the specified master
port pair of the specified xtsc_router with the specified slave port pair of this xtsc_memory.
Parameters:
router The xtsc_router to connect with this xtsc_memory.
router_port The xtsc_router master port pair to connect with this xtsc_memory.
port_num The slave port pair of this xtsc_memory to connect the xtsc_router with.
Parameters:
filter_name The filter instance name. The actual xtsc::xtsc_filter object will be ob-
tained via a call to xtsc::xtsc_filter_get. Its kind must be one of "xtsc_peek",
"xtsc_poke", "xtsc_request", or "xtsc_response".
event The sc_event to notify when a nb_peek, nb_poke, nb_request, or nb_response
(as appropriate) occurs whose payload and port passes the filter.
Returns:
the watchfilter number (use to remove the watchfilter).
See also:
watchfilter_remove
xtsc::xtsc_filter
xtsc::xtsc_filter_get
Parameters:
os The ostream object to which the watchfilters should be dumped.
See also:
watchfilter_add
xtsc::xtsc_filter
Parameters:
watchfilter The number returned from a previous call to watchfilter_add. A -1
(0xFFFFFFFF) means to remove all watchfilters on this xtsc_memory instance.
Returns:
the number (count) of watchfilters removed.
See also:
watchfilter_add
xtsc::xtsc_filter
This method can be used to control the sending of false error responses (for example, to
test the upstream memory interface master device’s handling of them).
Parameters:
status see "fail_status" in xtsc_memory_parms.
request_mask see "fail_request_mask" in xtsc_memory_parms.
fail_percentage see "fail_percentage" in xtsc_memory_parms.
Determine if the specified request should get a special response and also compute type.
Parameters:
request The xtsc_request object.
port_num The slave port number the request came in on.
status Reference in which to return the response status based on the "script_file".
Even if this is RSP_OK, the request might still get an error response due to a real
error.
list Reference in which to return list flag to indicate BLOCK_READ and BURST_-
READ responses should set their status according to response list.
type Reference in which to return the request type: 0=READ, 1=BLOCK_READ,
2=RCW, 3=WRITE, 4=BLOCK_WRITE
Returns:
true if this request matches up with one of the address lists.
Parameters:
list Use response list for status instead of the return value.
Method to convert an address or address range string into a pair of numeric addresses.
An address range must be specified without any spaces. For example, 0x80000000-
0x8FFFFFFF.
Parameters:
index The index of the string in m_words[].
argument_name The name of the argument being converted. This name is from the
"script_file" line format documentation.
low_address The converted low address.
high_address If the string is an address range then this is the converted high address.
Otherwise, this is equal to low_address.
Returns:
true if the string is an address range.
See also:
xtsc::xtsc_memory_b::load_initial_values
• xtsc_memory.h
xtsc_memory_b
xtsc_memory_base
xtsc_script_file
m_p_initial_value_file
xtsc_memory_b
• xtsc_memory_b (const char ∗name, const char ∗kind, xtsc::u32 byte_width, xtsc::u32
start_byte_address, xtsc::u32 memory_byte_size, xtsc::u32 page_byte_size, const
char ∗initial_value_file, xtsc::u8 memory_fill_byte, bool host_shared_memory=false,
bool host_mutex=false, const char ∗shared_memory_name=NULL)
Constructor for an xtsc_memory_b.
• void load_initial_values ()
Method to initialize memory contents.
Public Attributes
• std::string m_name
The hierarchical name of the module using this memory.
• std::string m_kind
The kind of module using this memory.
• xtsc::xtsc_address m_start_address8
The starting byte address of this memory.
• xtsc::u64 m_size8
The byte size of this memory.
• xtsc::u32 m_width8
The byte width of this memories data interface.
• xtsc::xtsc_address m_end_address8
The ending byte address of this memory.
• xtsc::xtsc_address m_page_offset_mask
Mask for getting the page offset mask.
• xtsc::u32 m_num_pages
The number of pages in this memory.
• xtsc::u8 ∗∗ m_page_table
The page table for this memory.
• std::string m_initial_value_file
The name of the optional file containing initial values.
• xtsc::xtsc_script_file ∗ m_p_initial_value_file
Pointer to the optional initial value file object.
• xtsc::u8 m_memory_fill_byte
Uninitialized memory has this value.
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
• xtsc::u64 m_page_size8
Memory page size for allocation - must be a power of 2.
• xtsc::u32 m_page_size8_log2
Log base 2 of memory page size.
• bool m_host_shared_memory
Create host OS shared memory for each page.
• bool m_host_mutex
Create and use a xtsc_host_mutex object for this memory.
• std::string m_shared_memory_name
Host OS shared memory name.
• xtsc::xtsc_host_mutex ∗ m_p_host_mutex
Mutex object for the shared memory.
Class for a memory model. This class contains a lot of common code that can be used by
either a TLM or pin-level memory model.
See also:
xtsc_memory
xtsc_memory_pin
Parameters:
name The hierarchical name of the sc_module using this memory model.
kind The kind the sc_module using this memory model.
byte_width See "byte_width" in xtsc_memory_parms
start_byte_address See "start_byte_address" in xtsc_memory_parms.
memory_byte_size See "memory_byte_size" in xtsc_memory_parms.
page_byte_size See "page_byte_size" in xtsc_memory_parms. Ignored when
"host_shared_memory" is true.
initial_value_file See "initial_value_file" in xtsc_memory_parms. Must be NULL
when "host_shared_memory" is true.
memory_fill_byte See "memory_fill_byte" in xtsc_memory_parms. Ignored when
"host_shared_memory" is true.
host_shared_memory True if host OS shared memory should be used for the back-
ing store of this memory instance.
host_mutex True if a host OS level mutex (xtsc_host_mutex) should be made for the
shared memory. The xtsc_memory_b class will take care of lock and unlock dur-
ing calls to its poke, write_u8, and write_u32 methods. The xtsc_memory_b client
is responsible for calling lock() and unlock() if it modifies memory directly and for
PIF RCW and PIF/AXI exclusive activity. If this parameter is true, then atomic
access addresses should be in Xtensa’s uncached space and atomic accesses
must always occur in pairs (RCW1/RCW2 pair or exclusive read/write pair). Note:
Host mutex support in XTSC is an experimental feature.
shared_memory_name Name to used for the host shared memory. If NULL or empty,
then the default name will be used.
See also:
xtsc::xtsc_request_if::nb_peek
See also:
xtsc::xtsc_request_if::nb_poke
This method dumps the specified number of bytes from the memory. Each line of output is
divided into three columnar sections, each of which is optional. The first section contains
an address. The second section contains a hex dump of some (possibly all) of the data
(two hex nibbles and a space for each byte from the memory). The third section contains
an ASCII dump of the same data.
Parameters:
address8 The starting byte address in memory.
size8 The number of bytes of data to dump.
os The ostream object to which the data is to be dumped.
left_to_right If true, the data is dumped in the order: memory[0], memory[1],
..., memory[bytes_per_line-1]. If false, the data is dumped in the order:
memory[bytes_per_line-1], memory[bytes_per_line-2], ..., memory[0].
bytes_per_line The number of bytes to dump on each line of output. If bytes_per_line
is 0 then all size8 bytes are dumped on a single line with no newline at the end. If
bytes_per_line is non-zero, then all lines of output end in newline.
show_address If true, the first columnar section contains an address printed as an
8-hex-digit number with a 0x prefix. If false, the first columnar section is null and
takes no space in the output.
show_hex_values If true, the second (middle) columnar section of hex data values
is printed. If false, the second columnar section is null and takes no space in the
output.
do_column_heading If true, print byte position column headings over the hex val-
ues section. If false, no column headings are printed. If show_hex_values is
false, then the do_column_heading value is ignored and no column headings are
printed.
show_ascii_values If true, the third (last) columnar section of ASCII data values is
printed (if an ASCII value is a non-printable character a period is printed). If
show_ascii_values is false, the third columnar section is null and takes no space
in the output.
See also:
lock()
The documentation for this class was generated from the following file:
• xtsc_memory_b.h
xtsc_memory_b
xtsc_memory_base
xtsc_script_file
m_p_initial_value_file
xtsc_memory_b
xtsc_memory_base
• xtsc_memory_base.h
xtsc_parms
xtsc_memory_parms
xtsc_cache_parms xtsc_dma_engine_parms
xtsc_parms
xtsc_memory_parms
Constructor parameters for a xtsc_memory object. This class contains the constructor
parameters for an xtsc_memory object.
"num_ports" u32 The number of slave port pairs this memory has. This
defines how many memory interface master devices will be
connected with this memory. It is allowed to set this
parameter to 0 if no "hardware" memory interfaces are
desired (for example, if the xtsc_memory is only going
to be accessed using XTSC command facility commands or
direct calls to xtsc_memory API's that do not go through
an sc_port).
Default = 1.
Minimum = 0.
"byte_width" u32 Memory data interface width in bytes. Valid values are
0, 4, 8, 16, 32, and 64. A value of 0 indicates that this
memory supports all of the valid data interface widths.
This can be useful, for example, to model a memory that
is connected to multiple Xtensa cores that do not all
have the same PIF data interface width.
Default = 4.
"start_byte_address" u32 The starting byte address of this memory in the 4GB
address space.
Default = 0x00000000.
"memory_byte_size" u32 The byte size of this memory. 0 means the memory
occupies all of the 4GB address space at and above
"start_byte_address".
Default = 0.
"request_fifo_depth" u32 The request FIFO depth (i.e. how many entries it has).
Note: A request transfer (a beat) takes one entry in the
FIFO. Single WRITE, single READ, BLOCK_READ, and
BURST_READ transactions each have a single request
transfer and take up only 1 entry in the FIFO. A
BLOCK_WRITE transaction has N=2|4|8|16 request transfers
and takes up to N entries in the FIFO (how many entries
in the FIFO a given BLOCK_WRITE transaction sequence
actually takes depends upon the memory timing parameters
and the arrival times of the transfers). BURST_WRITE
transactions work similar to BLOCK_WRITE transactions.
Note: A request transfer that arrives while the request
FIFO is full will receive an RSP_NACC.
Default = 2.
Minimum = 1.
"immediate_timing" bool If true, the above delays parameters are ignored and
the memory model responds to all requests immediately
(without any delay--not even a delta cycle). If false,
the above delay parameters are used to determine
response timing.
Note: Setting this parameter to true typically will not
work on configs that issue BLOCK_READ requests because
the ISS does not support getting multiple responses in
the same clock period.
Default = false.
"initial_value_file" char* If not NULL or empty, this names a text file from which
to read the initial memory contents as byte values.
Note: "initial_value_file" should not be set when
"host_shared_memory" is true.
Default = NULL.
The text file format is:
([@<Offset>] <Value>*)*
"memory_fill_byte" u32 The low byte specifies the value used to initialize
memory contents at address locations not initialize
from "initial_value_file".
Note: "memory_fill_byte" does not apply when
"host_shared_memory" is true.
Default = 0.
"host_shared_memory" bool If true the backing store for this memory will be host
OS shared memory (created using shm_open() on Linux and
CreateFileMapping() on MS Windows). If this parameter
is true then "page_byte_size", "memory_fill_byte", and
"initial_value_file" do not apply and should be left at
their default value. If desired, a Lua script can be
used to initialize memory contents. See
"lua_script_file_eoe" in xtsc:xtsc_initialize_parms.
Default = false.
"shared_memory_name" char* The shared memory name to use when creating host OS
shared memory. If this parameter is left at its default
setting of NULL, then the default name will be formed by
concatenating the user name, a period, and the module
instance hierarchical name. For example:
MS Windows: joeuser.myshmem
Linux: /dev/shm/joeuser.myshmem
This parameter is ignored if "host_shared_memory" is
false.
Default = NULL (use default shared memory name)
Note: For performance reasons, it is best to have the smallest memory possible
protected by a host OS level mutex. If a larger shared memory is required, this can
be accomplished by modelling the single large shared memory in XTSC as two separate
xtsc_memory instances, both with shared memory enabled but only one of them with
"host_mutex" set to true. All used memory addresses protected by hardware
synchronization (PIF RCW or PIF/AXI exclusive) should be located within the single
small mutex-enabled memory. An xtsc_router with its "immediate_timing" parameter
set to true can be used to combine the two xtsc_memory instances.
Note: To use a fast access method other then raw access, set "use_raw_access" to
false, and at most one of "use_callback_access", "use_custom_access", and
"use_interface_access" to true. If all 4 are false, then normal nb_peek/nb_poke
through all upstream devices will be used for fast access. Setting "use_raw_access"
to false is primarily for testing purposes.
"exclusive_script_file" char* If not NULL or empty, this names a text file from which
exclusive write responses will be read. Each non-empty,
non-comment line must have the following format (where
<value> can be 0 or 1):
<value> [<Address>]
Each time an exclusive WRITE request is received a line
from the file will be read and used in a call to
xtsc_response::set_exclusive(<value>). If <Address> is
specified then it will be checked against the request
address and an exception will be thrown if there is a
mismatch. If the end of the file is reached, processing
will wrap around to the beginning of the file. When the
first transfer of an exclusive BLOCK_WRITE sequence is
received, one line will be read from the file and its
content will control all beats of the BLOCK_WRITE
sequence. Each time an exclusive read request is
received xtsc_response::set_exclusive(1) will be called
and no line will be read from the file. The file is
opened as an xtsc_script_file, so comments, extra
NOTE message
INFO message
clock cycles.
9. You can use an asterisk in lieu of lowAddr-highAddr
to indicate all addresses in this memory's address
space.
10. The CLEAR commands cause the specified single address
or address range to be removed from the list of
single addresses or address ranges. CLEAR by itself
clears all single addresses and all address ranges.
Although you can have multiple response definitions
in effect at one time, given an address and a point
in time in the simulation, at most one response
definition can be in effect for that address.
Because of this, the CLEAR command is often used
after one of the timing control lines in order to
remove a response definition for an address before
defining a new response for that address.
11. The "SYNC time" command can be used to cause a wait
until the specified absolute simulation time.
12. The "WAIT duration" command can be used to cause a
wait for duration clock cycles.
13. The "WAIT port request match [count]" command can be
used to cause a wait until count number of requests
of the specified request type and with the specified
match criteria have been received on the specified
port.
14. The "delay STOP" command will call sc_stop() after
delaying delay cycles.
15. The DUMP command will cause a list of all current
single addresses and address ranges that have a
response status defined to be dumped using the
logging facility. log_level can be INFO|NOTE.
16. The USER_DATA commands can be used to override the
default user data in the response. The
"USER_DATA length value" command passes value to
method xtsc_response::set_user_data(value). The
length argument specifies how many bytes are in
value and it must be greater than 0 and not exceed 4
(32-bit simulator) or 8 (64-bit simulator). The
"USER_DATA * byte ..." command, allocates memory for
the number of bytes in "byte ...", populates that
memory with those bytes, and calls set_user_data()
with a pointer to the allocated memory. The
"USER_DATA" command with no arguments, returns to
using the default response user data (that is, the
same user data as came in on the request, if any).
17. The RESPONSE_LIST command can be used to specify a
sequence of responses (0=RSP_OK, 2=RSP_DATA_ERROR).
This list is only used for a response definition
line with a status of response_list and a type of
block_read or burst_read. The initial list contains
16 RSP_DATA_ERROR entries, but these are overwritten
if a RESPONSE_LIST command is encountered. If there
are fewer entries in the list then required for a
particular request, then the missing entries are
assumed to be RSP_OK.
18. The LUA_FUNCTION command can be used to name a Lua
function to be called when a matching request is
wait * * * 1000
note 1000 requests received; the next two will get RSP_NACC
* * * nacc 2
Note: The implementation of the "script_file" facility assumes that at most one
request can occur in a single delta cycle. If this is not the case (e.g. when
"num_ports" is greater then 1) the behavior of the "script_file" facility may be
different then what you desire.
"wraparound" bool Specifies what will happen when the end of file (EOF) is
reached on "script_file". When EOF is reached and
"wraparound" is true, "script_file" will be reset to the
beginning of file and the script will be processed
again. When EOF is reached and "wraparound" is false,
the xtsc_memory object will cease processing the script
file itself but response definitions may still remain in
effect.
Default = false.
Note: Combining the two methods for generating special responses is not supported.
That is, it is not legal for both "script_file" and "fail_request_mask" to be
non-zero.
See also:
xtsc_memory
xtsc_memory::request_type_t
xtsc::xtsc_parms
xtsc::xtsc_response
xtsc::xtsc_response::status_t
xtsc::xtsc_script_file
Constructor for an xtsc_memory_parms object. After the object is constructed, the data
members can be directly written using the appropriate xtsc_parms::set() method in cases
where non-default values are desired.
Parameters:
width8 Memory data interface width in bytes.
delay Default delay for read and write in terms of this memory’s clock period (see
"clock_period"). Local memory devices should use a delay of 0 for a 5-stage
pipeline and a delay of 1 for a 7-stage pipeline. PIF memory devices should use
a delay of 1 or more.
start_address8 The starting byte address of this memory.
size8 The byte size of this memory. 0 means the memory occupies all of the 4GB
address space at and above start_address8.
num_ports The number of ports this memory has.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_memory_parms.
port_name The memory port name (the name of the memory interface). Note: The
core configuration must have the named memory interface.
delay Default delay for PIF read and write in terms of this memory’s clock period (see
"clock_period"). PIF memory devices should use a delay of 1 or more. A value
of 0xFFFFFFFF (the default) means to use a delay of 1 if the core has a 5-stage
pipeline and a delay of 2 if the core has a 7-stage pipeline. For non-PIF interfaces,
the delay is 0 or 1 (5 or 7 stage, respectively) regardless of the value passed in.
num_ports The number of ports this memory has. If 0, the default, the number of
ports will be inferred based on the number of multi-ports in the port_name core
interface (assuming they are unbound).
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of legal port_name values.
The documentation for this class was generated from the following file:
• xtsc_memory.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_module_pin_base
xtsc_memory_pin
m_p_initial_value_file
m_p_memory
xtsc_debug_if xtsc_memory_pin
m_memory_pin m_debug_impl
xtsc_debug_if_impl
Classes
• class pif_req_info
Information about each request.
• class xtsc_debug_if_impl
Implementation of xtsc_debug_if.
Public Types
• typedef sc_core::sc_fifo< bool > bool_fifo
• typedef sc_core::sc_fifo< sc_dt::sc_bv_base > wide_fifo
• typedef sc_core::sc_signal< bool > bool_signal
• typedef sc_core::sc_signal< sc_dt::sc_uint_base > uint_signal
• typedef sc_core::sc_signal< sc_dt::sc_bv_base > wide_signal
• typedef std::map< std::string, bool_signal ∗ > map_bool_signal
• typedef std::map< std::string, uint_signal ∗ > map_uint_signal
• typedef std::map< std::string, wide_signal ∗ > map_wide_signal
• ∼xtsc_memory_pin (void)
Destructor.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_debug_if > ∗∗ m_debug_exports
From master to us (per mem port).
• xtsc::Readme How_to_get_input_and_output_ports
Protected Attributes
• xtsc_debug_if_impl ∗∗ m_debug_impl
m_debug_exports binds to these (per mem port)
• xtsc::xtsc_memory_b ∗ m_p_memory
The memory itself.
• xtsc::u32 m_request_fifo_depth
From "request_fifo_depth" parameter.
• xtsc::u32 m_num_ports
The number of ports this memory has.
• std::string m_interface_uc
Uppercase version of "memory_interface" parameter.
• std::string m_interface_lc
Lowercase version of "memory_interface" parameter.
• memory_interface_type m_interface_type
The memory interface type.
• xtsc::u32 m_dram_attribute_width
See "dram_attribute_width" parameter.
• sc_dt::sc_bv_base m_dram_attribute_bv
To read dram attribute for logging.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
This device’s clock period as sc_time.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• sc_core::sc_time m_sample_phase
Clock phase at which inputs are sampled (from "sample_phase").
• sc_core::sc_time m_sample_phase_plus_one
m_sample_phase plus one clock period
• sc_core::sc_time m_drive_phase
Clock phase at which outputs are driven (from "drive_phase").
• sc_core::sc_time m_drive_phase_plus_one
m_drive_phase plus one clock period
• sc_core::sc_time m_drive_to_sample_time
Time from m_drive_phase to next sample phase (PIF|IDMA0).
• sc_core::sc_time m_sample_to_drive_time
Time from next sample phase to next drive phase (PIF|IDMA0).
• sc_core::sc_time m_sample_to_drive_data_delay
Time to wait from sampling inputs to driving data output (lcl mem).
• sc_core::sc_time m_sample_to_drive_busy_delay
Time to wait from sampling inputs to driving busy output (lcl mem).
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• xtsc::u32 m_read_delay_value
See "read_delay" parameter.
• xtsc::u32 m_next_port_lcl_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_drive_read_data_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_drive_busy_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_drive_req_rdy_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_respond_thread
To give each thread instance a port number.
• sc_core::sc_time m_read_delay
See "read_delay" parameter.
• sc_core::sc_time m_block_read_delay
See "block_read_delay" parameter.
• sc_core::sc_time m_block_read_repeat
See "block_read_repeat" parameter.
• sc_core::sc_time m_burst_read_delay
See "burst_read_delay" parameter.
• sc_core::sc_time m_burst_read_repeat
See "burst_read_repeat" parameter.
• sc_core::sc_time m_rcw_repeat
See "rcw_repeat" parameter.
• sc_core::sc_time m_rcw_response
See "rcw_response" parameter.
• sc_core::sc_time m_write_delay
See "write_delay" parameter.
• sc_core::sc_time m_block_write_delay
See "block_write_delay" parameter.
• sc_core::sc_time m_block_write_repeat
See "block_write_repeat" parameter.
• sc_core::sc_time m_block_write_response
See "block_write_response" parameter.
• sc_core::sc_time m_burst_write_delay
See "burst_write_delay" parameter.
• sc_core::sc_time m_burst_write_repeat
See "burst_write_repeat" parameter.
• sc_core::sc_time m_burst_write_response
See "burst_write_response" parameter.
• sc_core::sc_time ∗ m_last_action_time_stamp
Time of last action: recovery time starts from here (per mem port).
• bool m_cbox
See "cbox" parameter.
• bool m_split_rw
True if m_interface_type is DRAM0RW or DRAM1RW.
• bool m_has_dma
See "has_dma" parameter.
• bool m_append_id
True if pin port names should include the set_id.
• bool m_inbound_pif
True if interface is inbound PIF.
• bool m_has_coherence
See "has_coherence" parameter (future use).
• bool m_has_pif_attribute
See "has_pif_attribute" parameter.
• bool m_has_pif_req_domain
See "has_pif_req_domain" parameter.
• bool m_use_fast_access
See "use_fast_access" parameter.
• bool m_big_endian
True if master is big endian.
• bool m_has_request_id
True if the "POReqId" and "PIRespId" ports should be present.
• bool m_write_responses
See "write_responses" parameter.
• std::string m_req_user_data
See "req_user_data" parameter.
• std::string m_req_user_data_name
Name of request user data port.
• xtsc::u32 m_req_user_data_width1
Bit width of request user data port.
• std::string m_rsp_user_data
See "rsp_user_data" parameter.
• std::string m_rsp_user_data_name
Name of response user data port.
• xtsc::u32 m_rsp_user_data_width1
Bit width of response user data port.
• bool m_rsp_user_data_val_echo
True if "rsp_user_data_val" is "echo".
• xtsc::u32 m_address_bits
Number of bits in the address (non-PIF|IDMA0 only).
• xtsc::u32 m_check_bits
Number of bits in ECC/parity signals (from "check_bits").
• xtsc::u32 m_setw
Number of nibbles to use when displaying an address.
• xtsc::u32 m_address_shift
Number of bits to left-shift the address.
• xtsc::u32 m_address_mask
To mask out unused bits of address.
• xtsc::u32 m_route_id_bits
Number of bits in the route ID (PIF|IDMA0 only).
• bool m_has_busy
True if memory interface has a busy pin (non-PIF|IDMA0 only).
• bool m_has_lock
True if memory interface has a lock pin (DRAM0|DRAM0BS|DRAM0RW|DRAM1|DRAM1BS|DRAM1RW
only).
• bool m_has_xfer_en
True if memory interface has Xfer enable pin (NA PIF|IDMA0|DROM0|XLMI0).
• bool ∗ m_testing_busy
We’re asserting PIReqRdy because of "busy_percentage".
• xtsc::i32 m_busy_percentage
Percent of requests that will get a busy response.
• sc_core::sc_event ∗ m_pif_req_event
Event used to notify pif_respond_thread (per mem port).
• sc_core::sc_event ∗ m_pif_req_rdy_event
Event used to notify pif_drive_req_rdy_thread (per mem port).
• sc_core::sc_event ∗ m_respond_event
Event used to notify pif_request_thread (per mem port).
• bool ∗ m_first_block_write
True if next BLOCK_WRITE will be first in the block (per mem port).
• bool ∗ m_first_burst_write
True if next BURST_WRITE will be first in the block (per mem port).
• xtsc::u32 ∗ m_block_write_xfers
Num transfers from first transfer of BLOCK_WRITE (per mem port).
• xtsc::xtsc_address ∗ m_block_write_address
Base address from first transfer of BLOCK_WRITE (per mem port).
• xtsc::xtsc_address ∗ m_block_write_offset
Address offset for this/next BLOCK_WRITE transfer (per mem port).
• xtsc::xtsc_address ∗ m_burst_write_address
Address to be used for next BURST_WRITE (per mem port).
• sc_dt::sc_uint_base m_address
The address after any required shifting and masking.
• sc_dt::sc_bv_base ∗∗ m_data
POReqData/PIRespData, also temp buffer for lcl memory reads.
• sc_dt::sc_bv_base ∗∗ m_data_to_be_written
For delayed handling of lcl memory write data.
• sc_dt::sc_bv_base ∗∗ m_rcw_compare_data
RCW compare data from 1st transfer of RCW (per mem port).
• sc_dt::sc_bv_base ∗∗ m_rsp_user_data_val
Value to be drive on signal defined by "rsp_user_data" parameter.
• sc_dt::sc_uint_base m_id_zero
For deasserting PIRespId.
• sc_dt::sc_uint_base m_priority_zero
For deasserting PIRespPriority.
• sc_dt::sc_uint_base m_route_id_zero
For deasserting PIRespRouteId.
• sc_dt::sc_bv_base m_data_zero
For deasserting PIRespData.
• resp_cntl m_resp_cntl_zero
For deasserting PIRespCntl.
• sc_dt::sc_uint_base m_coh_cntl
For driving PIRespCohCntl.
• req_cntl m_req_cntl
Value from POReqCntl.
• resp_cntl m_resp_cntl
Value for PIRespCntl.
• wide_fifo ∗∗ m_read_data_fifo
sc_fifo of sc_bv_base read data values (lcl mem) (per mem port)
• bool_fifo ∗∗ m_busy_fifo
sc_fifo of busy values (lcl mem) (per mem port)
• sc_core::sc_event_queue ∗∗ m_read_event_queue
When read data should be driven (lcl mem) (per mem port).
• sc_core::sc_event_queue ∗∗ m_busy_event_queue
When busy should be driven (lcl mem) (per mem port).
• map_bool_signal m_map_bool_signal
The optional map of all sc_signal<bool> signals.
• map_uint_signal m_map_uint_signal
The optional map of all sc_signal<sc_uint_base> signals.
• map_wide_signal m_map_wide_signal
The optional map of all sc_signal<sc_bv_base> signals.
• bool_input ∗∗ m_p_en
DPortEn, DRamEn, DRomEn, IRamEn, IRomEn (per mem port).
• uint_input ∗∗ m_p_addr
DPortAddr, DRamAddr, DRomAddr, IRamAddr, IRomAddr (per mem port).
• uint_input ∗∗ m_p_lane
DPortByteEn, DRamByteEn, DRomByteEn, IRamWordEn, IRomWordEn (per mem port).
• wide_input ∗∗ m_p_wrdata
DPortWrData, DRamWrData, IRamWrData (per mem port).
• bool_input ∗∗ m_p_wr
DPortWr, DRamWr, IRamWr (per mem port).
• bool_input ∗∗ m_p_load
DPortLoad, IRamLoadStore, IRomLoad - Trace only (per mem port).
• bool_input ∗∗ m_p_retire
DPortLoadRetired - Trace only (per mem port).
• bool_input ∗∗ m_p_flush
DPortRetireFlush - Trace only (per mem port).
• bool_input ∗∗ m_p_lock
DRamLock (per mem port or bank, if subbanked).
• wide_input ∗∗ m_p_attr
DRamAttr, DRamWrAttr.
• wide_input ∗∗ m_p_check_wr
DRamCheckWrData, IRamCheckWrData.
• wide_output ∗∗ m_p_check
DRamCheckData, IRamCheckData.
• bool_input ∗∗ m_p_xfer_en
DRamXferEn, IRamXferEn, IRomXferEn, URamXferEn.
• bool_output ∗∗ m_p_busy
DPortBusy, DRamBusy, DRomBusy, IRamBusy, IRomBusy (per mem port or bank, if sub-
banked).
• wide_output ∗∗ m_p_data
DPortData, DRamData, DRomData, IRamData, IRomData (per mem port).
• bool_input ∗∗ m_p_req_valid
• uint_input ∗∗ m_p_req_cntl
POReqCntl (per mem port).
• uint_input ∗∗ m_p_req_adrs
POReqAdrs (per mem port).
• wide_input ∗∗ m_p_req_data
POReqData (per mem port).
• uint_input ∗∗ m_p_req_data_be
POReqDataBE (per mem port).
• uint_input ∗∗ m_p_req_id
POReqId (per mem port).
• uint_input ∗∗ m_p_req_priority
POReqPriority (per mem port).
• uint_input ∗∗ m_p_req_route_id
POReqRouteId (per mem port).
• uint_input ∗∗ m_p_req_attribute
POReqAttribute (per mem port).
• uint_input ∗∗ m_p_req_domain
POReqDomain (per mem port).
• uint_input ∗∗ m_p_req_coh_vadrs
POReqCohVAdrsIndex (per mem port).
• uint_input ∗∗ m_p_req_coh_cntl
POReqCohCntl (per mem port).
• wide_input ∗∗ m_p_req_user_data
Request User Data. See "req_user_data" parameter.
• bool_output ∗∗ m_p_req_rdy
PIReqRdy (per mem port).
• bool_output ∗∗ m_p_resp_valid
• uint_output ∗∗ m_p_resp_cntl
PIRespCntl (per mem port).
• wide_output ∗∗ m_p_resp_data
PORespData (per mem port).
• uint_output ∗∗ m_p_resp_id
PIRespId (per mem port).
• uint_output ∗∗ m_p_resp_priority
PIRespPriority (per mem port).
• uint_output ∗∗ m_p_resp_route_id
PIRespRouteId (per mem port).
• uint_output ∗∗ m_p_resp_coh_cntl
PIRespCohCntl (per mem port).
• wide_output ∗∗ m_p_resp_user_data
Response User Data. See "rsp_user_data" parameter.
• bool_input ∗∗ m_p_resp_rdy
PORespRdy (per mem port).
• xtsc::xtsc_address m_start_address8
The starting byte address of this memory.
• xtsc::u32 m_size8
The byte size of this memory.
• xtsc::u32 m_width8
The byte width of this memories data interface.
• xtsc::u32 m_enable_bits
Number of explicit/implied byte/word enable bits.
• xtsc::xtsc_address m_end_address8
The ending byte address of this memory.
For reset.
Text logger.
Binary logger.
Friends
• class pif_req_info
• std::ostream & operator<< (std::ostream &os, const pif_req_info &info)
This device implements a pin-level memory model. It can be driven by any of the XTSC
TLM memory interface master modules by using an xtsc_tlm2pin_memory_transactor to
convert the TLM requests/responses into pin-level requests/responses. In addition, when
doing SystemC-Verilog cosimulation, this model can be driven by any Verilog module which
supports the configured Xtensa memory interface and protocol.
This model supports any of the Xtensa memory interfaces (except caches) and it supports
operating as a multi-ported memory. It also supports generating a random busy/not-ready
signal for testing purposes.
The SystemC names of the pin-level ports exactly match the pin names of the Xtensa RTL.
For example, an Xtensa core with a PIF has an output pin called "POReqValid" and, when
it is serving as a PIF memory, this module has a matching SystemC input port which is also
called "POReqValid" (see data member m_p_req_valid).
Note: The parity/ECC signals (DRamNCheckDataM, DRamNCheckWrDataM, IRam-
NCheckData, and IRamNCheckWrData) are present for IRAM and DRAM interfaces when
"check_bits" is non-zero; however, the input signal is ignored and the output signal is driven
with constant 0. Similarly, the DRamNLockM signals are present when "has_lock" is true;
however, the input is ignored.
Here is a block diagram of an xtsc_memory_pin as it is used in the xtsc_tlm2pin_memory_-
transactor example:
POReqValid
req
PIReqRdy
POReqCntl 8
/
POReqAdrs 32
/
POReqData 32
/
POReqDataBE 4
/
POReqId 6
/
rsp PIRespValid
xtsc_core core0
PORespRdy
PIRespCntl 8
/
PIRespData 32
/
PIRespId 6
/
PIRespPriority 2
/
See also:
xtsc_memory_pin_parms
xtsc::xtsc_memory_b
xtsc_tlm2pin_memory_transactor
xtsc::xtsc_core
Parameters:
module_name Name of the xtsc_memory_pin sc_module.
memory_parms The remaining parameters for construction.
See also:
xtsc_memory_pin_parms
See also:
xtsc::xtsc_request_if::nb_peek
See also:
xtsc::xtsc_request_if::nb_poke
This method dumps the specified number of bytes from the memory. Each line of output is
divided into three columnar sections, each of which is optional. The first section contains
an address. The second section contains a hex dump of some (possibly all) of the data
(two hex nibbles and a space for each byte from the memory). The third section contains
an ASCII dump of the same data.
Parameters:
address8 The starting byte address in memory.
size8 The number of bytes of data to dump.
os The ostream object to which the data is to be dumped.
left_to_right If true, the data is dumped in the order: memory[0], memory[1],
..., memory[bytes_per_line-1]. If false, the data is dumped in the order:
memory[bytes_per_line-1], memory[bytes_per_line-2], ..., memory[0].
bytes_per_line The number of bytes to dump on each line of output. If bytes_per_line
is 0 then all size8 bytes are dumped on a single line with no newline at the end. If
bytes_per_line is non-zero, then all lines of output end in newline.
show_address If true, the first columnar section contains an address printed as an
8-hex-digit number with a 0x prefix. If false, the first columnar section is null and
takes no space in the output.
show_hex_values If true, the second (middle) columnar section of hex data values
is printed. If false, the second columnar section is null and takes no space in the
output.
do_column_heading If true, print byte position column headings over the hex val-
ues section. If false, no column headings are printed. If show_hex_values is
false, then the do_column_heading value is ignored and no column headings are
printed.
show_ascii_values If true, the third (last) columnar section of ASCII data values is
printed (if an ASCII value is a non-printable character a period is printed). If
show_ascii_values is false, the third columnar section is null and takes no space
in the output.
Parameters:
tlm2pin The xtsc_tlm2pin_memory_transactor to connect to this xtsc_memory_pin.
tlm2pin_port The tlm2pin master port to connect to.
mem_port The port of this memory to connect tlm2pin to.
single_connect If true only one port of this memory will be connected. If false, the
default, then all contiguous, unconnected port numbers of this memory starting at
mem_port that have a corresponding existing port in tlm2pin (starting at tlm2pin_-
port) will be connected to that corresponding port in tlm2pin.
Returns:
number of ports that were connected by this call (1 or more)
The implementation of reset() in xtsc_module logs a warning and does nothing else. Sub-
classes should provide their own implementation if they are able to support reset.
Reimplemented from xtsc_module.
See also:
xtsc_module_pin_base::get_bool_input()
xtsc_module_pin_base::get_uint_input()
xtsc_module_pin_base::get_wide_input()
xtsc_module_pin_base::get_bool_output()
xtsc_module_pin_base::get_uint_output()
xtsc_module_pin_base::get_wide_output()
• xtsc_memory_pin.h
xtsc_parms
xtsc_memory_pin_parms
xtsc_parms
xtsc_memory_pin_parms
Constructor parameters for a xtsc_memory_pin object. This class contains the constructor
parameters for an xtsc_memory_pin object.
"memory_interface" char* The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW",
"DROM0", "IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0",
"PIF", and "IDMA0" (case-insensitive).
Note: For inbound PIF set this parameter to "PIF" and
set the "inbound_pif" parameter to true.
"num_ports" u32 The number of memory ports this memory has. A value of
1 means this memory is single-ported, a value of 2 means
this transactor is dual-ported, etc.
If "memory_interface" is "DRAM0RW" or "DRAM1RW", then a
read port counts as one port and its corresponding write
port counts as another port.
Default = 1.
Minimum = 1.
"byte_width" u32 Memory data interface width in bytes. Valid values for
"DRAM0", "DRAM0RW", "DRAM1", "DRAM1RW", "DROM0",
"URAM0", and "XLMI0" are 4, 8, 16, 32, and 64. Valid
values for "DRAM0BS" and "DRAM1BS" are 4, 8, 16, and 32.
Valid values for "IRAM0", "IRAM1", "IROM0", "PIF", and
"IDMA0" are 4, 8, and 16.
"start_byte_address" u32 The starting byte address of this memory in the 4GB
address space.
"memory_byte_size" u32 The byte size of this memory. 0 means the memory
occupies all of the 4GB address space at and above
"start_byte_address".
"initial_value_file" char* If not NULL or empty, this names a text file from which
([@<Offset>] <Value>*)*
"memory_fill_byte" u32 The low byte specifies the value used to initialize
memory contents at address locations not initialize
from "initial_value_file".
Default = 0.
"use_fast_access" bool If true, this memory will support fast access for the
turboxim simulation engine.
Default = true.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"sample_phase" u32 This specifies the phase (i.e. the point) in a clock
period at which input pins are sampled. Outputs which
are used for handshaking (PIReqRdy, PIRespValid,
IRamBusy, DRamBusy, etc.) are also sampled at this time.
This value is expressed in terms of the SystemC time
resolution (from sc_get_time_resolution()) and must be
strictly less than the clock period as specified by the
"clock_period" parameter. A value of 0 means input pins
are sampled on posedge clock as specified by
"posedge_offset".
Default = 0 (sample at posedge clock).
"drive_phase" u32 This specifies the phase (i.e. the point) in a clock
period at which output pins are driven. It is expressed
in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less than
the clock period as specified by the "clock_period"
parameter. A value of 0 means output pins are driven on
posedge clock as specified by "posedge_offset".
Default = 1 (1 time resolution after posedge clock).
"inbound_pif" bool Set to true for inbound PIF. Set to false for outbound
PIF. This parameter is ignored if "memory_interface"
is other then "PIF".
Default = false (outbound PIF).
"route_id_bits" u32 Number of bits in the route ID. Valid values are 0-32.
If "route_id_bits" is 0, then the "POReqRouteId" and
"PIRespRouteId" output ports will not be present. This
parameter is ignored unless "memory_interface" is "PIF"
or "IDMA0".
Default = 0.
"void_resp_cntl" u32 The low byte specifies the value to be driven out the
"PIRespCntl" port when "PIRespValid" is low (that is
when no response is occurring). A default value of 0xFF
is used (instead of 0x00 which is the encoding for
"Response, not last transfer") to make it easier to
visually distinguish when a response is occuring when
using a waveform viewer. This parameter is ignored
unless "memory_interface" is "PIF" or "IDMA0".
Default = 0xFF.
"req_user_data" char* If not NULL or empty, this specifies the optional port
that should be used for user data. The string must give
the port name and bit width using the format:
PortName,BitWidth
This parameter is ignored unless "memory_interface" is
"PIF" or "IDMA0".
Default = "" (optional user data port is abscent)
"rsp_user_data" char* If not NULL or empty, this specifies the optional port
that should be used for user data. The string must give
the port name and bit width using the format:
PortName,BitWidth
This parameter is ignored unless "memory_interface" is
"PIF" or "IDMA0".
Default = "" (optional user data port is abscent)
"rsp_user_data_val" char* This specifies the value to drive on the port specified
by "rsp_user_data". If left at its default value of
"echo", the model will simply echo back the value most
recently received on the port defined by "req_user_data"
(or 0 if that port is not defined). This parameter is
for testing purposes only and is ignored unless
"memory_interface" is "PIF" or "IDMA0" and
"rsp_user_data" is set.
Default = "echo"
Parameters which apply to local memories only (that is, non-PIF|IDMA0 memories):
"has_busy" bool True if the memory interface has a busy pin. This
parameter is ignored if "memory_interface" is "PIF" or
"IDMA0".
Default = true.
"has_lock" bool True if the memory interface has a lock pin. This
parameter is ignored unless "memory_interface" is
"DRAM0", "DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", or
"DRAM1RW".
Default = false.
"has_xfer_en" bool True if the memory interface has an xfer enable pin.
This parameter is ignored if "memory_interface" is
"DROM0", "XLMI0", "PIF", or "IDMA0".
Default = false.
"has_dma" bool True if the memory interface has split Rd/Wr ports
("DRAM0RW"|"DRAM1RW") accessible from inbound PIF.
Default = false.
See also:
xtsc_memory_pin
xtsc::xtsc_parms
xtsc::xtsc_initialize_parms
Parameters:
memory_interface The memory interface type. Valid values are "DRAM0",
"DRAM0RW", "DRAM0BS", "DRAM1", "DRAM1RW", "DRAM1BS", "DROM0",
"IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", "PIF", and "IDMA0" (case-
insensitive).
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_memory_pin_-
parms.
memory_interface The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW", "DROM0",
"IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", "PIF", and "IDMA0" (case-
insensitive).
delay Default delay for PIF|IDMA0 read and write in terms of this memory’s clock
period (see "clock_period"). A value of 0xFFFFFFFF (the default) means to use
a delay of 0 if the core has a 5-stage pipeline and a delay of 1 if the core has
a 7-stage pipeline. For non-PIF interfaces, the delay is 0 or 1 (5 or 7 stage,
respectively) regardless of the value passed in.
num_ports The number of ports this memory has. If 0, the default, the num-
ber of ports will be inferred thusly: For banked DRAM0|DRAM1|DROM0,
the "num_ports" will be equal to the number of banks. For subbanked
DRAM0BS|DRAM1BS, the "num_ports" will be equal to the number of banks
times the number of subbanks per bank. For split R/W DRAM0RW|DRAM1RW,
the "num_ports" will be 2 times the number of Load/Store units plus 2 if there is
an inbound PIf interface. For non-banked, non-split R/W interfaces, if memory_-
interface is a LD/ST unit 0 port of a dual-ported core interface, and the core is
dual-ported and has no CBox, and if the 2nd port of the core has not been bound,
then "num_ports" will be 2; otherwise, "num_ports" will be 1.
The documentation for this class was generated from the following file:
• xtsc_memory_pin.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_memory_tlm2
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
m_memory
xtsc_memory_tlm2 tlm_fw_transport_if_impl
m_memory_parms
m_tlm_fw_transport_if_impl
xtsc_parms xtsc_memory_tlm2_parms
m_p_memory
m_p_initial_value_file
xtsc_script_file xtsc_memory_b
Classes
• class tlm_fw_transport_if_impl
Implementation of tlm_fw_transport_if<>.
Public Types
• SC_HAS_PROCESS (xtsc_memory_tlm2)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
For xtsc_connection_interface.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Protected Types
• typedef tlm_utils::peq_with_get< tlm::tlm_generic_payload > peq
• void load_initial_values ()
Helper function to initialize memory contents.
Protected Attributes
• target_socket_4 ∗∗ m_target_sockets_4
Target socket(s) for 4-byte interface.
• target_socket_8 ∗∗ m_target_sockets_8
Target socket(s) for 8-byte interface.
• target_socket_16 ∗∗ m_target_sockets_16
Target socket(s) for 16-byte interface.
• target_socket_32 ∗∗ m_target_sockets_32
Target socket(s) for 32-byte interface.
• target_socket_64 ∗∗ m_target_sockets_64
Target socket(s) for 64-byte interface.
• xtsc_memory_tlm2_parms m_memory_parms
Copy of xtsc_memory_tlm2_parms.
• xtsc::u32 m_num_ports
The number of ports this memory has.
• tlm_fw_transport_if_impl ∗∗ m_tlm_fw_transport_if_impl
The m_target_sockets_BW objects bind to these.
• xtsc::xtsc_memory_b ∗ m_p_memory
The memory itself.
• peq ∗∗ m_nb2b_thread_peq
For nb_transport/nb2b_thread (per port).
• xtsc::u32 m_port_nb2b_thread
Used by nb2b_thread to get its port number.
• peq ∗∗ m_tlm_accepted_thread_peq
For tlm_accepted_thread (per port).
• xtsc::u32 m_port_tlm_accepted_thread
Used by tlm_accepted_thread to get its port number.
• sc_core::sc_time m_clock_period
The clock period of this memory.
• bool m_immediate_timing
See "immediate_timing" parameter.
• bool m_check_alignment
See "check_alignment" parameter.
• bool m_annotate_delay
See "annotate_delay" parameter.
• sc_core::sc_time m_read_delay
See "read_delay" parameter.
• sc_core::sc_time m_burst_read_delay
See "burst_read_delay" parameter.
• sc_core::sc_time m_burst_read_repeat
See "burst_read_repeat" parameter.
• sc_core::sc_time m_write_delay
See "write_delay" parameter.
• sc_core::sc_time m_burst_write_delay
See "burst_write_delay" parameter.
• sc_core::sc_time m_burst_write_repeat
See "burst_write_repeat" parameter.
• sc_core::sc_time m_nb_transport_delay
See "nb_transport_delay" parameter and command.
• bool m_test_tlm_accepted
See "test_tlm_accepted" parameter and command.
• bool m_test_end_req_phase
See "test_end_req_phase" parameter and command.
• bool m_read_only
See "read_only" parameter.
• bool m_host_shared_memory
See "host_shared_memory" parameter.
• bool m_allow_dmi
See "allow_dmi" parameter and command.
• tlm::tlm_response_status m_tlm_response_status
Normally TLM_OK_RESPONSE, can be changed using tlm_response_status command.
• xtsc::xtsc_address m_start_address8
The starting byte address of this memory.
• xtsc::u32 m_size8
The byte size of this memory.
• xtsc::u32 m_width8
The byte width of this memories data interface.
• xtsc::xtsc_address m_end_address8
The ending byte address of this memory.
A PIF, XLMI, or local memory which uses OSCI TLM2. Example module implementing a
configurable memory which uses OSCI TLM2.
On a given port, this memory model always processes transactions in the order they were
received.
You may use this memory directly or just use the code as a starting place for developing
your own memory models.
Here is a block diagram of xtsc_memory_tlm2 objects being used in the xtsc_xttlm2tlm2_-
transactor example:
(*tran_dram0.m_request_exports[0])
(mem_dram0.get_target_socket_4(0))
core0.get_request_port(“dram0ls0”)
tran_dram0.get_initiator_socket_4(0)
dram0ls0
nb_request
b_transport
nb_respond invalidate_direct_mem_ptr
dram0ls0
xtsc_xttlm2tlm2_transactor xtsc_memory_tlm2
tran_dram0 mem_dram0
“num_ports” = 2 “num_ports” = 2
nb_request
dram0ls1
b_transport
nb_respond invalidate_direct_mem_ptr
dram0ls1
xtsc_core core0
(memory_test.out)
nb_request
pif
xtsc_xttlm2tlm2_transactor xtsc_memory_tlm2
tran_pif
b_transport
mem_pif
“num_ports” = 1 “num_ports” = 1
nb_respond invalidate_direct_mem_ptr
pif
(*tran_pif.m_respond_ports[0])
(core0.get_respond_export(“pif”))
See also:
xtsc_memory_tlm2_parms
xtsc::xtsc_memory_b
xtsc::xtsc_core
xtsc_xttlm2tlm2_transactor
xtsc_master_tlm2
Parameters:
module_name Name of the xtsc_memory_tlm2 sc_module.
memory_parms The remaining parameters for construction.
See also:
xtsc_memory_tlm2_parms
See also:
xtsc::xtsc_request_if::nb_peek
See also:
xtsc::xtsc_request_if::nb_poke
This method dumps the specified number of bytes from the memory. Each line of output is
divided into three columnar sections, each of which is optional. The first section contains
an address. The second section contains a hex dump of some (possibly all) of the data
(two hex nibbles and a space for each byte from the memory). The third section contains
an ASCII dump of the same data.
Parameters:
address8 The starting byte address in memory.
size8 The number of bytes of data to dump.
os The ostream object to which the data is to be dumped.
left_to_right If true, the data is dumped in the order: memory[0], memory[1],
..., memory[bytes_per_line-1]. If false, the data is dumped in the order:
memory[bytes_per_line-1], memory[bytes_per_line-2], ..., memory[0].
bytes_per_line The number of bytes to dump on each line of output. If bytes_per_line
is 0 then all size8 bytes are dumped on a single line with no newline at the end. If
bytes_per_line is non-zero, then all lines of output end in newline.
show_address If true, the first columnar section contains an address printed as an
8-hex-digit number with a 0x prefix. If false, the first columnar section is null and
takes no space in the output.
show_hex_values If true, the second (middle) columnar section of hex data values
is printed. If false, the second columnar section is null and takes no space in the
output.
do_column_heading If true, print byte position column headings over the hex val-
ues section. If false, no column headings are printed. If show_hex_values is
false, then the do_column_heading value is ignored and no column headings are
printed.
show_ascii_values If true, the third (last) columnar section of ASCII data values is
printed (if an ASCII value is a non-printable character a period is printed). If
show_ascii_values is false, the third columnar section is null and takes no space
in the output.
adjust_address If adjust_address is true and address8 modulo bytes_per_line is not
0, then offset the printed values on the first line of the hex and ASCII colum-
nar sections and adjust the printed address so that the printed address modulo
bytes_per_line is always zero. Otherwize, do not offset the first printed data val-
ues and do not adjust the printed address.
7.86.3.4 void execute (const std::string & cmd_line, const std::vector< std::string
> & words, const std::vector< std::string > & words_lc, std::ostream &
result) [virtual]
allow_dmi 0|1
Set allow_dmi flag to true or false. Return previous value.
change_clock_period <ClockPeriodFactor>
Call xtsc_memory_tlm2::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this device.
nb_transport_delay <NumClockPeriods>
Set m_nb_transport_delay to (m_clock_period * <NumClockPeriods>). Return
previous <NumClockPeriods>.
reset [<Hard>]
Call xtsc_memory_tlm2::reset(<Hard>). Where <Hard> is 0|1 (default 0).
test_end_req_phase 0|1
Set m_test_end_req_phase to 0|1. Return previous value of m_test_end_req_phase.
test_tlm_accepted 0|1
Set m_test_tlm_accepted to 0|1. Return previous value of m_test_tlm_accepted.
tlm_response_status <Status>
Call tlm_generic_payload::set_response_status(<Status>).
Parameters:
master_tlm2 The xtsc_master_tlm2 to connect to this xtsc_memory_tlm2.
target_socket The target socket of this memory to connect the initiator socket of
master_tlm2 to.
Parameters:
xttlm2tlm2 The xtsc_xttlm2tlm2_transactor to connect to this xtsc_memory_tlm2.
initiator_socket The xttlm2tlm2 initiator socket to connect to.
target_socket The target socket of this memory to connect the initiator socket of xt-
tlm2tlm2 to.
single_connect If true only one socket of this memory will be connected. If false, the
default, then all contiguous, unconnected socket numbers of this memory starting
at target_socket that have a corresponding existing socket in xttlm2tlm2 (starting
at initiator_socket) will be connected to that corresponding socket in xttlm2tlm2.
Returns:
number of sockets that were connected by this call (1 or more)
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
See also:
xtsc::xtsc_memory_b::load_initial_values
• xtsc_memory_tlm2.h
xtsc_parms
xtsc_memory_tlm2_parms
xtsc_parms
xtsc_memory_tlm2_parms
Constructor parameters for a xtsc_memory_tlm2 object. This class contains the construc-
tor parameters for an xtsc_memory_tlm2 object.
"num_ports" u32 The number of slave port pairs this memory has. This
defines how many memory interface master devices will be
connected with this memory.
Default = 1.
Minimum = 1.
"byte_width" u32 Memory data interface width in bytes. Valid values are
4, 8, 16, 32, and 64.
"start_byte_address" u32 The starting byte address of this memory in the 4GB
address space.
"memory_byte_size" u32 The byte size of this memory. 0 means the memory
occupies all of the 4GB address space at and above
"start_byte_address".
"burst_read_delay" u32 Specifies the delay for the nominal first beat of a
burst read command. For a burst read command comprised
of N nominal beats, the total delay is calculated as:
total_delay = burst_read_delay + burst_read_repeat * (N-1)
If "annotate_delay" is true, then total_delay is added
to the time argument of the b_transport call.
If "annotate_delay" is false, a SystemC wait is done
for total_delay.
Default = As specified by delay argument to constructor.
"burst_read_repeat" u32 Specifies the delay for each of the nominal second
through last beat of a burst read command. See the
"burst_read_delay" parameter.
Default = 1.
"burst_write_delay" u32 Specifies the delay for the nominal first beat of a
burst write command. For a burst write command comprised
of N nominal beats, the total delay is calculated as:
total_delay = burst_write_delay + burst_write_repeat * (N-1)
If "annotate_delay" is true, then total_delay is added
to the time argument of the b_transport call.
If "annotate_delay" is false, a SystemC wait is done
for total_delay.
Default = As specified by delay argument to constructor.
"burst_write_repeat" u32 Specifies the delay for each of the nominal second
through last beat of a burst write command. See the
"burst_write_delay" parameter.
Default = As specified by delay argument to constructor.
Default = true.
"immediate_timing" bool If true, the above delays parameters are ignored and
the memory model responds to all requests immediately
(without any delay--not even a delta cycle). If false,
the above delay parameters are used to determine
response timing.
Default = false.
"initial_value_file" char* If not NULL or empty, this names a text file from which
to read the initial memory contents as byte values.
Note: "initial_value_file" should not be set when
"host_shared_memory" is true.
Default = NULL.
The text file format is:
([@<Offset>] <Value>*)*
"memory_fill_byte" u32 The low byte specifies the value used to initialize
memory contents at address locations not initialize
from "initial_value_file".
Note: "memory_fill_byte" does not apply when
"host_shared_memory" is true.
Default = 0.
"host_shared_memory" bool If true the backing store for this memory will be host
OS shared memory (created using shm_open() on Linux and
CreateFileMapping() on MS Windows). If this parameter
is true then "memory_fill_byte" and "initial_value_file"
do not apply and must be left at their default value.
If desired, a Lua script can be used to initialize
memory contents. See "lua_script_file_eoe" in
xtsc:xtsc_initialize_parms.
Default = false.
"shared_memory_name" char* The shared memory name to use when creating host OS
shared memory. If this parameter is left at its default
setting of NULL, then the default name will be formed by
concatenating the user name, a period, and the module
instance hierarchical name. For example:
MS Windows: joeuser.myshmem
Linux: /dev/shm/joeuser.myshmem
This parameter is ignored if "host_shared_memory" is
false.
Default = NULL (use default shared memory name)
"allow_dmi" bool If true, this memory will support DMI except to address
ranges as specified by the "deny_fast_access" parameter.
If false, all DMI requests will be denied.
Default = true.
See also:
xtsc_memory_tlm2
xtsc::xtsc_parms
Parameters:
width8 Memory data interface width in bytes.
delay Default delay for read and write in terms of this memory’s clock period (see
"clock_period"). Local memory devices should use a delay of 0 for a 5-stage
pipeline and a delay of 1 for a 7-stage pipeline. PIF memory devices should use
a delay of 1 or more.
start_address8 The starting byte address of this memory.
size8 The byte size of this memory. 0 means the memory occupies all of the 4GB
address space at and above start_address8.
num_ports The number of ports this memory has.
the init() method. If memory_interface is a ROM interface, then "read_only" will be be set to
true. In addition, the "clock_period" parameter will be set to match the core’s clock period.
For PIF memories, start_address8 and size8 will both be 0 indicating a memory which
spans the entire 4 gigabyte address space. For non-PIF memories, "check_alignment" will
be set to false. If desired, after the xtsc_memory_tlm2_parms object is constructed, its data
members can be changed using the appropriate xtsc_parms::set() method before passing
it to the xtsc_memory_tlm2 constructor.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_memory_tlm2_-
parms.
memory_interface The memory interface name (port name). Note: The core config-
uration must have the named memory interface.
delay Default delay for PIF read and write in terms of this memory’s clock period (see
"clock_period"). PIF memory devices should use a delay of 1 or more. A value
of 0xFFFFFFFF (the default) means to use a delay of 1 if the core has a 5-stage
pipeline and a delay of 2 if the core has a 7-stage pipeline. This parameter is
ignored except for PIF memory interfaces.
num_ports The number of ports this memory has. If 0, the default, the number of
ports (1 or 2) will be inferred thusly: If memory_interface is a LD/ST unit 0 port
of a dual-ported core interface, and the core is dual-ported and has no CBox,
and if the 2nd port of the core has not been bound, then "num_ports" will be 2;
otherwise, "num_ports" will be 1.
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of legal memory_interface
values.
The documentation for this class was generated from the following file:
• xtsc_memory_tlm2.h
Example XTSC model which generates a value-change dump (VCD) file of the data mem-
bers of each xtsc::xtsc_request and xtsc::xtsc_response that passes through it ("allow_-
tracing" true) and/or which tracks the lifetime, latency, and counters of each transaction by
request type and by port number ("track_latency" true).
#include <xtsc/xtsc_memory_trace.h>Inheritance diagram for xtsc_memory_trace:
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_memory_trace
xtsc_respond_if
m_trace xtsc_respond_if_impl
m_respond_impl
xtsc_command_handler_interface xtsc_memory_trace
xtsc_connection_interface m_request_impl
xtsc_module
m_trace
xtsc_resettable xtsc_request_if_impl
xtsc_debug_if xtsc_request_if
Classes
• class statistic_info
This class is used to keep track of transaction statistics.
• class transaction_info
This class is used to keep track of 4 key times during each transaction’s lifecycle in order
to compute transaciton lifetime and latency.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• xtsc::u32 get_num_ports ()
Get the number of memory ports this memory trace device has.
• sc_core::sc_trace_file ∗ get_trace_file ()
Get a pointer to the VCD object that this memory trace device is using.
• void end_of_simulation ()
SystemC calls this method at the end of simulation.
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_request_if > ∗∗ m_request_exports
From multi-ported master or multiple masters to us.
Protected Types
• enum cntr_type {
cntr_transactions = 0,
cntr_latency,
cntr_lifetime,
cntr_req_beats,
cntr_req_busys,
cntr_rsp_beats,
cntr_rsp_busys,
cntr_count }
enum for the various counters in the statistic_info class
• void clear_transaction_list ()
• transaction_info ∗ new_transaction_info (type_t type)
Get a new transaction_info (from the pool).
Protected Attributes
• xtsc_request_if_impl ∗∗ m_request_impl
m_request_exports bind to these
• xtsc_respond_if_impl ∗∗ m_respond_impl
m_respond_exports bind to these
• xtsc::u32 m_width8
The byte width of the memory data interface.
• bool m_big_endian
Swizzle the bytes in the request/response data bufer.
• sc_core::sc_trace_file ∗ m_p_trace_file
The VCD object.
• xtsc::u32 m_num_ports
The number of memory ports.
• xtsc::u32 m_num_transfers
See "num_transfers" parameter.
• bool m_allow_tracing
See "allow_tracing" parameter.
• bool m_enable_tracing
See "enable_tracing" parameter enable_tracing method/command.
• bool m_track_latency
See "track_latency" parameter and enable_latency_tracking method/command.
• bool m_did_track
True if m_track_latency was ever true.
• sc_core::sc_time m_system_clock_period
The XTSC System Clock Period (SCP).
• sc_core::sc_time m_system_clock_period_half
One-half of the XTSC System Clock Period (SCP/2).
Example XTSC model which generates a value-change dump (VCD) file of the data mem-
bers of each xtsc::xtsc_request and xtsc::xtsc_response that passes through it ("allow_-
tracing" true) and/or which tracks the lifetime, latency, and counters of each transaction
by request type and by port number ("track_latency" true). This module is designed to be
inserted between a memory interface master (for example, an xtsc_core) and a memory
interface slave (for example, an xtsc_memory) to generate a VCD file trace of the data
members of each xtsc::xtsc_request that the master sends the slave and each xtsc::xtsc_-
response that the slave sends the master and/or to track the lifetime, latency, and counters
of each transaction.
When doing VCD tracing, each request and each response is counted and the counts are
traced. In addition, each RSP_OK response and each RSP_NACC response are sepa-
rately counted and traced to make it easier to detect when an RSP_NACC response hap-
pens in the same cycle as an RSP_OK response. VCD tracing can be turned off and on
during simulation using the enable_tracing method and/or command.
When the "track_latency" parameter is true, lifetime and latency histograms and transac-
tion, beat, and busy counters are maintained. This can be turned off and on during simu-
lation using the enable_latency_tracking method and/or command. Informally, transaction
lifetime is the number of clock periods between when the first request of the transaction
is first received from the upstream device and when the last response of the transaction
is accepted by the upstream device, while transaction latency is the number of clock peri-
ods between when the last request is accepted by the downstream device and when the
first response returns from the downstream device. See transaction_info for the formal
definition.
req req
dram0ls0
dram0ls0
rsp rsp
xtsc_memory_trace xtsc_memory
trace_dram0 mem_dram0
“num_ports” = 2 “num_ports” = 2
req req
dram0ls1
dram0ls1
rsp rsp
xtsc_core core0
(memory_test.out)
req req
pif
xtsc_memory_trace xtsc_memory
trace_pif mem_pif
pif
rsp “num_ports” = 1 rsp “num_ports” = 1
See also:
xtsc_memory_trace_parms
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
transaction_info
statistic_info
cntr_type
get_counter
dump_statistic_info
dump_latency_histogram
dump_lifetime_histogram
Enumerator:
cntr_transactions "transactions": Total transactions
cntr_latency "latency": Total latency of all transactions
cntr_lifetime "lifetime": Total lifetime of all transactions
cntr_req_beats "req_beats": Total request beats
cntr_req_busys "req_busys": Total request beats that get RSP_NACC
cntr_rsp_beats "rsp_beats": Total response beats (does NOT include RSP_NACC)
Parameters:
module_name Name of the xtsc_memory_trace sc_module.
trace_parms The remaining parameters for construction.
See also:
xtsc_memory_trace_parms
See also:
xtsc_memory_trace_parms "enable_tracing".
See also:
xtsc_memory_trace_parms "enable_tracing".
See also:
xtsc_memory_trace_parms "track_latency".
See also:
xtsc_memory_trace_parms "track_latency".
Dump maximum latencies and lifetimes observed for each xtsc::xtsc_request::type_t type.
This method is deprecated in favor of the dump_statistic_info() method which provides
more useful information.
Parameters:
os The ostream object to which the results should be dumped.
See also:
"track_latency" in xtsc_memory_trace_parms.
7.88.4.6 xtsc::u64 get_counter (const std::string & cntr_name, const std::string &
types = "", const std::string & ports = "")
Return the value of the specified counter for the specified xtsc::xtsc_request::type_t type
and specified port. This method returns the value of the specified counter for the specified
request type and specified port. Multiple request types and multiple ports can be specified,
in which case the method returns the sum of the values of the specified counter for all
matching request types and ports.
Parameters:
cntr_name The desired counter name. See cntr_type.
types A comma separated list of the xtsc::xtsc_request::type_t types desired (for ex-
ample, "READ,BLOCK_READ"). The empty string ("") or asterisk ("∗") both mean
all tracked request types.
ports A comma separated list of the desired port numbers (for examples, "1,3,5").
The empty string ("") or asterisk ("∗") both mean all ports.
See also:
dump_counter_names
cntr_type
Dump statistic info for the specified xtsc::xtsc_request::type_t types and ports to the spec-
ified ostream object. Method dumps a block of statistic info for each specified xtsc::xtsc_-
request::type_t type of each specified port. For example, here is a sample output block
when this method was called with types of "BLOCK_READ" and ports of "1" (the Counters
and Average lines are shown on multiple lines due to printing limitations in some media):
Port #1 BLOCK_READ:
Counters: transactions=4 latency=111 lifetime=200 req_beats=18 req_busys=14
rsp_beats=79 rsp_busys=15
Average per transaction: latency=27.75 lifetime=50 req_beats=4.5 req_busys=3.5
rsp_beats=19.75 rsp_busys=3.75
Histograms (Format: NumCycles=TranCount):
latency: 2=1,16=1,46=1,47=1 (tag=5)
lifetime: 17=1,46=1,61=1,76=1 (tag=5)
The value in parenthesis at the end of the histograms is the tag of the first transaction
during simulation with the maximum (last) NumCycles value.
Parameters:
types A comma separated list of xtsc::xtsc_request::type_t types desired (for exam-
ple, "READ,BLOCK_READ"). The empty string ("") or asterisk ("∗") both mean all
tracked request types.
ports A comma separated list of the desired port numbers (for examples, "1,3,5").
The empty string ("") or asterisk ("∗") both mean all ports.
See also:
xtsc_memory_trace for the definition of transaction latency and lifetime
statistic_info
cntr_type
Dump an aggregate histogram of the latency values for the specified xtsc::xtsc_-
request::type_t types and ports to the specified ostream object. This method dumps a
histogram of the latency values for the specified request type and port. For example, here
is a sample output block when this method was called with types of "BLOCK_READ" and
ports of "1" using the same simulation as shown for dump_statistic_info:
2,1
16,1
46,1
47,1
If this method is called for multiple types or ports then an aggregate histogram is formed by
combining the individual histograms. For example, if the same simulation had 2 BLOCK_-
WRITE transactions on Port #1, one with a latency of 2 cycles and the other with a latency
of 8 cycles, and this method were called with types of "BLOCK_READ,BLOCK_WRITE"
and ports of "1", then the output would be:
2,2
8,1
16,1
46,1
47,1
Parameters:
types A comma separated list of the xtsc::xtsc_request::type_t types desired (for ex-
ample, "READ,BLOCK_READ"). The empty string ("") or asterisk ("∗") both mean
all tracked request types.
ports A comma separated list of the desired port numbers (for examples, "1,3,5").
The empty string ("") or asterisk ("∗") both mean all ports.
See also:
statistic_info
cntr_type
Dump an aggregate histogram of the lifetime values for the specified xtsc::xtsc_-
request::type_t types and ports to the specified ostream object. This method dumps a
histogram of the lifetime values for the specified request type and port. For example, here
is a sample output block when this method was called with types of "BLOCK_READ" and
ports of "1" using the same simulation as shown for dump_statistic_info:
17,1
46,1
61,1
76,1
If this method is called for multiple types or ports then an aggregate histogram is formed by
combining the individual histograms.
Parameters:
types A comma separated list of the xtsc::xtsc_request::type_t types desired (for ex-
ample, "READ,BLOCK_READ"). The empty string ("") or asterisk ("∗") both mean
all tracked request types.
ports A comma separated list of the desired port numbers (for examples, "1,3,5").
The empty string ("") or asterisk ("∗") both mean all ports.
See also:
statistic_info
cntr_type
7.88.4.10 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
dump_counter_names
Dump a list of valid counter names by calling dump_counter_names().
enable_latency_tracking <Enable>
Call xtsc_memory_trace::enable_latency_tracking(<Enable>).
Set whether or not latency tracking is enabled.
enable_tracing <Enable>
Call xtsc_memory_trace::enable_tracing(<Enable>).
Set whether or not tracing is enabled.
get_num_ports
Return value from calling xtsc_memory_trace::get_num_ports().
reset
Call xtsc_memory_trace::reset().
Implements xtsc_command_handler_interface.
Connect an upstream xtsc_arbiter with this xtsc_memory_trace. This method connects the
master port pair of the specified xtsc_arbiter to the specified slave port pair of this xtsc_-
memory_trace.
Parameters:
arbiter The xtsc_arbiter to connect with.
trace_port The slave port pair of this xtsc_memory_trace to connect the xtsc_arbiter
with. trace_port must be in the range of 0 to this xtsc_memory_trace’s "num_-
ports" parameter minus 1.
Connect with an upstream or downstream (inbound pif) xtsc_core. This method connects
this xtsc_memory_trace with the memory interface specified by memory_port_name of the
xtsc_core specified by core. If memory_port_name is "inbound_pif" or "snoop", then a
master port pair of this xtsc_memory_trace is connected with the inbound pif or snoop
slave port pair (respectively) of core. If memory_port_name is neither "inbound_pif" nor
"snoop", then the master port pair of core specified by memory_port_name is connected
with a slave port pair of this xtsc_memory_trace
Parameters:
core The xtsc_core to connect with.
memory_port_name The name of the xtsc_core memory interface to connect with.
Case-insensitive.
port_num If memory_port_name is "inbound_pif" or "snoop" then this specifies the
master port pair of this xtsc_memory_trace to connect with core. If memory_-
port_name is neither "inbound_pif" nor "snoop" then this specifies the slave port
pair of this xtsc_memory_trace to connect with core.
single_connect If true only one slave port pair of this device will be connected. If
false, the default, and if memory_port_name names the first port of an uncon-
nected multi-ported interface of core and if port_num is 0 and if the number of
ports this device has matches the number of multi-ports in the core interface, then
all master port pairs of the core interface specified by memory_port_name will be
connected to the slave port pairs of this xtsc_memory_trace. This parameter is
ignored if memory_port_name is "inbound_pif" or "snoop".
Returns:
number of ports that were connected by this call (1 or 2)
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of valid memory_port_-
name values.
Connect with an xtsc_dma_engine. This method connects the master port pair of the
specified xtsc_dma_engine with the specified slave port pair of this xtsc_memory_trace.
Parameters:
dma_engine The xtsc_dma_engine to connect with.
trace_port The slave port pair of this xtsc_memory_trace to connect the xtsc_dma_-
engine with.
Connect with an xtsc_master. This method connects the master port pair of the specified
xtsc_master with the specified slave port pair of this xtsc_memory_trace.
Parameters:
master The xtsc_master to connect with.
trace_port The slave port pair of this xtsc_memory_trace to connect the xtsc_master
with.
Parameters:
pin2tlm The xtsc_pin2tlm_memory_transactor to connect with this xtsc_memory_-
trace.
tran_port The xtsc_pin2tlm_memory_transactor TLM master port pair to connect with
this xtsc_memory_trace.
trace_port The slave port pair of this xtsc_memory_trace to connect the xtsc_-
pin2tlm_memory_transactor with.
single_connect If true only one slave port pair of this xtsc_memory_trace will be con-
nected. If false, the default, then all contiguous, unconnected slave port pairs of
this xtsc_memory_trace starting at trace_port that have a corresponding exist-
ing master port pair in pin2tlm (starting at tran_port) will be connected with that
corresponding pin2tlm master port pair.
Connect with an upstream xtsc_router. This method connects the specified master port
pair of the specified upstream xtsc_router with the specified slave port pair of this xtsc_-
memory_trace.
Parameters:
router The upstream xtsc_router to connect with.
router_port The master port pair of the upstream xtsc_router to connect with. router_-
port must be in the range of 0 to the upstream xtsc_router’s "num_slaves" param-
eter minus 1.
trace_port The slave port pair of this xtsc_memory_trace to connect with. trace_port
must be in the range of 0 to this xtsc_memory_trace’s "num_ports" parameter
minus 1.
7.88.4.17 bool get_types (const std::string & types, std::set< type_t > &
types_set) [protected]
Common helper method to determine the all_types flag and populate the types_set con-
tainer. This method returns true if types is the empty string or "∗" (both indicate all types).
Otherwise it returns false and populates the types_set container with each xtsc::xtsc_-
request::type_t type whose string name is listed in types.
Parameters:
types A comma separated list of the xtsc::xtsc_request::type_t types desired (for ex-
ample, "READ,BLOCK_READ"). Both the empty string or asterisk ("" or "∗") mean
all types.
types_set If types is neither "" nor "∗", then this container will be populated with the
xtsc::xtsc_request::type_t values found in types.
7.88.4.18 bool get_ports (const std::string & ports, std::set< xtsc::u32 > &
ports_set) [protected]
Common helper method to determine the all_ports flag and populate the ports_set con-
tainer. This method returns true if ports is the empty string or "∗" (both indicate all ports).
Otherwise it returns false and populates the ports_set container with each port listed in
ports.
Parameters:
ports A comma separated list of the desired ports (for example, "1,3"). Both the empty
string or asterisk ("" or "∗") mean all ports.
ports_set If ports is neither "" nor "∗", then this container will be populated with the
port values found in ports.
The documentation for this class was generated from the following file:
• xtsc_memory_trace.h
xtsc_parms
xtsc_memory_trace_parms
xtsc_parms
xtsc_memory_trace_parms
"byte_width" u32 Memory data interface width in bytes. Valid values are
4, 8, 16, 32, and 64.
Default = 64.
"num_ports" u32 The number of memory ports attached to the memory trace
device. This number of master devices and this number
of slave devices must be connected to the memory trace
device.
Default = 1.
"allow_tracing" bool True if VCD trace is allowed. False if VCD trace is not
allowed. Setting "allow_tracing" to false allows
leaving the model in place in sc_main but with tracing
disabled so there is near zero impact on simulation
time. This might also be done if latency tracking is
desired (see "track_latency") but VCD tracing is not.
Default = true.
See also:
xtsc_memory_trace
xtsc::xtsc_parms
Parameters:
width8 Memory data interface width in bytes. Default = 64.
big_endian True if master is big_endian. Default = false.
p_trace_file Pointer to SystemC VCD object or 0 if the memory trace device should
create its own VCD object (which will be called "waveforms.vcd"). Default = 0.
num_ports The number of memory ports the memory trace device has. Default = 1.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_memory_trace_-
parms.
memory_name The name of the memory interface. Note: The core configuration
must have the named memory interface.
p_trace_file Pointer to SystemC VCD object or 0 if the memory trace device should
create its own trace file (which will be called "waveforms.vcd"). Default = 0.
num_ports The number of ports this memory has. If 0, the default, the number of
ports will be inferred based on the number of multi-ports in the port_name core
interface (assuming they are unbound).
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of legal memory_name
values.
The documentation for this class was generated from the following file:
• xtsc_memory_trace.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_mmio
xtsc_debug_if
xtsc_request_if
xtsc_script_file
m_p_definition_file
m_request_impl xtsc_request_if_impl
xtsc_parms xtsc_mmio_parms
m_mmio_parms
xtsc_mmio m_mmio
xtsc_connection_interface xtsc_module
m_active_request
xtsc_resettable xtsc_command_handler_interface
xtsc_request m_stream_dumper
stream_dumper
m_p_request
Classes
• class input_definition
Input definition and sc_export.
• class output_definition
Output definition and sc_port.
• class register_definition
Register definition and value.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• SC_HAS_PROCESS (xtsc_mmio)
This SystemC macro inserts some code required for SC_THREAD’s to work.
• ∼xtsc_mmio (void)
Destructor.
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void connect (xtsc::xtsc_core &core, const char ∗core_intf_name, const char ∗io_-
name)
Connect an xtsc_mmio wire input or output to an xtsc_core.
• void connect (xtsc_mmio &mmio, const char ∗output_name, const char ∗input_-
name)
Connect a wire output of another xtsc_mmio to a wire input of this xtsc_mmio.
• void connect (xtsc_wire_logic &logic, const char ∗output_name, const char ∗input_-
name)
Connect an xtsc_wire_logic output to an input of this xtsc_mmio.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_request_if > m_request_export
From the memory interface master to us.
Protected Types
• typedef std::map< xtsc::xtsc_address, register_definition ∗ > address_register_-
map
• typedef std::map< std::string, register_definition ∗ > register_definition_map
• typedef std::map< std::string, output_definition ∗ > output_definition_map
• typedef std::map< std::string, input_definition ∗ > input_definition_map
• typedef std::set< output_definition ∗ > output_set
• typedef std::set< input_definition ∗ > input_set
• typedef sc_core::sc_port< xtsc::xtsc_wire_write_if, NSPP > wire_write_port
• typedef sc_core::sc_export< xtsc::xtsc_wire_write_if > wire_write_export
Protected Attributes
• xtsc_mmio_parms m_mmio_parms
Copy of xtsc_mmio_parms.
• xtsc_request_if_impl m_request_impl
m_request_export binds to this
• sc_core::sc_time m_clock_period
This device’s clock period.
• bool m_use_fast_access
From the "use_fast_access" parameter.
• sc_core::sc_event m_request_event
Event used to notify request_thread.
• sc_core::sc_event m_write_event
Event notified whenever an nb_request WRITE or nb_write occurs.
• sc_core::sc_event m_poke_event
Event notified whenever an nb_poke occurs.
• xtsc::xtsc_script_file ∗ m_p_definition_file
The script file from the "definition_file" parameter.
• std::string m_definition_file
The name of the script file.
• std::string m_line
Current line of script file.
• xtsc::u32 m_line_count
Current line number in script file.
• address_register_map m_address_register_map
• register_definition_map m_register_definition_map
Map of register definitions.
• output_definition_map m_output_definition_map
Map of output definitions.
• input_definition_map m_input_definition_map
Map of input definitions.
• xtsc::u32 m_byte_width
The byte width of this device’s data interface.
• xtsc::xtsc_request m_active_request
Our copy of the active (current) request.
• bool m_busy
We can only accept one request at a time.
• sc_core::sc_time m_response_time
How long to take to respond.
• bool m_always_write
Write port even if value hasn’t changed.
• bool m_swizzle_bytes
Swizzle bytes before writing and after reading.
• xtsc::xtsc_port_table m_port_table_all
All wire inputs and outputs in "definition_file" order.
• xtsc::xtsc_port_table m_port_table_all_inputs
• xtsc::xtsc_port_table m_port_table_all_outputs
All wire outputs in "definition_file" order.
Friends
req
xtsc_memory
rsp core0_pif
mmio.get_output("BInterrupt01")
req
xtsc_core xtsc_router
(core1.get_input_wire("BInterrupt01"))
core0 router m_request_export
(core0.out) rsp
req nb_write() req
xtsc_core
xtsc_memory
routing.tab core1
rsp xtsc_mmio nb_write() (core1.out) rsp core1_pif
mmio
mmio.txt
core1.get_export_state("EXPSTATE")
m_respond_port
(mmio.get_input("EXPSTATE"))
Here is the code to connect the xtsc_mmio example system using the xtsc::xtsc_connect()
method:
And here is the code to connect the system using manual SystemC port binding:
core0.get_request_port("pif")(router.m_request_export);
router.m_respond_port(core0.get_respond_export("pif"));
(*router.m_request_ports[0])(*core0_pif.m_request_exports[0]);
(*core0_pif.m_respond_ports[0])(*router.m_respond_exports[0]);
(*router.m_request_ports[1])(mmio.m_request_export);
mmio.m_respond_port(*router.m_respond_exports[1]);
mmio.get_output("BInterrupt10")(core1.get_system_input_wire("BInterrupt10"));
core1.get_export_state("EXPSTATE")(mmio.get_input("EXPSTATE"));
core1.get_request_port("pif")(*core1_pif.m_request_exports[0]);
(*core1_pif.m_respond_ports[0])(core1.get_respond_export("pif"));
See also:
xtsc_mmio_parms
xtsc::xtsc_core
xtsc_router
xtsc_memory
xtsc_wire
xtsc::xtsc_connect()
xtsc::xtsc_core::How_to_do_port_binding
Parameters:
module_name Name of the xtsc_mmio sc_module.
mmio_parms The remaining parameters for construction.
See also:
xtsc_mmio_parms
Return the sc_export of the named input. This method is used for port binding. For exam-
ple, to bind the TIE export state named "foo" of an xtsc_core named core0 to the sc_export
input named "bar" of an xtsc_mmio named mmio:
core0.get_export_state("foo")(mmio.get_input("bar"));
Return the sc_port of the named output. This method is used for port binding. For example,
to bind the sc_port output named "vectors" of an xtsc_mmio named mmio to the "BInterrupt"
system-level input of an xtsc_core named core0:
mmio.get_output("vectors")(core0.get_input_wire("BInterrupt"));
7.90.3.3 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
change_clock_period <ClockPeriodFactor>
Call xtsc_mmio::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this device.
reset
Call xtsc_mmio::reset().
Implements xtsc_command_handler_interface.
Connect an xtsc_arbiter with this xtsc_mmio. This method connects the master port pair of
the xtsc_arbiter with the memory interface slave port pair of this xtsc_mmio.
Parameters:
arbiter The xtsc_arbiter to connect with this xtsc_mmio.
Connect an xtsc_core with the memory interface slave port pair of this xtsc_mmio. This
method connects the memory interface master port pair specified by memory_port_name
of the xtsc_core specified by core with the memory interface slave port pair of this xtsc_-
mmio.
Parameters:
core The xtsc_core to connect with this xtsc_mmio.
memory_port_name The name of the memory interface master port pair of the xtsc_-
core to connect with this xtsc_mmio. Case-insensitive.
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of valid memory_port_-
name values.
Parameters:
core The xtsc_core to connect with.
core_intf_name The export state or system-level output/input wire of the xtsc_core
that is to be connected to this xtsc_mmio. For an export state, core_intf_name is
the name as it appears in the user’s TIE code (it must NOT begin with the "TIE_"
prefix). For a system-level output/input wire, core_intf_name is the name as it
appears in the Xtensa microprocessor data book.
io_name The output or input of this xtsc_mmio to be connected to the xtsc_core. If
core_intf_name is an xtsc_core export state or a system-level output wire then
io_name must name an input. If core_intf_name is an xtsc_core system-level
input wire then io_name must name an output.
See also:
xtsc::xtsc_core::get_output_wire().
xtsc::xtsc_core::get_input_wire().
Connect an xtsc_master with this xtsc_mmio. This method connects the memory interface
master port pair of xtsc_master with the memory interface slave port pair of this xtsc_mmio.
Parameters:
master The xtsc_master to connect with this xtsc_mmio.
Connect an xtsc_memory_trace with this xtsc_mmio. This method connects the specified
memory interface master port pair of the specified xtsc_memory_trace with the memory
interface slave port pair of this xtsc_mmio.
Parameters:
memory_trace The xtsc_memory_trace to connect with this xtsc_mmio.
port_num The xtsc_memory_trace master port pair to connect with this xtsc_mmio.
Parameters:
pin2tlm The xtsc_pin2tlm_memory_transactor to connect with this xtsc_mmio.
port_num The TLM master port pair of the xtsc_pin2tlm_memory_transactor to con-
nect with this xtsc_mmio. port_num must be in the range of 0 to the xtsc_-
pin2tlm_memory_transactor’s "num_ports" parameter minus 1.
Connect an xtsc_router with this xtsc_mmio. This method connects the specified master
port pair of the specified xtsc_router with the memory interface slave port pair of this xtsc_-
mmio.
Parameters:
router The xtsc_router to connect with this xtsc_mmio.
port_num The master port pair of the xtsc_router to connect with this xtsc_mmio.
port_num must be in the range of 0 to the xtsc_router’s "num_slaves" parameter
minus 1.
7.90.3.11 void connect (xtsc_mmio & mmio, const char ∗ output_name, const
char ∗ input_name)
Connect a wire output of another xtsc_mmio to a wire input of this xtsc_mmio. This method
connects the specified wire output of the specified xtsc_mmio to the specified wire input of
this xtsc_mmio.
Parameters:
mmio The other xtsc_mmio to be connected to this xtsc_mmio.
output_name The output of the other xtsc_mmio to be connected to an input of this
xtsc_mmio.
input_name The input of this xtsc_mmio that the other xtsc_mmio is to be connected
to.
7.90.3.12 void connect (xtsc_wire_logic & logic, const char ∗ output_name, const
char ∗ input_name)
Parameters:
logic The xtsc_wire_logic to be connected to this xtsc_mmio.
output_name The output of the xtsc_wire_logic to be connected to this xtsc_mmio.
input_name The input of this xtsc_mmio that the xtsc_wire_logic is to be connected
to.
Parameters:
source The xtsc_wire_source to connect to this xtsc_mmio.
output_name The output of the xtsc_wire_source to be connected to this xtsc_mmio.
If this parameter is NULL or empty then the default (first/only) output of source
will be connected.
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
Determine which bits of which register (if any) address maps to.
Parameters:
address in The address of interest.
high_bit out The high bit of the register address maps to.
low_bit out The low bit of the register address maps to.
Returns:
A pointer to the register_definition object that address maps to, or NULL if address
does not map to a register.
Swizzle the contents of buffer based on starting address (address8) and size (size8) and
the bus width defined by "byte_width" in xtsc_mmio_parms. This method is meant to sup-
port peeks and pokes with arbitrary size and alignment from a big-endian core.
Parameters:
address8 Starting address.
• xtsc_mmio.h
xtsc_parms
xtsc_mmio_parms
xtsc_parms
xtsc_mmio_parms
"byte_width" u32 Memory data interface width in bytes. Valid values are
4, 8, 16, 32, and 64.
N = ceil(W/8)
Where,
W = <BitWidth>
9. Writes to memory-mapped addresses not covered by a
register definition line are logged and discarded.
Reads to memory-mapped addresses not covered by a
register definition line are logged and return all
zeroes.
10. If the optional <InitialValue> element is not
preset, it defaults to 0.
11. A <RegisterName> may appear in any combination of
input and output definition lines or none at all;
however, a specific bit of a register may be used in
at most one input or output definition line.
12. The size of an input or output is defined as follows:
If both <LowBit> and <HighBit> are present:
Size = <HighBit> - <LowBit> + 1
If <HighBit> is present and <LowBit> is missing:
Size = 1
If both <LowBit> and <HighBit> are missing:
Size = <BitWidth> of corresponding register
13. Comments, extra whitespace, and blank lines are
ignored. See xtsc_script_file.
"use_fast_access" bool If true, this device will support fast access for the
TurboXim simulation engine using peek/poke. If false,
TurboXim fast access will not be allowed.
Default = true.
"response_time" u32 This is the number of clock periods that this device
See also:
xtsc_mmio
xtsc::xtsc_parms
Parameters:
definition_file See the "definition_file" parameter
width8 Memory data interface width in bytes.
swizzle_bytes See the "swizzle_bytes" parameter
• xtsc_mmio.h
Interface for dynamic simulation mode switching between fast-functional and cycle-
accurate modes.
#include <xtsc/xtsc_mode_switch_if.h>Inheritance diagram for xtsc_mode_switch_if:
xtsc_mode_switch_if
xtsc_udma xtsc_xttlm2tlm2_transactor
• virtual ∼xtsc_mode_switch_if ()
virtual destructor
Interface for dynamic simulation mode switching between fast-functional and cycle-
accurate modes. Any device that needs to participate in simulation mode switching should
implement this interface, create an xtsc_switch_registration object, and pass that object to
xtsc_register_mode_switch_interface.
For example, have the sc_module sub-class of the device inherit from and implement the
xtsc_mode_switch_if and then have code like this in the constructor:
xtsc_register_mode_switch_interface(
xtsc_switch_registration(*this, *this, "")
);
Parameters:
mode If mode is XTSC_CYCLE_ACCURATE, then switch to cycle-accurate (non-
TurboXim) mode. If mode is XTSC_FUNCTIONAL, then switch to functional mode
(TurboXim).
Returns:
true if switch was successful.
See also:
prepare_to_switch_sim_mode()
Parameters:
mode If mode is XTSC_CYCLE_ACCURATE, then switch to cycle-accurate (non-
TurboXim) mode. If mode is XTSC_FUNCTIONAL, then switch to functional mode
(TurboXim).
Returns:
true if this device is ready to switch, false if it is not yet ready.
During the dynamic simulation mode switching protocol, when a device returns not ready
from prepare_to_switch_sim_mode(), it should fire this event when it is ready.
Returns:
event fired when a device is ready to switch after it reported that it was not ready.
Returns:
the current mode
Query function to determine whether the device is stalled for a simulation mode switch.
Returns:
true if the device has a mode switch pending
• xtsc_mode_switch_if.h
xtsc_core
xtsc_tx_loader
xtsc_udma
xtsc_arbiter
xtsc_lookup
xtsc_lookup_driver
xtsc_lookup_pin
xtsc_master
xtsc_master_tlm2
xtsc_cache
xtsc_memory
xtsc_dma_engine
xtsc_memory_pin
xtsc_memory_tlm2
xtsc_memory_trace
xtsc_connection_interface xtsc_mmio
xtsc_module
xtsc_resettable xtsc_pin2tlm_lookup_transactor
xtsc_pin2tlm_memory_transactor
xtsc_queue
xtsc_queue_consumer
xtsc_queue_pin
xtsc_queue_producer
xtsc_router
xtsc_slave
Xtensa SystemC (XTSC) Reference Manual 715
xtsc_tlm22xttlm_transactor
Chapter 7. Class Documentation
xtsc_connection_interface xtsc_resettable
xtsc_module
• virtual ∼xtsc_module ()
Destructor.
Parameters:
module A reference to the associated sc_module.
The implementation of reset() in xtsc_module logs a warning and does nothing else. Sub-
classes should provide their own implementation if they are able to support reset.
Implements xtsc_resettable.
Reimplemented in xtsc_cache, xtsc_core, xtsc_arbiter, xtsc_dma_engine, xtsc_lookup,
xtsc_lookup_driver, xtsc_master, xtsc_master_tlm2, xtsc_memory, xtsc_memory_tlm2,
xtsc_mmio, xtsc_queue, xtsc_queue_consumer, xtsc_queue_producer, xtsc_router, xtsc_-
slave, xtsc_wire, xtsc_wire_source, xtsc_lookup_pin, xtsc_memory_pin, xtsc_memory_-
trace, xtsc_pin2tlm_lookup_transactor, xtsc_pin2tlm_memory_transactor, xtsc_queue_-
pin, xtsc_tlm2pin_memory_transactor, xtsc_tlm22xttlm_transactor, xtsc_tx_loader, xtsc_-
udma, xtsc_wire_logic, and xtsc_xttlm2tlm2_transactor.
The documentation for this class was generated from the following file:
• xtsc.h
This is a base class for modules implementing pin-level interfaces, especially pin-level
memory interfaces.
#include <xtsc/xtsc_module_pin_base.h>Inheritance diagram for xtsc_module_pin_-
base:
xtsc_module_pin_base
Classes
• class req_cntl
Class to manage the bits of POReqCntl/PIReqCntl.
• class resp_cntl
Class to manage the bits of PORespCntl/PIRespCntl/SnoopRespCntl.
Public Types
• enum memory_interface_type {
DRAM0,
DRAM0RW,
DRAM0BS,
DRAM1,
DRAM1RW,
DRAM1BS,
DROM0,
IRAM0,
IRAM1,
IROM0,
URAM0,
XLMI0,
PIF,
IDMA0 }
Memory interface type.
Protected Attributes
• sc_core::sc_module & m_sc_module
Reference to the sc_module being constructed with these pins.
• xtsc::u32 m_num_sets
Number of sets of ports (e.g. number of memory ports, NOT sc_port).
• xtsc::u32 m_num_subbanks
Number of subbanks (or 0 if not subbanked).
• sc_core::sc_trace_file ∗ m_p_trace_file
Pointer to optional VCD object.
• std::string m_suffix
Suffix to be added to every pin-level input and output name.
• bool m_banked
If true and m_num_subbanks is 0, then add "B" after the base port_name and before the
set_id.
• bool m_split_rw
When m_split_rw is true, if append_id is true in a call to one of the add_xxx_input()/add_-
xxx_output() methods then adjusted_set_id will be used as part of the port name instead
of set_id according to the formula: adjusted_set_id = floor(set_id / 2).
• bool m_has_dma
• bool m_append_subbank
Include the "S" and subbank number in suffix (N.A. unless m_num_subbanks > 1).
• map_string_u32 m_map_port_size
Map of pin-level port name to bit width.
• set_string m_set_port
Set of names of all pin-level inputs and outputs.
• set_string m_set_input
Set of names of all pin-level inputs.
• set_string m_set_output
Set of names of all pin-level outputs.
• vector_set_string m_vector_set_input
Vector[i] is the set of names of all set i pin-level inputs.
• vector_set_string m_vector_set_output
Vector[i] is the set of names of all set i pin-level outputs.
• vector_set_string m_vector_set_bool_input
Vector[i] is the set of names of all set i sc_in<bool>.
• vector_set_string m_vector_set_uint_input
Vector[i] is the set of names of all set i sc_in<sc_uint_base>.
• vector_set_string m_vector_set_wide_input
Vector[i] is the set of names of all set i sc_in<sc_bv_base>.
• vector_set_string m_vector_set_bool_output
Vector[i] is the set of names of all set i sc_out<bool>.
• vector_set_string m_vector_set_uint_output
Vector[i] is the set of names of all set i sc_out<sc_uint_base>.
• vector_set_string m_vector_set_wide_output
Vector[i] is the set of names of all set i sc_out<sc_bv_base>.
• map_bool_input m_map_bool_input
• map_uint_input m_map_uint_input
The map of all sc_in<sc_uint_base> inputs.
• map_wide_input m_map_wide_input
The map of all sc_in<sc_bv_base> inputs.
• map_bool_output m_map_bool_output
The map of all sc_out<bool> outputs.
• map_uint_output m_map_uint_output
The map of all sc_out<sc_uint_base> outputs.
• map_wide_output m_map_wide_output
The map of all sc_out<sc_bv_base> outputs.
Friends
This is a base class for modules implementing pin-level interfaces, especially pin-level
memory interfaces. This class is responsible for containing and managing the sc_in<>
and sc_out<> ports of the derived class (the derived class should also inherit from sc_-
module).
This class supports multi-ported memories. A single-ported memory is said to have 1 port
set, a dual-ported memory is said to have 2 port sets, etc. The number of port sets is
specified using the num_sets parameter of the xtsc_module_pin_base constructor.
Three types of sc_in<> ports and three types of sc_out<> ports are supported:
Ports are created using one of the 6 methods corresponding to the type of port de-
sired: add_bool_input(), add_uint_input(), add_wide_input(), add_bool_output(), add_-
uint_output(), and add_wide_output().
Once created, a reference to a port can be obtained using one of the 6 methods: get_-
bool_input(), get_uint_input(), get_wide_input(), get_bool_output(), get_uint_output(), and
get_wide_output().
See also:
xtsc_tlm2pin_memory_transactor
xtsc_pin2tlm_memory_transactor
xtsc_memory_pin
Parameters:
module Reference to the associated sc_module.
num_sets Number of I/O port sets (e.g. a single-ported memory has 1 set of ports, a
dual-ported memory has 2 sets of ports, etc.). If split_rw is true, then a read port
set counts as one and its corresponding write port set counts as another one.
p_trace_file Pointer to VCD object (can be NULL to indicate no tracing). If not NULL,
then all input and output pins will be traced.
suffix This constant suffix will be added to every port name. This suffix can be set to
the empty string ("") if no suffix is desired.
banked True if this is for a banked memory. If banked is true and num_subbanks
is 0, then when forming the full port name the letter "B" will be added after the
base port_name and before each set_id. If banked is true and num_subbanks
is set then when forming the full port name the letter "B" will be added after the
base port_name, followed by floor(set_id/num_subbanks), followed by the letter
"S" followed by set_idnum_subbanks, followed by suffix, if any.
split_rw True if this is for a DRAM with split Rd/Wr interfaces.
has_dma True if last split Rd/Wr interface is from inbound PIF (so when forming the
full port name the suffix "DMA" will be used instead of the port digit M). See m_-
has_dma.
num_subbanks Number of subbanks. Leave at 0 unless the memory has multiple
subbanks, in which case num_subbanks should be greater then 1 and evenly
divide num_sets. See banked.
Return a reference to the sc_in<bool> of the named input. This method is used for port
binding. For example, to bind the "PIReqRdy" sc_in<bool> of an xtsc_module_pin_base
named pin to an sc_signal<bool> named PIReqRdy:
pin.get_bool_input("PIReqRdy")(PIReqRdy);
Return a reference to the sc_in<sc_uint_base> of the named input. This method is used
for port binding. For example, to bind the "PIRespCntl" sc_in<sc_uint_base> of an xtsc_-
module_pin_base named pin to an sc_signal<sc_uint_base> named PIRespCntl:
pin.get_uint_input("PIRespCntl")(PIRespCntl);
Return a reference to the sc_in<sc_bv_base> of the named input. This method is used
for port binding. For example, to bind the "PIRespData" sc_in<sc_bv_base> of an xtsc_-
module_pin_base named pin to an sc_signal<sc_bv_base> named PIRespData:
pin.get_wide_input("PIRespData")(PIRespData);
Return a reference to the sc_out<bool> of the named output. This method is used for port
binding. For example, to bind the "POReqValid" sc_out<bool> of an xtsc_module_pin_-
base named pin to an sc_signal<bool> named POReqValid:
pin.get_bool_output("POReqValid")(POReqValid);
pin.get_uint_output("POReqCntl")(POReqCntl);
Return a reference to the sc_out<sc_bv_base> of the named output. This method is used
for port binding. For example, to bind the "POReqData" sc_out<sc_bv_base> of an xtsc_-
module_pin_base named pin to an sc_signal<sc_bv_base> named POReqData:
pin.get_wide_output("POReqData")(POReqData);
Dump name, type, and bit-width of all ports of the specified set.
Parameters:
os The ostream object to dump to.
set_id The port set to dump or 0xFFFFFFFF, the default, to dump all port sets.
Parameters:
port_name The base port name. The full port name is formed by concatenating port_-
name, set_id (if append_id is true), and the optional suffix passed into the xtsc_-
module_pin_base constructor.
append_id If true, then set_id will be part of the full port name. Otherwise, set_id will
not be part of the full port name. Note: See m_split_rw.
set_id This specifies the set this port belongs.
no_subbank Set true to cause m_append_subbank to be forced false for this call only
(used for lock/busy signals that are per bank, not per subbank).
Parameters:
port_name The base port name. The full port name is formed by concatenating port_-
name, set_id (if append_id is true), and the optional suffix passed into the xtsc_-
module_pin_base constructor.
num_bits The number of bits.
append_id If true, then set_id will be part of the full port name. Otherwise, set_id will
not be part of the full port name. Note: See m_split_rw.
set_id This specifies the set this port belongs.
Parameters:
port_name The base port name. The full port name is formed by concatenating port_-
name, set_id (if append_id is true), and the optional suffix passed into the xtsc_-
module_pin_base constructor.
num_bits The number of bits.
append_id If true, then set_id will be part of the full port name. Otherwise, set_id will
not be part of the full port name. Note: See m_split_rw.
set_id This specifies the set this port belongs.
Parameters:
port_name The base port name. The full port name is formed by concatenating port_-
name, set_id (if append_id is true), and the optional suffix passed into the xtsc_-
module_pin_base constructor.
append_id If true, then set_id will be part of the full port name. Otherwise, set_id will
not be part of the full port name. Note: See m_split_rw.
set_id This specifies the set this port belongs.
no_subbank Set true to cause m_append_subbank to be forced false for this call only
(used for lock/busy signals that are per bank, not per subbank).
Parameters:
port_name The base port name. The full port name is formed by concatenating port_-
name, set_id (if append_id is true), and the optional suffix passed into the xtsc_-
module_pin_base constructor.
Parameters:
port_name The base port name. The full port name is formed by concatenating port_-
name, set_id (if append_id is true), and the optional suffix passed into the xtsc_-
module_pin_base constructor.
num_bits The number of bits.
append_id If true, then set_id will be part of the full port name. Otherwise, set_id will
not be part of the full port name. Note: See m_split_rw.
set_id This specifies the set this port belongs.
Parameters:
parms The xtsc_parms object which has a parameter named by parm_name.
parm_name The parameter name (e.g. "req_user_data").
parm_value A reference to the string in which to return the value that parm_name
maps to.
port_name A reference to the string in which to return the base port name.
bit_width A reference to the u32 in which to return the bit width.
min_bits The minimum supported bit_width.
max_bits The maximum supported bit_width.
If true and m_num_subbanks is 0, then add "B" after the base port_name and before the
set_id. If m_num_subbanks is non-zero, then add "B" and bank, then add "S" and subb-
bank. Where: bank=floor(set_id/m_num_subbanks) subbank=set_id % m_num_subbanks
Definition at line 771 of file xtsc_module_pin_base.h.
The documentation for this class was generated from the following file:
• xtsc_module_pin_base.h
xtsc_core_parms
xtsc_initialize_parms
xtsc_tx_loader_parms
xtsc_udma_parms
xtsc_arbiter_parms
xtsc_lookup_driver_parms
xtsc_lookup_parms
xtsc_lookup_pin_parms
xtsc_master_parms
xtsc_master_tlm2_parms
xtsc_cache_parms
xtsc_memory_parms
xtsc_dma_engine_parms
xtsc_memory_pin_parms
xtsc_memory_tlm2_parms
xtsc_memory_trace_parms
xtsc_parms xtsc_mmio_parms
xtsc_pin2tlm_lookup_transactor_parms
xtsc_pin2tlm_memory_transactor_parms
xtsc_queue_consumer_parms
734 Xtensa SystemC (XTSC) Reference Manual
xtsc_queue_parms
Chapter 7. Class Documentation
Public Types
• enum xtsc_parameter_type {
PARM_TYPE_BOOL,
PARM_TYPE_DOUBLE,
PARM_TYPE_U32,
PARM_TYPE_VOID_POINTER,
PARM_TYPE_U32_VECTOR,
PARM_TYPE_C_STR,
PARM_TYPE_C_STR_ARRAY,
PARM_TYPE_XTSC_PARMS }
• void set (const char ∗name, const std::vector< u32 > &value)
Set an existing named parameter of type vector<u32>.
• void get (const char ∗name, std::vector< u32 > &value) const
Get the named value of type vector<u32>.
• void get (const char ∗name, const char ∗const ∗&value) const
Get the named value of type char∗∗ (NULL-terminated array of c-strings).
• u32 get_name_width ()
Get the width of the name column used by the dump methods.
• u32 extract_parms (int argc, const char ∗const argv[ ], const std::string &id="")
Extract any applicable parameters from a c-string array.
• void add (const char ∗name, double value, bool read_only=false, bool
dumpable=true)
Add a new named parameter of type double.
• void add (const char ∗name, int value, bool read_only=false, bool dumpable=true)
Add a new named parameter of type int in the u32 map.
• void add (const char ∗name, u32 value, bool read_only=false, bool dumpable=true)
Add a new named parameter of type u32.
• void add (const char ∗name, const std::vector< u32 > &value, bool read_only=false,
bool dumpable=true)
Add a new named parameter of type vector<u32>.
• void add (const char ∗name, const void ∗value, bool read_only=false, bool
dumpable=true)
Add a new named parameter of type void∗.
• void add (const char ∗name, const char ∗value, bool read_only=false, bool
dumpable=true)
Add a new named parameter of type char∗ (c-string).
• void add (const char ∗name, const char ∗const ∗value, bool read_only=false, bool
dumpable=true)
Add a new named parameter of type char∗∗ (NULL-terminated array of c-strings).
• void add (const char ∗name, const xtsc_parms &value, bool read_only=false, bool
dumpable=true)
Add a new named parameter of type xtsc_parms.
Private Attributes
• std::map< std::string, xtsc_parameter_type > m_type_map
name-to-type map
• u32 m_name_width
width of the name column for dumping
Base class for core and component module construction parameters. This
class is the base class for all core and component module constructor pa-
rameters sub-classes (xtsc_core_parms, xtsc_component::xtsc_memory_parms, xtsc_-
component::xtsc_arbiter_parms, etc).
This class maintains a map of name-value pairs for each of the following parameter types:
bool
double
u32
vector<u32>
void*
char*
char**
xtsc_parms
public:
widget_parms() {
add("bit_width", (u32) 16);
}
};
Note: When an xtsc_parms object is copied a deep copied is performed for all parameters
except for void∗ parameters. See copy_void_pointer().
See also:
xtsc_core_parms
xtsc_component::xtsc_arbiter_parms
xtsc_component::xtsc_lookup_parms
xtsc_component::xtsc_lookup_driver_parms
xtsc_component::xtsc_master_parms
xtsc_component::xtsc_memory_parms
xtsc_component::xtsc_queue_parms
xtsc_component::xtsc_queue_consumer_parms
xtsc_component::xtsc_queue_producer_parms
xtsc_component::xtsc_router_parms
xtsc_component::xtsc_slave_parms
xtsc_component::xtsc_wire_parms
Enumerator:
PARM_TYPE_BOOL parameter of type bool
PARM_TYPE_DOUBLE parameter of type double
PARM_TYPE_U32 parameter of type u32
PARM_TYPE_VOID_POINTER parameter of type void∗
PARM_TYPE_U32_VECTOR parameter of type vector<u32>
PARM_TYPE_C_STR parameter of type char∗
PARM_TYPE_C_STR_ARRAY parameter of type char∗∗
PARM_TYPE_XTSC_PARMS parameter of type xtsc_parms
Return the kind (C++ type) of this xtsc_parms object. Sub-classes should override
this method and return a c-string identifying their type (e.g. "xtsc_core_parms", "xtsc_-
memory_parms", etc.).
Reimplemented in xtsc_initialize_parms, xtsc_cache_parms, xtsc_core_parms, xtsc_-
arbiter_parms, xtsc_dma_engine_parms, xtsc_lookup_parms, xtsc_lookup_driver_parms,
xtsc_master_parms, xtsc_master_tlm2_parms, xtsc_memory_parms, xtsc_memory_-
tlm2_parms, xtsc_mmio_parms, xtsc_queue_parms, xtsc_queue_consumer_parms,
xtsc_queue_producer_parms, xtsc_router_parms, xtsc_slave_parms, xtsc_wire_parms,
xtsc_wire_source_parms, xtsc_lookup_pin_parms, xtsc_memory_pin_parms, xtsc_-
memory_trace_parms, xtsc_pin2tlm_lookup_transactor_parms, xtsc_pin2tlm_memory_-
transactor_parms, xtsc_queue_pin_parms, xtsc_tlm2pin_memory_transactor_parms,
xtsc_tlm22xttlm_transactor_parms, xtsc_tx_loader_parms, xtsc_udma_parms, xtsc_-
wire_logic_parms, and xtsc_xttlm2tlm2_transactor_parms.
Definition at line 126 of file xtsc_parms.h.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
Returns:
the total number of parameters.
Dump all parameters grouped by type (that is, all bool parameters, then all u32 parameters,
etc).
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
recurse If false (the default), then only the name of each hierarchical xtsc_parms ob-
jects is dumped (i.e their contents are not dumped). If true, the name of each hier-
archical xtsc_parms objects is dumped and then xtsc_parms::dump_by_type() is
Returns:
the total number of parameters. If recurse is true, then this number includes the num-
ber of parameters in each child xtsc_parms object recursively, but does not count any
child xtsc_parms object itself. If recurse is false, then this number includes 1 for each
immediate child xtsc_parms object, but does not count any parameters contained in
those child xtsc_parms objects.
Parameters:
parm_type The parameter type to dump.
os The ostream object to which the parameters are dumped. Default is cout.
Parameters:
name The name of the parameter to dump.
os The ostream object to which the parameter value is to be dumped. Default is cout.
Determine if a parameter with the specified name exists. The is method returns true if a
parameter with the specified name exists, otherwise it returns false.
Determine if the named parameter is dumpable. This method returns true if the named
parameter is dumpable, it returns false if the named parameter is not dumpable, and it
throws an exception if the named parameter does not exist.
Determine if the named parameter is writable. The is method returns true if the named
parameter is writable, it returns false if the named parameter is read-only, and it throws an
exception if the named parameter does not exist.
This method returns the xtsc_parameter_type of the parameter with the specified name. It
throws an exception if the parameter does not exists.
7.95.3.10 void add (const char ∗ name, bool value, bool read_only = false, bool
dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter. Note: value should be of type bool. If it is of type
int or u32, then the name- value pair will be stored in the u32 map instead of the
bool map. For literals, this means true/false should be used instead of 1/0.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Parameters:
name The name of the parameter.
value The value of the parameter. Note: value should be of type bool. If it is of type
int or u32, then the name- value pair will be stored in the u32 map instead of the
bool map. For literals, this means true/false should be used instead of 1/0.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of bool parameters.
7.95.3.13 void add (const char ∗ name, double value, bool read_only = false,
bool dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter. Note: value should be of type double. For literals,
this means a decimal point should be present.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Parameters:
name The name of the parameter.
value The value of the parameter. Note: value should be of type double. For literals,
this means a decimal point should be present.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of double parameters.
7.95.3.16 void add (const char ∗ name, int value, bool read_only = false, bool
dumpable = true) [protected]
Add a new named parameter of type int in the u32 map. Note: int values are stored in the
u32 map as u32 values.
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Set an existing named parameter of type int in the u32 map. Note: int values are stored in
the u32 map as u32 values.
Parameters:
name The name of the parameter.
value The value of the parameter.
7.95.3.18 void add (const char ∗ name, u32 value, bool read_only = false, bool
dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Parameters:
name The name of the parameter.
value The value of the parameter.
Return the named value of type u32 if it is non-zero. This is a convenience method to get
a u32 value and ensure it is not 0. If it is zero, an exception is thrown which gives the
xtsc_parms sub-class and the parameter name.
xtsc_exception if the value is 0.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of u32 parameters.
7.95.3.22 void add (const char ∗ name, const std::vector< u32 > & value, bool
read_only = false, bool dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
7.95.3.23 void set (const char ∗ name, const std::vector< u32 > & value)
Parameters:
name The name of the parameter.
value The value of the parameter.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of vector<u32> parameters.
7.95.3.25 void add (const char ∗ name, const void ∗ value, bool read_only = false,
bool dumpable = true) [protected]
Add a new named parameter of type void∗. Caution: By default, when an xtsc_parms
object is copied, the void∗ parameters are copied as opaque pointers. The (unknown)
objects pointed to by the void∗ parameters are NOT copied. For a means to change the
default behavior, see copy_void_pointer().
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Set an existing named parameter of type void∗. Caution: By default, when an xtsc_parms
object is copied, the void∗ parameters are copied as opaque pointers. The (unknown)
objects pointed to by the void∗ parameters are NOT copied. For a means to change the
default behavior, see copy_void_pointer().
Parameters:
name The name of the parameter.
value The value of the parameter.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of void∗ parameters.
7.95.3.28 void add (const char ∗ name, const char ∗ value, bool read_only =
false, bool dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Parameters:
name The name of the parameter.
value The value of the parameter.
Return the named value of type char∗ if it is neither NULL nor empty. This is a convenience
method to get a u32 value and ensure it is neither NULL nor empty. If it is NULL or empty
an exception is thrown which gives the xtsc_parms sub-class and the parameter name.
xtsc_exception if the value is NULL or empty.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of char∗ parameters.
7.95.3.32 void add (const char ∗ name, const char ∗const ∗ value, bool read_only
= false, bool dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
Note: value can be NULL; however, if it is not NULL, then the last entry of the array (i.e.
value[last]) MUST be NULL.
7.95.3.33 void set (const char ∗ name, const char ∗const ∗ value)
Parameters:
name The name of the parameter.
value The value of the parameter.
Note: value can be NULL; however, if it is not NULL, then the last entry of the array (i.e.
value[last]) MUST be NULL.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
prefix A string prefix to prepend to the parameter name. Default is an empty string.
If prefix is not empty, then a period is also prepended (between prefix and pa-
rameter name). This is mainly used for hierarchical parameters (i.e. when an
xtsc_parms object contains other xtsc_parms objects--see dump_xtsc_parms_-
map()).
Returns:
the total number of char∗∗ parameters.
7.95.3.35 void add (const char ∗ name, const xtsc_parms & value, bool read_only
= false, bool dumpable = true) [protected]
Parameters:
name The name of the parameter. The first character of the name can be any alpha-
betic character plus underscore (_). Other characters can be any alphanumeric
character plus underscore (_).
value The value of the parameter.
read_only If true, then the value cannot be changed (calls to the set method will result
in an exception being thrown). If false (the default), then the value can be changed
by calls to the set method.
dumpable If true (the default), then this parameter is dumpable. If false, then the
parameter will not be dumped.
7.95.3.36 void set (const char ∗ name, const xtsc_parms & value)
Parameters:
name The name of the parameter.
value The value of the parameter.
Parameters:
os The ostream object to which the parameters are dumped. Default is cout.
recurse If false (the default), then only the name of each hierarchical xtsc_parms ob-
jects is dumped (i.e their contents are not dumped). If true, the name of each
hierarchical xtsc_parms objects is dumped and then xtsc_parms::dump() is re-
cursively called on that xtsc_parms object.
prefix A string prefix to prepend to the parameter name. Default is an empty string. If
prefix is not empty, then a period is also prepended (between prefix and parame-
ter name).
Returns:
If recurse is true, then returns the number of parameters in each child xtsc_parms
object recursively, but does not count any child xtsc_parms object itself. If recurse is
false, then returns the number of immediate child xtsc_parms objects.
7.95.3.38 u32 extract_parms (int argc, const char ∗const argv[ ], const std::string
& id = "")
Extract any applicable parameters from a c-string array. This optional convenience method
is designed to make it easy to pass in module configuration parameters on the command
line. This method will scan the argv array looking for c-strings in one of the following 3
formats (leading hyphens are ignored):
1. <ParmName>=<NewValue>
2. <ParmType>::<ParmName>=<NewValue>
3. <id>.<ParmName>=<NewValue>
For each match found, if <ParmName> matches an existing parameter name then that
parameters value will be changed to <NewValue> subject to the following constraits on
formats 2 and 3.
For format 2, <ParmType> must match the value returned by this objects kind() method.
For format 3, <id> must match the id argument passed into this method.
Each extracted parameter value is logged at INFO_LOG_LEVEL.
Parameters:
argc The number of c-strings in argv.
In sc_main.cpp:
xtsc_core_parms core_parms(CONFIG_NAME, XTENSA_REGISTRY, TDK_DIR);
core_parms.extract_parms(argc, argv, "core0");
xtsc_core core0("core0", core_parms);
Returns:
the number of parameters changed.
7.95.3.39 virtual void copy_void_pointer (const std::string & name, const void ∗
value) [protected, virtual]
This virtual method does a shallow copy of the void∗ pointer (the pointer is copied, but the
(unknown) object it points to is not). Sub-classes can override this virtual method to provide
their own copy mechanism.
Parameters:
name The name of the parameter.
Parameters:
name The name of the parameter.
dumpable The new value of dump attribute.
The documentation for this class was generated from the following file:
• xtsc_parms.h
xtsc_respond_if
xtsc_pif_respond_if_impl
m_ram_respond_impl
xtsc_command_handler_interface
m_udma m_udma
xtsc_pif_respond_if_impl
m_pif_respond_impl m_wer_lookup_impl
xtsc_udma xtsc_wer_lookup_if_impl
m_descriptor m_rer_lookup_impl
udma_descriptor
m_udma_parms
xtsc_lookup_if xtsc_rer_lookup_if_impl
xtsc_resettable xtsc_module m_pif_response
m_ram_response
xtsc_connection_interface
xtsc_response m_p_response
stream_dumper
m_stream_dumper
Protected Attributes
• xtsc_udma & m_udma
Our xtsc_udma object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_udma.h
xtsc_connection_interface xtsc_resettable
xtsc_module
xtsc_pin2tlm_lookup_transactor
xtsc_module xtsc_signal_sc_bv_base_floating
m_ready_floating
xtsc_pin2tlm_lookup_transactor
Public Attributes
• sc_core::sc_in< sc_dt::sc_bv_base > m_address
pin-level address to lookup
• void end_of_elaboration ()
Method to check interface width.
Protected Attributes
• bool m_has_ready
From "has_ready" parameter.
• sc_core::sc_time m_latency
From "latency" parameter.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
This device’s clock period as sc_time.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_sample_phase
From "sample_phase" parameter.
• xtsc::u32 m_address_width1
From "address_bit_width" parameter.
• xtsc::u32 m_data_width1
From "data_bit_width" parameter.
• sc_core::sc_trace_file ∗ m_p_trace_file
If "vcd_handle" specified.
• sc_dt::sc_bv_base m_zero_bv
To detect low signal.
• sc_dt::sc_bv_base m_one_bv
To detect high signal.
• sc_core::sc_event_queue m_drive_data
For drive_data_thread.
• xtsc::xtsc_signal_sc_bv_base_floating m_ready_floating
A transactor to convert a pin-level TIE lookup interface to Xtensa TLM. This transactor
converts a pin-level TIE lookup interface to xtsc_lookup_if, the equivalent Xtensa TLM in-
terface.
This transactor supports a TIE lookup interface that has a ready signal; however, the down-
stream Xtensa TLM lookup must always return true to the nb_is_ready() call.
See also:
xtsc_pin2tlm_lookup_transactor_parms
xtsc::xtsc_lookup_if
Parameters:
module_name Name of the xtsc_pin2tlm_lookup_transactor sc_module.
parms The remaining parameters for construction.
See also:
xtsc_pin2tlm_lookup_transactor_parms
The documentation for this class was generated from the following file:
• xtsc_pin2tlm_lookup_transactor.h
xtsc_parms
xtsc_pin2tlm_lookup_transactor_parms
xtsc_parms
xtsc_pin2tlm_lookup_transactor_parms
"has_ready" bool Specifies whether the lookup device has a ready signal.
This corresponds to the rdy keyword in the user's TIE
code for the lookup.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"sample_phase" u32 This parameter specifies the point in each clock period
at which the m_req and m_address signals are sampled.
This parameter is expressed in terms of the SystemC time
resolution (from sc_get_time_resolution()) and must be
strictly less than the clock period as specified by the
See also:
xtsc_pin2tlm_lookup_transactor
xtsc::xtsc_parms
Parameters:
address_bit_width Width of request address in bits.
data_bit_width Width of response data in bits.
has_ready Specifies whether or not the lookup device has a ready signal (corre-
sponds to the rdy keyword in the user’s TIE code for the lookup).
• xtsc_pin2tlm_lookup_transactor.h
This device converts memory transactions from pin level to transaction level.
#include <xtsc/xtsc_pin2tlm_memory_transactor.h>Inheritance diagram for xtsc_-
pin2tlm_memory_transactor:
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_module_pin_base
xtsc_pin2tlm_memory_transactor
xtsc_respond_if
xtsc_connection_interface
m_pin2tlm xtsc_respond_if_impl
xtsc_module
m_respond_impl
xtsc_resettable
xtsc_module_pin_base xtsc_pin2tlm_memory_transactor
m_subbank_activity m_debug_impl
subbank_activity
m_pin2tlm
xtsc_debug_if_impl
xtsc_debug_if
Classes
• class request_info
Information about each request.
• class subbank_activity
Keep track of subbank activity to a given given bank to ensure all responses are consistent
(all RSP_OK or all RSP_NACC).
• class xtsc_debug_if_impl
Implementation of xtsc_debug_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Public Types
• typedef xtsc::xtsc_request xtsc_request
• typedef xtsc::xtsc_response xtsc_response
• typedef sc_core::sc_fifo< sc_dt::sc_bv_base > wide_fifo
• typedef sc_core::sc_fifo< bool > bool_fifo
• typedef sc_core::sc_signal< bool > bool_signal
• typedef sc_core::sc_signal< sc_dt::sc_uint_base > uint_signal
• typedef sc_core::sc_signal< sc_dt::sc_bv_base > wide_signal
• typedef std::map< std::string, bool_signal ∗ > map_bool_signal
• typedef std::map< std::string, uint_signal ∗ > map_uint_signal
• typedef std::map< std::string, wide_signal ∗ > map_wide_signal
• typedef std::deque< xtsc::xtsc_address > address_deque
• ∼xtsc_pin2tlm_memory_transactor (void)
Destructor.
For xtsc_connection_interface.
Public Attributes
• sc_core::sc_port< xtsc::xtsc_request_if > ∗∗ m_request_ports
• sc_core::sc_export< xtsc::xtsc_respond_if > ∗∗ m_respond_exports
From us to slave (per mem port).
• xtsc::Readme How_to_get_input_and_output_ports
From master to us (per mem port).
• void sync_to_sample_phase ()
Sync to sample phase (m_sample_phase). If already at sample phase, sync to next one.
• void xlmi_load_retired_thread ()
DPort0LoadRetiredm.
• void xlmi_retire_flush_thread ()
DPort0RetireFlushm.
• void dram_lock_method ()
DRamnLockm.
Protected Attributes
• xtsc_respond_if_impl ∗∗ m_respond_impl
m_respond_exports binds to this (per mem port)
• xtsc_debug_if_impl ∗∗ m_debug_impl
m_debug_exports binds to this (per mem port)
• xtsc::u32 m_num_ports
The number of memory ports this transactor has.
• std::string m_interface_uc
Uppercase version of "memory_interface" parameter.
• std::string m_interface_lc
Lowercase version of "memory_interface" parameter.
• memory_interface_type m_interface_type
The memory interface type.
• xtsc::u32 m_size8
Byte size of the attached XLMI0 from "memory_byte_size" parameter.
• xtsc::u32 m_width8
Data width in bytes of the memory interface.
• xtsc::u32 m_dram_attribute_width
See "dram_attribute_width" parameter.
• sc_dt::sc_unsigned m_dram_attribute
To set value using xtsc_request::set_dram_attribute().
• sc_dt::sc_bv_base m_dram_attribute_bv
To read dram attribute before converting to sc_unsigned.
• xtsc::xtsc_address m_start_byte_address
Number to be add to the pin address to form the TLM request address.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
This device’s clock period as sc_time.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• sc_core::sc_time m_sample_phase
Clock phase for sampling certain signals (see "sample_phase").
• sc_core::sc_time m_sample_phase_plus_one
m_sample_phase plus one clock period
• sc_core::sc_time m_output_delay
See "output_delay" parameter.
• sc_core::sc_time ∗ m_request_time_stamp
Time stamp of last-transfer request when "one_at_a_time" is true (per mem port).
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• bool ∗ m_waiting_for_nacc
True if waiting for RSP_NACC from PIF slave (per mem port).
• bool ∗ m_request_got_nacc
True if active request got RSP_NACC from PIF slave (per mem port).
• bool m_cbox
See "cbox" parameter.
• bool m_split_rw
• bool m_has_dma
See "has_dma" parameter.
• bool m_append_id
True if pin port names should include the set_id.
• bool m_inbound_pif
True if interface is inbound PIF.
• bool m_snoop
True if interface is snoop port (future use).
• bool m_has_coherence
See "has_coherence" parameter.
• bool m_has_pif_attribute
See "has_pif_attribute" parameter.
• bool m_has_pif_req_domain
See "has_pif_req_domain" parameter.
• bool m_axi_exclusive
See "axi_exclusive" parameter.
• bool m_axi_exclusive_id
See "axi_exclusive_id" parameter.
• bool m_big_endian
True if master is big endian.
• bool m_write_responses
True if TLM write responses will be dropped on the floor (PIF|IDMA0 only).
• bool m_has_request_id
True if the "POReqId" and "PIRespId" ports should be present.
• bool m_one_at_a_time
See "one_at_a_time" parameter.
• bool m_prereject_responses
• xtsc::u32 ∗ m_current_id
Used when m_has_request_id is false (per mem port).
• std::string m_req_user_data
See "req_user_data" parameter.
• std::string m_req_user_data_name
Name of request user data port.
• xtsc::u32 m_req_user_data_width1
Bit width of request user data port.
• std::string m_rsp_user_data
See "rsp_user_data" parameter.
• std::string m_rsp_user_data_name
Name of response user data port.
• xtsc::u32 m_rsp_user_data_width1
Bit width of response user data port.
• sc_dt::sc_bv_base ∗ m_user_data_val
Value for rsp_user_data port.
• xtsc::u32 m_address_bits
Number of bits in the address (non-PIF|IDMA0 only).
• xtsc::u32 m_check_bits
Number of bits in ECC/parity signals (from "check_bits").
• xtsc::xtsc_address m_address_mask
Address mask.
• xtsc::xtsc_address m_bus_addr_bits_mask
Address mask to get bits which indicate which byte lane.
• xtsc::u32 m_address_shift
Number of bits to right-shift the address.
• xtsc::u32 m_route_id_bits
• xtsc::u32 m_max_cycle_entries
See "max_cycle_entries" parameter.
• subbank_activity ∗∗ m_subbank_activity
m_subbank_activity[bank][cycle_index]
• xtsc::u32 m_next_port_lcl_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_drive_read_data_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_drive_busy_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_xlmi_load_retired_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_xlmi_retire_flush_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_sample_pin_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_drive_req_rdy_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_send_tlm_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_drive_pin_response_thread
To give each thread instance a port number.
• bool m_has_busy
True if memory interface has a busy pin (non-PIF|IDMA0 only).
• bool m_has_lock
True if memory interface has a lock pin (DRAM0|DRAM0BS|DRAM0RW|DRAM1|DRAM1BS|DRAM1RW
only).
• bool m_has_xfer_en
True if memory interface has Xfer enable pin (NA PIF|IDMA0|DROM0|XLMI0).
• sc_core::sc_event ∗ m_pif_req_event
Notify pif_send_tlm_request_thread (per mem port).
• sc_core::sc_event ∗ m_pif_resp_event
Notify pif_drive_pin_response_thread (per mem port).
• bool ∗ m_first_block_write
True if next BLOCK_WRITE will be first in the block (per mem port).
• xtsc::u32 ∗ m_burst_write_transfer_num
Transfer number for BURST_WRITE.
• bool ∗ m_first_rcw
True if next RCW will be first in the block (per mem port).
• bool ∗ m_dram_lock
State of DRAM lock pin.
• bool m_dram_lock_reset
State of DRAM lock pin needs to be reset.
• xtsc::u64 ∗ m_tag
Tag from first BLOCK_WRITE and RCW.
• xtsc::xtsc_address ∗ m_last_address
Keep track of BLOCK_WRITE/BURST_WRITE addresses.
• sc_dt::sc_uint_base m_address
The address after any required shifting and masking.
• sc_dt::sc_uint_base m_id
POReqId/PIRespId.
• sc_dt::sc_uint_base m_priority
POReqPriority/PIRespPriority.
• sc_dt::sc_uint_base m_route_id
POReqRouteId/PIRespRouteId.
• sc_dt::sc_uint_base m_coh_cntl
PIRespCohCntl/SnoopRespCohCntl.
• sc_dt::sc_bv_base m_data
Read/write data.
• req_cntl m_req_cntl
Value for POReqCntl/SnoopReqCntl.
• resp_cntl m_resp_cntl
Value for PIRespCntl/SnoopRespCntl.
• wide_fifo ∗∗ m_read_data_fifo
sc_fifo of sc_bv_base read data values (per mem port)
• bool_fifo ∗∗ m_busy_fifo
sc_fifo to keep track of busy pin (per mem port, per bank if subbanked)
• bool_fifo ∗∗ m_req_rdy_fifo
sc_fifo to keep track of PIReqRdy pin (per mem port, per bank if subbanked) A false entry,
means to deassert for one clock period A true entry, means to deassert until m_drive_req_-
rdy_event is notified again at which point the pin will be reasserted and a false entry read
from the fifo.
• sc_core::sc_event ∗ m_drive_read_data_event
Notify when read data should be driven (per mem port).
• sc_core::sc_event ∗ m_drive_busy_event
Notify when busy should be driven (per mem port).
• sc_core::sc_event ∗ m_drive_req_rdy_event
Notify when PIReqRdy should be driven (per mem port).
• address_deque ∗ m_load_address_deque
deque of XLMI load addresses (per mem port)
• bool ∗ m_previous_response_last
true if previous response was a last transfer (per mem port)
• map_bool_signal m_map_bool_signal
The optional map of all sc_signal<bool> signals.
• map_uint_signal m_map_uint_signal
The optional map of all sc_signal<sc_uint_base> signals.
• map_wide_signal m_map_wide_signal
The optional map of all sc_signal<sc_bv_base> signals.
• sc_dt::sc_bv_base m_zero_bv
For initialization.
• sc_dt::sc_uint_base m_zero_uint
For initialization.
• bool_input ∗∗ m_p_en
DPortEn, DRamEn, DRomEn, IRamEn, IRomEn.
• uint_input ∗∗ m_p_addr
DPortAddr, DRamAddr, DRomAddr, IRamAddr, IRomAddr.
• uint_input ∗∗ m_p_lane
DPortByteEn, DRamByteEn, DRomByteEn, IRamWordEn, IRomWordEn.
• wide_input ∗∗ m_p_wrdata
DPortWrData, DRamWrData, IRamWrData.
• bool_input ∗∗ m_p_wr
DPortWr, DRamWr, IRamWr.
• bool_input ∗∗ m_p_load
DPortLoad, IRamLoadStore, IRomLoad.
• bool_input ∗∗ m_p_retire
DPortLoadRetired.
• bool_input ∗∗ m_p_flush
DPortRetireFlush.
• bool_input ∗∗ m_p_lock
DRamLock (per bank if subbanked).
• wide_input ∗∗ m_p_attr
DRamAttr, DRamWrAttr.
• wide_input ∗∗ m_p_check_wr
DRamCheckWrData, IRamCheckWrData.
• wide_output ∗∗ m_p_check
DRamCheckData, IRamCheckData.
• bool_input ∗∗ m_p_xfer_en
DRamXferEn, IRamXferEn, IRomXferEn, URamXferEn.
• bool_output ∗∗ m_p_busy
DPortBusy, DRamBusy, DRomBusy, IRamBusy, IRomBusy (per bank if subbanked).
• wide_output ∗∗ m_p_data
DPortData, DRamData, DRomData, IRamData, IRomData.
• bool_input ∗∗ m_p_req_valid
POReqValid/SnoopReqValid.
• uint_input ∗∗ m_p_req_cntl
POReqCntl/SnoopReqCntl.
• uint_input ∗∗ m_p_req_adrs
POReqAdrs/SnoopReqAdrs.
• wide_input ∗∗ m_p_req_data
POReqData.
• uint_input ∗∗ m_p_req_data_be
POReqDataBE.
• uint_input ∗∗ m_p_req_id
POReqId/SnoopReqId.
• uint_input ∗∗ m_p_req_priority
POReqPriority/SnoopReqPriority.
• uint_input ∗∗ m_p_req_route_id
POReqRouteId.
• uint_input ∗∗ m_p_req_attribute
POReqAttribute.
• uint_input ∗∗ m_p_req_domain
POReqDomain.
• uint_input ∗∗ m_p_req_coh_vadrs
POReqCohVAdrsIndex/SnoopReqCohVAdrsIndex.
• uint_input ∗∗ m_p_req_coh_cntl
POReqCohCntl/SnoopReqCohCntl.
• wide_input ∗∗ m_p_req_user_data
Request User Data. See "req_user_data" parameter.
• bool_output ∗∗ m_p_req_rdy
PIReqRdy/SnoopReqRdy.
• bool_output ∗∗ m_p_resp_valid
PIRespValid/SnoopRespValid.
• uint_output ∗∗ m_p_resp_cntl
PIRespCntl/SnoopRespCntl.
• wide_output ∗∗ m_p_resp_data
PORespData/SnoopRespData.
• uint_output ∗∗ m_p_resp_id
PIRespId/SnoopRespId.
• uint_output ∗∗ m_p_resp_priority
PIRespPriority.
• uint_output ∗∗ m_p_resp_route_id
PIRespRouteId.
• uint_output ∗∗ m_p_resp_coh_cntl
PIRespCohCntl/SnoopRespCohCntl.
• wide_output ∗∗ m_p_resp_user_data
Response User Data. See "rsp_user_data" parameter.
• bool_input ∗∗ m_p_resp_rdy
PORespRdy/SnoopRespRdy.
Friends
• class request_info
• std::ostream & operator<< (std::ostream &os, const request_info &info)
This device converts memory transactions from pin level to transaction level. This device
converts pin-level memory requests to TLM memory requests (xtsc_request_if) and it con-
verts the corresponding TLM responses (xtsc_respond_if) to pin-level responses.
When configured for the PIF or IDMA0, this module introduces some timing artifacts that
might not be present in a pure pin-level system. This is because of the PIF protocol and
the way it is modeled in XTSC TLM. Specifically, this module does not know that there is a
pin-level request until it is too late to reject the request. Also, the only way to reject a TLM
response is to return false to the nb_response() call; however, during the nb_response()
call (which is non-blocking) this module does not yet know that the upstream pin-level
master will eventually reject the response (but see the "prereject_responses" parameter).
To overcome these issues, the PIReqRdy signal is deasserted for one clock period each
time the nb_respond() call is RSP_NACC. For the case of back-to-back PIF requests, the
effect of this is to reject the next request after the request that would have been rejected in
a pure pin-level simulation (but see the "one_at_a_time" parameter). By default, this model
does not reject TLM PIF responses which come from the memory interface slave and, if the
memory interface master rejects a pin-level response, then this module will simply repeat
the response next cycle.
When configured for a local memory, these timing artifacts don’t exist because, for a re-
quest, the busy is not due until the cycle after the request and, for a response, there is no
concept of rejecting it.
xtsc_pin2tlm_memory_transactor
POReqXXX
req
req req
xtsc_memory
PIReqRdy core0_pif
rsp
xtsc_master xtsc_core
tlm2pin pin2tlm
master core0
req
PIRespXXX
rsp rsp xtsc_memory
core0_dram0
rsp
PORespRdy
xtsc_tlm2pin_memory_transactor
See also:
xtsc_pin2tlm_memory_transactor_parms
xtsc::xtsc_core
xtsc_tlm2pin_memory_transactor
Parameters:
module_name Name of the xtsc_pin2tlm_memory_transactor sc_module.
pin2tlm_parms The remaining parameters for construction.
See also:
xtsc_pin2tlm_memory_transactor_parms
Parameters:
core The xtsc_core to connect with this xtsc_pin2tlm_memory_transactor.
pin2tlm_port The master port pair of this xtsc_pin2tlm_memory_transactor to con-
nect with the inbound PIF or snoop interface of core.
Parameters:
tlm2pin The xtsc_tlm2pin_memory_transactor to connect to this xtsc_pin2tlm_-
memory_transactor.
tlm2pin_port The tlm2pin port to connect to.
NOTE: This method is just for special testing purposes. In general, connecting a xtsc_-
tlm2pin_memory_transactor to a xtsc_pin2tlm_memory_transactor is not guarranteed to
meet timing requirements.
Returns:
number of ports that were connected by this call (1 or more)
The implementation of reset() in xtsc_module logs a warning and does nothing else. Sub-
classes should provide their own implementation if they are able to support reset.
Reimplemented from xtsc_module.
See also:
xtsc_module_pin_base::get_bool_input()
xtsc_module_pin_base::get_uint_input()
xtsc_module_pin_base::get_wide_input()
xtsc_module_pin_base::get_bool_output()
xtsc_module_pin_base::get_uint_output()
xtsc_module_pin_base::get_wide_output()
sc_fifo to keep track of PIReqRdy pin (per mem port, per bank if subbanked) A false entry,
means to deassert for one clock period A true entry, means to deassert until m_drive_req_-
rdy_event is notified again at which point the pin will be reasserted and a false entry read
from the fifo.
• xtsc_pin2tlm_memory_transactor.h
xtsc_parms
xtsc_pin2tlm_memory_transactor_parms
xtsc_parms
xtsc_pin2tlm_memory_transactor_parms
"memory_interface" char* The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW",
"DROM0", "IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0",
"PIF", and "IDMA0" (case-insensitive).
Note: For inbound PIF, set this parameter to "PIF" and
set the "inbound_pif" parameter to true.
Note: For snoop port, set this parameter to "PIF" and
set the "snoop" parameter to true (future use).
"num_ports" u32 The number of memory ports this transactor has. A value
of 1 means this transactor is single-ported, a value of
2 means this transactor is dual-ported, etc. If
"memory_interface" is "DRAM0RW" or "DRAM1RW", then a
read port counts as one port and its corresponding write
port counts as another port.
Default = 1.
Minimum = 1.
"byte_width" u32 Memory data interface width in bytes. Valid values for
"DRAM0", "DRAM0RW", "DRAM1", "DRAM1RW", "DROM0",
"URAM0", and "XLMI0" are 4, 8, 16, 32, and 64. Valid
values for "DRAM0BS" and "DRAM1BS" are 4, 8, 16, and 32.
Valid values for "IRAM0", "IRAM1", "IROM0", "PIF", and
"IDMA0" are 4, 8, and 16.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"sample_phase" u32 This specifies the phase (i.e. the point) in a clock
period at which input pins are sampled. Output pins
which are used for handshaking (PIReqRdy, PIRespValid,
IRamBusy, DRamBusy, etc.) are also sampled at this time.
This value is expressed in terms of the SystemC time
resolution (from sc_get_time_resolution()) and must be
strictly less than the clock period as specified by the
"clock_period" parameter. A value of 0 means pins are
sampled on posedge clock as specified by the
"posedge_offset" parameter.
Default = 0 (sample at posedge clock).
"output_delay" u32 This specifies how long to delay after the nb_respond()
call before starting to drive the output pins. The
output pins will remain driven for one clock period
(see the "clock_period" parameter). This value is
expressed in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less than
the clock period. A value of 0 means one delta cycle.
Default = 1 (i.e. 1 time resolution).
Parameters which apply to PIF|IDMA0 only (Note The snoop port is reserved for future use):
"inbound_pif" bool Set to true for inbound PIF. Set to false for outbound
PIF. This parameter is ignored if "memory_interface"
is other then "PIF".
Default = false (outbound PIF or snoop).
"snoop" bool Set to true for snoop port. Set to false for outbound
or inbound PIF. This parameter is ignored if
"memory_interface" is other then "PIF".
Default = false (outbound or inbound PIF).
Default = false.
"route_id_bits" u32 Number of bits in the route ID. Valid values are 0-32.
If "route_id_bits" is 0, then the "POReqRouteId" and
"PIRespRouteId" ports ("PIReqRouteId"/"PORespRouteId"
when "inbound_pif" is true) will not be present. This
parameter is ignored unless "memory_interface" is "PIF"
or "IDMA0".
Default = 0.
"axi_exclusive" bool True if ReqCntl and RespCntl should have AXI exclusive
encodings. This parameter is ignored unless
"memory_interface" is "PIF" or "IDMA0".
Default = false.
"axi_exclusive_id" bool True if the inbound PIF request route ID input, normally
called "PIReqRouteId", should be called "AXIExclID", and
the "PORespRouteId" output should not be present. This
parameter is ignored unless "memory_interface" is "PIF",
"inbound_pif" is true, and "axi_exclusive" is true.
Default = false.
"one_at_a_time" bool The PIReqRdy signal is always deasserted for one clock
period each time the nb_respond() call is RSP_NACC. In
addition, if this parameter is true then PIReqRdy will
also be deasserted as soon as a last-transfer request is
accepted until the last transfer response is received so
that only one complete request is accepted at a time.
When this parameter is true, a minimum of one clock
period must elapse between when a last-transfer request
is sent downstream and when a last-transfer response is
received (does not apply to RSP_NACC response). This
"req_user_data" char* If not NULL or empty, this specifies the optional pin-
level port that should be used for xtsc_request user
data. The string must give the port name and bit width
using the format: PortName,BitWidth
Note: The values read from PortName will written to
the low order BitWidth bits of the void*
pointer set by xtsc_request::set_user_data().
BitWidth may not exceed 32 or 64 depending on
whether you are using a 32 or 64 bit simulator.
This parameter is ignored unless "memory_interface" is
"PIF" or "IDMA0".
Default = "" (xtsc_request user data is ignored).
"rsp_user_data" char* If not NULL or empty, this specifies the optional pin-
level port that should be used for xtsc_response user
data. The string must give the port name and bit width
using the format: PortName,BitWidth
Note: The values driven on PortName will be obtained
from the low order BitWidth bits of the void*
pointer returned by xtsc_response::get_user_data().
BitWidth may not exceed 32 or 64 depending on
whether you are using a 32 or 64 bit simulator.
This parameter is ignored unless "memory_interface" is
"PIF" or "IDMA0".
Default = "" (xtsc_response user data is ignored).
Parameters which apply to local memories only (that is, non-PIF|IDMA0 memories):
Default = 0.
"has_busy" bool True if the memory interface has a busy pin. This
parameter is ignored if "memory_interface" is "PIF" or
"IDMA0".
Default = true.
"has_lock" bool True if the memory interface has a lock pin. This
parameter is ignored unless "memory_interface" is
"DRAM0", "DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", or
"DRAM1RW".
Default = false.
"has_xfer_en" bool True if the memory interface has an xfer enable pin.
This parameter is ignored if "memory_interface" is
"DROM0", "XLMI0", or "PIF" or "IDMA0".
Default = false.
"has_dma" bool True if the memory interface has split Rd/Wr ports
("DRAM0RW"|"DRAM1RW") accessible from inbound PIF or
"IDMA0".
Default = false.
See also:
xtsc_pin2tlm_memory_transactor
xtsc::xtsc_parms
Parameters:
memory_interface The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW", "DROM0",
"IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", "PIF", and "IDMA0" (case-
insensitive).
byte_width Memory data interface width in bytes.
address_bits Number of bits in address. Ignored for "PIF" and "IDMA0".
num_ports The number of memory ports this transactor has.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_pin2tlm_-
memory_transactor_parms.
memory_interface The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW", "DROM0",
"IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", "PIF", and "IDMA0" (case-
insensitive).
num_ports The number of ports this transactor has. If 0, the default, the number
of ports (1|2|4) will be inferred thusly: For banked DRAM0|DRAM1|DROM0,
• xtsc_pin2tlm_memory_transactor.h
Public Attributes
• sc_core::sc_port< xtsc_wire_write_if > m_sc_port
Bind this to the sc_export<xtsc_wire_write_if>.
Private Attributes
• sc_dt::sc_unsigned m_value
xtsc_wire_write_if, then this transactor template can be used to create an transactor of the
appropriate type. A typical use-case for this transactor is when cosimulating XTSC with
Verilog using a commercial simulator.
For more information about when this transactor might be used and how to use it, see
xtsc_tlm2pin_wire_transactor.
See also:
xtsc_tlm2pin_wire_transactor
xtsc_core::get_input_wire()
• xtsc.h
• virtual ∼xtsc_plugin_interface ()
Destructor.
This interface is used to add plugin modules to an XTSC simulation. Plugin support for a
custom module can be added to an XTSC simulation by first creating (writing, compiling,
and linking) the plugin and then by using it in xtsc-run or sc_main.
To create a plugin:
To use a plugin from xtsc-run, pass the optional path and name of the shared library (with-
out the extension) to xtsc-run using the --load_library command of xtsc-run.
To see one way to use a plugin from sc_main, add the --sc_main command to an xtsc-run
script in which you do a --load_library and then configure, create, and connect the plugin
module. You can then inspect the sc_main file that xtsc-run will generate when it processes
the script.
For working examples which illustrate implementing this interface please see the simple_-
memory.plugin and pif2sb_bridge.plugin sub-directories of the XTSC examples directory
installed with each Tensilica core config in:
• <xtsc_examples_root>/simple_memory.plugin
• <xtsc_examples_root>/pif2sb_bridge.plugin
For a step-by-step guide to take an XTSC module from the XTSC component library and
then rename, modify, and re-build it as an XTSC plugin please see the README.txt file
in the xtsc.component.plugin sub-directory of the XTSC examples directory installed with
each Tensilica core config in:
• <xtsc_examples_root>/xtsc.component.plugin
See also:
xtsc_connection_interface
xtsc_get_plugin_interface_t
The implementation of this API must return the set of plugin names that this shared library
supports. The xtsc-run program requires that plugin names be valid C/C++ identifiers. In
addition it is recommended that they contain no uppercase letters and that they neither
begin nor end with the underscore (_) character.
Note: To use a plugin whose name has uppercase letters or begins or ends with the under-
score character, requires adding a plugin name redefinition to the --load_library command
passed to xtsc-run.
7.102.2.2 virtual void help (const std::string & plugin_name, bool verbose,
std::ostream & os) [pure virtual]
The implementation of this API must generate help information to the specified ostream
object for the specified plugin name.
Parameters:
plugin_name The plugin name for which help information should be generated. This
name is guarranteed to be from the set returned by the get_plugin_names()
method.
verbose If true, verbose help should be generated.
os The ostream object to which the help information should be generated.
The implementation of this API must return a pointer to a valid, newly-constructed xtsc_-
parms object. Each call to this API must return a pointer to a different (unique) xtsc_parms
object. The parameter names, types, and initial values contained in the xtsc_parms object
are up to the implementation but should correspond to the plugin type specified by plugin_-
name. The xtsc-run progam will allow the user to change the parameter values as desired
prior to passing the xtsc_parms object back in the create_module() method when the user
requests that an instance of the plugin be created.
Parameters:
plugin_name The plugin name for which an xtsc_parms object should be returned.
This name is guarranteed to be from the set returned by the get_plugin_names()
method.
The implementation of this API must return a reference to a valid, newly-constructed sc_-
module of the type specified by plugin_name. Each call to this API must return a reference
to a different (unique) newly-constructed sc_module object.
Parameters:
plugin_name The plugin name for which an sc_module object should be returned.
This name is guarranteed to be from the set returned by the get_plugin_names()
method.
instance_name The SystemC base instance name to be given to the sc_module.
This name should be passed to the sc_module constructor as an sc_module_-
name.
p_parms A pointer to an xtsc_parms object previously obtained by a call to the
create_parms() method. The parameter values will have been modified as de-
sired by the user.
The implementation of this API must return a pointer to the xtsc_connection_interface as-
sociated with the plugin module instance identified by hierarchical_name.
Parameters:
hierarchical_name The full hierarchical name of a sc_module instance previously
created by a call to create_module().
Note: Under certain circumstances the hierarchical name can differ from the instance_-
name passed in to the create_module method. The implementation can call the sc_-
module::name() method from within the create_module() method to determine the hier-
archical name after creating the sc_module.
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_queue
xtsc_queue_push_if
m_queue
xtsc_queue_push_if_multi_impl
m_push_multi_impl
xtsc_connection_interface
m_push_impl xtsc_queue_push_if_impl
xtsc_module
xtsc_resettable m_queue
xtsc_command_handler_interface xtsc_queue
m_pop_file m_queue
xtsc_script_file
m_pop_multi_impl
xtsc_queue_pop_if_multi_impl
m_pop_impl
m_queue
xtsc_queue_pop_if xtsc_queue_pop_if_impl
Classes
• class xtsc_queue_pop_if_impl
Implementation of xtsc_queue_pop_if for single consumer.
• class xtsc_queue_pop_if_multi_impl
• class xtsc_queue_push_if_impl
Implementation of xtsc_queue_push_if for single producer.
• class xtsc_queue_push_if_multi_impl
Implementation of xtsc_queue_push_if for multi-client queue (either m_num_producers or
m_num_consumers > 1).
• SC_HAS_PROCESS (xtsc_queue)
• xtsc_queue (sc_core::sc_module_name module_name, const xtsc_queue_parms
&queue_parms)
Constructor for an xtsc_queue.
• ∼xtsc_queue ()
Destructor.
• xtsc::u32 get_num_producers ()
Get the number of producers allowed to bind to this module instance.
• xtsc::u32 get_num_consumers ()
Get the number of consumers allowed to bind to this module instance.
• void drain_fifo_method ()
To drain the fifo’s after a reset.
• xtsc::u32 num_available ()
Return the number of available data items in the queue (how many more elements can be
popped out).
• xtsc::u32 num_free ()
Return the number of free spaces in the queue (how many more elements can be pushed
in).
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• xtsc::u32 get_bit_width ()
Get the width of this xtsc_queue in bits.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_queue_push_if > m_producer
Single producer binds to this.
• void delta_cycle_method ()
Handle bookkeeping to support multi-client queue.
• void get_next_pop_file_element ()
Private Attributes
• xtsc_queue_push_if_impl ∗ m_push_impl
m_producer binds to this if m_multi_client is false
• xtsc_queue_pop_if_impl ∗ m_pop_impl
m_consumer binds to this if m_multi_client is false
• xtsc_queue_push_if_multi_impl ∗∗ m_push_multi_impl
m_producers bind to these if m_multi_client is true
• xtsc_queue_pop_if_multi_impl ∗∗ m_pop_multi_impl
m_consumers bind to these if m_multi_client is true
• xtsc::u32 m_num_producers
From "num_producers" parameter.
• xtsc::u32 m_num_consumers
From "num_consumers" parameter.
• bool m_multi_client
true if either m_num_producers or m_num_consumers exceeds 1
• xtsc::u32 m_depth
Capacity - number of elements.
• bool m_use_fifo
True if using sc_fifo, false if using a file of host shared memory.
• sc_dt::sc_unsigned ∗∗ m_element_ptrs
To store the elements.
• xtsc::u64 ∗ m_tickets
To store the ticket associated with each element.
• xtsc::u32 m_skid_index
Move from skid buffer to m_fifo in fair, round-robin fashion.
• sc_dt::sc_unsigned ∗∗ m_skid_buffers
Skid buffers to store the elements.
• xtsc::u64 ∗ m_skid_tickets
To store the queue tickets associated with the skid buffers.
• xtsc::u32 m_jerk_index
Move from m_fifo to jerk buffer in fair, round-robin fashion.
• sc_dt::sc_unsigned ∗∗ m_jerk_buffers
Jerk buffers to store the elements.
• xtsc::u64 ∗ m_jerk_tickets
To store the queue tickets associated with the jerk buffers.
• xtsc::u64 m_pop_ticket
Save ticket of last popped value.
• xtsc::u64 m_push_ticket
Save ticket of last pushed value.
• sc_dt::sc_unsigned m_dummy
For logging failed pushes and pops.
• xtsc::u32 m_width1
Bit width of each element.
• xtsc::u32 m_width8
Byte width of each element.
• sc_dt::sc_unsigned m_value
For temporary use within a method.
• xtsc::u32 m_next
Next slot in m_element_ptrs[] and m_tickets[].
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
• std::string m_push_file_name
Name of file to write elements to instead of using the fifo.
• std::string m_pop_file_name
Name of file to read elements from instead of using the fifo.
• std::ofstream ∗ m_push_file
File to write elements to instead of using the fifo.
• bool m_timestamp
From "timestamp" parameter.
• xtsc::xtsc_script_file ∗ m_pop_file
File to read elements from instead of using the fifo.
• bool m_wraparound
False if m_pop_file should only be read through one time.
• bool m_has_pop_file_element
For use by nb_can_pop() and num_available() when using m_pop_file.
• sc_dt::sc_unsigned m_pop_file_element
For use by nb_pop() when using m_pop_file.
• std::string m_line
The current line from m_pop_file.
• sc_core::sc_event m_drain_fifo_event
To drain the fifos after a reset.
• sc_core::sc_event m_push_pop_event
multi-client: notify delta_cycle_method(); else each peek/poke
• sc_core::sc_event m_nonempty_event
The no-longer-empty event.
• sc_core::sc_event m_nonfull_event
The no-longer-full event.
• sc_core::sc_event ∗∗ m_nonempty_events
The no-longer-empty events when m_multi_client is true.
• sc_core::sc_event ∗∗ m_nonfull_events
The no-longer-full events when m_multi_client is true.
• xtsc::u32 m_next_word_index
Index into m_words.
• xtsc::u32 m_pop_file_line_number
The line number of m_words in m_pop_file.
• bool m_host_shared_memory
See "host_shared_memory" parameter.
• std::string m_shmem_name
Shared Memory: name.
• xtsc::u8 ∗ m_p_shmem
Shared Memory: pointer to host OS shared memory.
• xtsc::u32 m_shmem_bytes_per_row
Shared Memory: number of bytes per row ((64+m_width1+63)/64)∗8.
• xtsc::u32 m_shmem_num_rows
Shared Memory: number of rows (m_depth + 1).
• xtsc::u32 m_shmem_array_size
Shared Memory: number of bytes in all rows.
• xtsc::u32 m_shmem_total_size
Shared Memory: number of bytes in all rows plus read/write indices.
• xtsc::u32 ∗ m_p_shmem_ridx
Shared Memory: pointer to ridx (ridx = Read row InDeX).
• xtsc::u32 ∗ m_p_shmem_widx
Shared Memory: pointer to widx (widx = Write row InDeX).
A queue implementation that connects using TLM-level ports. This queue implements
xtsc::xtsc_queue_push_if and is suitable for connecting to a TIE output queue interface.
It also implements xtsc::xtsc_queue_pop_if and is suitable for connecting to a TIE input
queue interface.
Typically, the queue is connected on the push side to a queue producer such as a TIE
output queue interface of xtsc::xtsc_core and on the pop side to a queue consumer such
as a TIE input queue interface of xtsc::xtsc_core. Alternatively, it can be left unconnected
on the pop side and then all elements pushed into it will be written to a file. It is also
possible to leave it unconnected on the push side and then any element popped from the
queue will be read from a file.
This queue can operate as a multi-client queue by setting the "num_producers" parameter
to a value larger then one and/or setting the "num_consumers" parameter to a value larger
then one. When "num_producers" is larger then one then an additional skid buffer is added
to the queue for each producer (when "num_producers" is left at its default value of 1
then no additional skid buffer is used). If all the producer skid buffers are empty then all
producers can push an element into the queue in the same cycle. Similarly, when "num_-
consumers" is larger then one then an additional jerk buffer is added to the queue for each
consumer (again, this does not happen when "num_consumers" is 1). If all the consumer
jerk buffers are full then all consumers can pop an element from the queue in the same
cycle.
The following diagram shows the situation when "num_producers" is 2, "num_consumers"
is 3, and "depth" is 4. In this case the queue can potentially hold 9 (=2+3+4) elements.
In the diagram, a percent sign represents a producer or consumer port, ’X’ represents a
producer skid buffer, ’Y’ represents a buffer in the main fifo, and ’Z’ represents a consumer
jerk buffer.
hexdump -C /dev/shm/username.Q1
The layout and access protocol of the shared memory data structure are:
-----------------------------------------------
Row 0: | Ticket 0 | Data 0 | Filler 0 |
-----------------------------------------------
Row 1: | Ticket 1 | Data 1 | Filler 1 |
-----------------------------------------------
Row 2: | Ticket 2 | Data 2 | Filler 2 |
-----------------------------------------------
... | ... | ... | ... |
-----------------------------------------------
Row N: | Ticket N | Data N | Filler N |
-----------------------------------------------
Indices: | ridx | widx |
---------------
- Memory byte addresses increase left to right then top to bottom in the diagram.
- All values are stored LSB first (left most byte in each field shown above).
- In the following points, R represents any row index between 0 and N, inclusive.
- N is equal to the "depth" parameter, so the number of "Row R" rows is "depth" + 1.
- There is always at least one "unoccupied" row, even when the queue is full.
- The size of the "ridx" field is 4 bytes (u32).
- The size of the "widx" field is 4 bytes (u32).
- The size of the "Ticket R" field is 8 bytes (u64).
- The size of the "Data R" field is ("bit_width" + 7) / 8
- The size of the "Filler R" field is the smallest value (between 0 and 7) which
Here is a block diagram of the system used in the xtsc_queue example (memories not
shown):
(Q1.m_producer) (Q1.m_consumer)
nb_can_push() nb_can_pop()
xtsc_core core0
nb_push() nb_pop() xtsc_core core1
xtsc_queue Q1
(producer.out) (consumer.out)
core0.get_output_queue("OUTQ1") core1.get_input_queue("INQ1")
Here is the code to connect the system using the xtsc::xtsc_connect() method:
And here is the code to connect the system using manual SystemC port binding:
core0.get_request_port("pif")(*core0_pif.m_request_exports[0]);
(*core0_pif.m_respond_ports[0])(core0.get_respond_export("pif"));
core1.get_request_port("pif")(*core1_pif.m_request_exports[0]);
(*core1_pif.m_respond_ports[0])(core1.get_respond_export("pif"));
core0.get_output_queue("OUTQ1")(Q1.m_producer);
core1.get_input_queue("INQ1")(Q1.m_consumer);
See also:
xtsc_queue_parms
xtsc::xtsc_queue_pop_if
xtsc::xtsc_queue_push_if
xtsc::xtsc_core::How_to_do_port_binding
Parameters:
module_name Name of the xtsc_queue sc_module.
queue_parms The remaining parameters for construction.
See also:
xtsc_queue_parms
Return the number of available data items in the queue (how many more elements can
be popped out). If "pop_file" was specified then this method returns 0 or 1 depending on
whether or not the end of file has been reached.
Return the number of free spaces in the queue (how many more elements can be pushed
in). If "push_file" was specified then this method always returns 1.
Return the value of the nth element from the front of the queue. An exception is thrown if
the queue does not currently have n elements or if "push_file" or "pop_file" was specified.
Parameters:
nth Specifies which element is desired (starting at 1).
value Used to return the value of the nth element.
Overwrite the nth element from the front of the queue using the specified value. An excep-
tion is thrown if the queue does not currently have n elements or if "push_file" or "pop_file"
was specified.
Parameters:
nth Specifies which element is desired (starting at 1).
value The value to overwrite the nth element with.
7.103.3.5 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
can_pop [<PopPort>]
Return nb_can_pop() for the specified <PopPort> (default 0).
can_push [<PushPort>]
Return nb_can_push() for the specified <PushPort> (default 0).
dump
Return the os buffer from calling xtsc_queue::dump(os).
get_bit_width
Return xtsc_queue::get_bit_width().
get_num_consumers
Return xtsc_queue::get_num_consumers().
get_num_producers
Return xtsc_queue::get_num_producers().
get_pop_ticket
Return the ticket of most recent previous element popped.
get_push_ticket
Return the ticket of most recent previous element pushed.
num_available
Return xtsc_queue::num_available().
num_free
Return xtsc_queue::num_free().
peek <nth>
Return value from calling xtsc_queue::peek(<nth>, value).
pop [<PopPort>]
Return the value popped by calling nb_pop() for the specified <PopPort>
(default 0). Throws if cannot pop.
reset
Call xtsc_queue::reset().
Notes:
Implements xtsc_command_handler_interface.
Connect to an xtsc_core. This method connects this xtsc_queue to the named input or
output queue interface of an xtsc_core.
Parameters:
core The xtsc_core to connect to.
queue_name Queue interface name as it appears in the user’s TIE code after the
queue keyword. This name must NOT begin with the "TIE_" prefix.
port_num If queue_name is an output queue interface of core then this specifies the
producer port number of this xtsc_queue. If queue_name is an input queue inter-
face of core then this specifies the consumer port number of this xtsc_queue.
Parameters:
producer The xtsc_queue_producer to connect to.
port_num The producer port number of this xtsc_queue to connect to.
Parameters:
consumer The xtsc_queue_consumer to connect to.
port_num The consumer port number of this xtsc_queue to connect to.
The documentation for this class was generated from the following file:
• xtsc_queue.h
xtsc_connection_interface xtsc_resettable
xtsc_queue_consumer
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
xtsc_queue_pop_if xtsc_queue_consumer
m_test_vector_stream
xtsc_script_file m_pop_floating
m_empty_floating
m_data_floating
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating
• ∼xtsc_queue_consumer (void)
Destructor.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• sc_core::sc_out< sc_dt::sc_bv_base > m_pop
pin-level pop request to queue
• void end_of_elaboration ()
Method to check interface width.
• bool nb_can_pop ()
This method is used to determine if the queue has at least one element in it.
• xtsc::u32 nb_get_bit_width ()
Get the element width in bits that the queue implementation will pop.
Protected Attributes
• log4xtensa::TextLogger & m_text
For logging.
• bool m_wraparound
From "wraparound" parameter.
• xtsc::xtsc_script_file m_test_vector_stream
Script file from "script_file" parameter.
• std::string m_script_file
Script file name from "script_file" parameter.
• std::string m_line
Current line from "script_file".
• xtsc::u32 m_line_count
Current line number from "script_file".
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
From "clock_period" parameter.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_sample_phase
From "sample_phase" parameter.
• sc_core::sc_time m_deassert_delay
From "deassert_delay" parameter.
• bool m_no_timeout
True if <timeout> was not specified in "script_file" for this pop.
• xtsc::u32 m_width1
Bit width of each element.
• bool m_pin_level
From "pin_level" parameter.
• sc_core::sc_trace_file ∗ m_p_trace_file
From "vcd_handle" parameter.
• xtsc::u64 m_pop_count
Number of items popped.
• xtsc::u64 m_ticket
Ticket of last value popped ("pin_level" false).
• sc_dt::sc_unsigned m_value
Popped value ("pin_level" false).
• sc_dt::sc_bv_base m_value_bv
Popped value ("pin_level" true).
• sc_dt::sc_bv_base m_zero_bv
Constant 0.
• sc_dt::sc_bv_base m_one_bv
Constant 1.
• sc_core::sc_event m_next_request
To notify script_thread to advance ("pin_level" true).
• sc_core::sc_event m_assert
To notify request_thread to assert the request.
• sc_core::sc_event m_deassert
To notify request_thread to deassert the request.
• xtsc::xtsc_signal_sc_bv_base_floating m_pop_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_data_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_empty_floating
A scripted consumer to drain a queue. This XTSC module implements a queue consumer
that reads an input file ("script_file") to determine when to attempt to read values from (i.e.
pop) a queue module.
This module provides a simple means to test reading a queue at the TLM-level (such as
xtsc_queue) or at the pin-level (such as xtsc_queue_pin). To use pin-level connections,
you must set the "pin_level" parameter to true.
Here is a block diagram of an xtsc_queue_consumer as it is used in the queue consumer
example:
queue.m_producer queue.m_consumer
nb_push() nb_pop()
xtsc_queue_producer xtsc_queue_consumer
producer xtsc_queue queue
consumer
producer.vec consumer.vec
producer.m_queue consumer.m_queue
See also:
xtsc_queue_consumer_parms
xtsc::xtsc_queue_pop_if
Parameters:
module_name Name of the xtsc_queue_consumer sc_module.
consumer_parms The remaining parameters for construction.
See also:
xtsc_queue_consumer_parms
can_pop
Return !empty ("pin_level" true) or nb_can_pop() ("pin_level" false).
get_pop_count
Return number of items popped since simulation began.
get_pop_data
Return most recent popped data.
get_pop_ticket
Return ticket of most recent popped data.
TLM only ("pin_level" false).
pop
Calls nb_pop(value, ticket) and returns value if successful, else throws exception.
TLM only ("pin_level" false).
reset [<Hard>]
Call reset(<Hard>). Where <Hard> is 0|1 (default 0).
Implements xtsc_command_handler_interface.
Connect to a upstream xtsc_tx_loader. This method connects the m_queue sc_port of this
xtsc_queue_consumer to the m_consumer sc_export of an xtsc_tx_loader.
Parameters:
loader The xtsc_tx_loader to connect to.
This method is used to determine if the queue has at least one element in it.
Returns:
true if the queue has at least one element in it, returns false if the queue is empty.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_queue_pop_if.
Definition at line 397 of file xtsc_queue_consumer.h.
Parameters:
element The sc_unsigned object in which to return the element popped from the
queue.
ticket An optional reference to a u64 object in which to return a ticket number asso-
ciated with this queue element. If a component which implements this interface
choses to support the ticket concept, it should create and return a unique ticket
number for each element pushed into the component (see xtsc_create_queue_-
ticket()). The unique ticket number should be maintained with the element and
be returned here when the element is popped from the component. It is rec-
ommended that a component that implements both the xtsc_queue_push_if and
xtsc_queue_pop_if interfaces support this ticket concept. For some devices (e.g.
ones that implement just one of the two interfaces), the ticket concept may not be
meaningful and they should just return a constant ticket value (e.g. 0). Typically,
queue clients (such as xtsc_core) use this ticket for non-hardware purposes such
as logging, profiling, and debugging. Clients are free to ignore the ticket.
Returns:
false if no element can be removed because the queue is empty, otherwise returns
true.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_queue_pop_if.
Definition at line 398 of file xtsc_queue_consumer.h.
Get the element width in bits that the queue implementation will pop. This method allows
the queue consumer to confirm that the implementation will pop elements of the expected
bit width.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_queue_pop_if.
Definition at line 399 of file xtsc_queue_consumer.h.
The documentation for this class was generated from the following file:
• xtsc_queue_consumer.h
xtsc_parms
xtsc_queue_consumer_parms
xtsc_parms
xtsc_queue_consumer_parms
Constructor parameters for a xtsc_queue_consumer object. This class contains the con-
structor parameters for a xtsc_queue_consumer object.
"script_file" char* The file to read the test vector commands from. Each
command occupies one line in the file. Valid command
formats are shown below (the first format shows a queue
pop transaction command):
<delay> [<timeout>]
<delay> STOP
WAIT <duration>
SYNC <time>
TEST_EMPTY
NOTE message
INFO message
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"sample_phase" u32 This specifies the phase (i.e. the point) in each clock
period at which the empty signal is sampled. It is
expressed in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less
"deassert_delay" u32 During a pop attempt, this specifies how long after the
empty signal is sampled and found to be false, that the
pop signal should be deasserted. It is expressed in
terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less than
the clock period as specified by the "clock_period"
parameter. A value of 0 means the pop signal will be
deasserted 1 delta cycle after the empty signal is
sampled and found to be false. This parameter is for
pin-level connection only.
Default = 0.
See also:
xtsc_queue_consumer
xtsc::xtsc_parms
xtsc::xtsc_script_file
Parameters:
script_file The file name to read the xtsc_request test vectors from.
width1 Width of each queue element in bits.
• xtsc_queue_consumer.h
xtsc_parms
xtsc_queue_parms
xtsc_parms
xtsc_queue_parms
• void init (xtsc::u32 width1=32, xtsc::u32 depth=16, const char ∗push_file=0, const
char ∗pop_file=0, bool wraparound=false)
Do initialization common to both constructors.
Constructor parameters for an xtsc_queue object. This class contains the constructor pa-
rameters for an xtsc_queue object.
"num_consumers" u32 Number of consumers which can read from the queue. If
"num_consumers" is greater than 1 then a dedicated skid
buffer will be added to the queue for each consumer.
Default = 1.
"wraparound" bool Specifies what should happen when the end of file
(EOF) is reached on "pop_file". When EOF is reached
and "wraparound" is true, "pop_file" will be reset
to the beginning of file and nb_pop will return
the first element from the file. When EOF is
reached and "wraparound" is false, nb_can_pop and
nb_pop will return false.
Default = false.
"host_shared_memory" bool If true the storage for the queue tickets, data, and
read and write indices will be created at module
construction time as host OS shared memory using
shm_open() on Linux and CreateFileMapping() on
MS Windows. If this parameter is set true, then
neither "pop_file" nor "push_file" may be used and
neither "num_consumers" nor "num_producers" may
exceed 1.
Default = false.
To use host OS shared memory for the queue, set "host_shared_memory" to true,
do not set "pop_file" or "push_file", set "num_consumers" and "num_producers"
to either 0 or 1, and ensure at most one process on the workstation writes to
the queue and at most one process reads from the queue.
See also:
xtsc_queue
xtsc::xtsc_parms
Parameters:
width1 Width of each queue element in bits.
depth Number of elements the queue can hold.
push_file Name of file to write nb_push elements to instead of adding them to the
queue fifo.
pop_file Name of file to read nb_pop elements from instead of getting them from the
queue fifo.
wraparound Indicates if pop_file should wraparound to the beginning of the file after
the end of file is reached.
Constructor for an xtsc_queue_parms object based upon an xtsc_core object and a named
TIE input or output queue. This constructor will determine width1 by querying the core
object and then pass it to the init() method. If desired, after the xtsc_queue_parms ob-
ject is constructed, its data members can be changed using the appropriate xtsc::xtsc_-
parms::set() method before passing it to the xtsc_queue constructor.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_queue_parms.
queue_name The name of the TIE queue as it appears in the user’s TIE code after
the queue keyword.
depth Number of elements the queue can hold.
push_file Name of file to write nb_push elements to instead of adding them to the
queue fifo.
pop_file Name of file to read nb_pop elements from instead of getting them from the
queue fifo.
wraparound Indicates if pop_file should wraparound to the beginning of the file after
the end of file is reached.
The documentation for this class was generated from the following file:
• xtsc_queue.h
xtsc_connection_interface xtsc_resettable
xtsc_module
xtsc_queue_pin
m_data_out_floating
m_pop_floating
m_empty_floating
m_pop_file
m_full_floating
m_data_in_floating
m_push_floating
xtsc_queue_pin
• ∼xtsc_queue_pin ()
Destructor.
Public Attributes
• xtsc::u32 m_width1
Bit width of each element.
• xtsc::xtsc_signal_sc_bv_base_floating m_push_floating
To cap unused push interface.
• xtsc::xtsc_signal_sc_bv_base_floating m_data_in_floating
To cap unused push interface.
• xtsc::xtsc_signal_sc_bv_base_floating m_full_floating
To cap unused push interface.
• xtsc::xtsc_signal_sc_bv_base_floating m_pop_floating
To cap unused pop interface.
• xtsc::xtsc_signal_sc_bv_base_floating m_empty_floating
To cap unused pop interface.
• xtsc::xtsc_signal_sc_bv_base_floating m_data_out_floating
To cap unused pop interface.
• void before_end_of_elaboration ()
Cap unused interfaces and do checks.
• void get_next_pop_file_element ()
• void worker_thread ()
For regular queue using a fifo.
• void file_worker_thread ()
For push to file and/or pop from file.
Protected Attributes
• sc_core::sc_time m_time_resolution
SystemC time resolution.
• sc_core::sc_time m_clock_period
From "clock_period" parameter.
• xtsc::u64 m_clock_period_value
m_clock_period as u64
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_sample_phase
From "sample_phase" parameter.
• xtsc::u64 m_sample_phase_value
m_sample_phase as u64
• sc_dt::sc_bv_base m_zero
Constant 0.
• sc_dt::sc_bv_base m_one
Constant 1.
• int m_rp
Read pointer in m_elements_ptrs fifo.
• int m_wp
Write pointer in m_elements_ptrs fifo.
• sc_dt::sc_bv_base ∗∗ m_element_ptrs
Fifo to store the elements.
• xtsc::u64 ∗ m_tickets
Fifo to store the ticket associated with each element.
• xtsc::u32 m_depth
From "depth" parameter. Capacity - number of elements.
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
• sc_core::sc_trace_file ∗ m_p_trace_file
• bool m_use_fifo
False if pushing to a file and/or popping from a file.
• bool m_use_push_file
True if "push_file" is set.
• bool m_use_pop_file
True if "pop_file" is set.
• std::string m_push_file_name
Name of file to write elements to instead of using the fifo.
• std::string m_pop_file_name
Name of file to read elements from instead of using the fifo.
• std::ofstream ∗ m_push_file
File to write elements to instead of using the fifo.
• bool m_timestamp
From "timestamp" parameter.
• xtsc::xtsc_script_file ∗ m_pop_file
File to read elements from instead of using the fifo.
• bool m_wraparound
False if m_pop_file should only be read through one time.
• bool m_has_pop_file_element
For use by nb_can_pop() when using m_pop_file.
• sc_dt::sc_bv_base m_pop_file_element
For use by nb_pop() when using m_pop_file.
• std::string m_line
The current line from m_pop_file.
• xtsc::u32 m_next_word_index
Index into m_words.
• xtsc::u32 m_pop_file_line_number
The line number of m_words in m_pop_file.
A TIE queue implementation using the pin-level interface. Example XTSC queue imple-
mentation that connects at the pin-level.
Here is a block diagram of an xtsc_queue_pin as it is used in the xtsc_queue_pin example:
core1_TIE_INQ1_PopReq_m_pop_Q1
TIE_OUTQ1_PushReq m_push m_pop TIE_INQ1_PopReq
96 96
Q1_m_data_out_TIE_INQ1_core1
TIE_OUTQ1 / m_data_in m_data_out / TIE_INQ1
Q1_m_empty_TIE_INQ1_Empty_core1
TIE_OUTQ1_Full m_full m_empty TIE_INQ1_Empty
See also:
xtsc_queue_pin_parms
Parameters:
module_name Name of the xtsc_queue_pin sc_module.
queue_parms The remaining parameters for construction.
See also:
xtsc_queue_pin_parms
The documentation for this class was generated from the following file:
• xtsc_queue_pin.h
xtsc_parms
xtsc_queue_pin_parms
xtsc_parms
xtsc_queue_pin_parms
Constructor parameters for a xtsc_queue_pin object. This class contains the constructor
parameters for a xtsc_queue_pin object.
"wraparound" bool Specifies what should happen when the end of file
(EOF) is reached on "pop_file". When EOF is reached
and "wraparound" is true, "pop_file" will be reset
to the beginning of file and pops will return
the first element from the file. When EOF is
reached and "wraparound" is false, pops will fail.
Default = false.
See also:
xtsc_queue_pin
xtsc::xtsc_parms
xtsc::xtsc_initialize_parms
Parameters:
width1 Width of each queue element in bits. Default = 32.
depth Number of elements the queue can hold. Default = 16.
push_file Name of file to write nb_push elements to instead of adding them to the
queue fifo.
pop_file Name of file to read nb_pop elements from instead of getting them from the
queue fifo.
wraparound Indicates if pop_file should wraparound to the beginning of the file after
the end of file is reached.
p_trace_file Pointer to SystemC VCD object or 0 if tracing is not desired. Default = 0.
• xtsc_queue_pin.h
xtsc_queue_pop_if
This interface is for connecting between a consumer and a queue. This interface along
with the xtsc_queue_push_if is used for one way communication between a producer and
a consumer through a queue.
A producer has an sc_port<xtsc_queue_push_if>, a consumer has an sc_port<xtsc_-
queue_pop_if>, and a queue typically has an sc_export<xtsc_queue_push_if> and an
sc_export<xtsc_queue_pop_if>.
See also:
xtsc_queue_push_if
xtsc_create_queue_ticket
xtsc_component::xtsc_queue
xtsc_core::How_to_do_port_binding
This method is used to determine if the queue has at least one element in it.
Returns:
true if the queue has at least one element in it, returns false if the queue is empty.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_queue_pop_if_impl, xtsc_queue_pop_if_multi_impl, xtsc_queue_-
consumer, and xtsc_queue_pop_if_impl.
7.109.2.2 virtual bool nb_pop (sc_dt::sc_unsigned & element, u64 & ticket =
pop_ticket) [pure virtual]
Parameters:
element The sc_unsigned object in which to return the element popped from the
queue.
ticket An optional reference to a u64 object in which to return a ticket number asso-
ciated with this queue element. If a component which implements this interface
choses to support the ticket concept, it should create and return a unique ticket
number for each element pushed into the component (see xtsc_create_queue_-
ticket()). The unique ticket number should be maintained with the element and
be returned here when the element is popped from the component. It is rec-
ommended that a component that implements both the xtsc_queue_push_if and
xtsc_queue_pop_if interfaces support this ticket concept. For some devices (e.g.
ones that implement just one of the two interfaces), the ticket concept may not be
meaningful and they should just return a constant ticket value (e.g. 0). Typically,
queue clients (such as xtsc_core) use this ticket for non-hardware purposes such
as logging, profiling, and debugging. Clients are free to ignore the ticket.
Returns:
false if no element can be removed because the queue is empty, otherwise returns
true.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_queue_pop_if_impl, xtsc_queue_pop_if_multi_impl, xtsc_queue_-
consumer, and xtsc_queue_pop_if_impl.
Get the element width in bits that the queue implementation will pop. This method allows
the queue consumer to confirm that the implementation will pop elements of the expected
bit width.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_queue_pop_if_impl, xtsc_queue_pop_if_multi_impl, xtsc_queue_-
consumer, and xtsc_queue_pop_if_impl.
Return the no-longer-empty event. Clients can call this method to get a reference to an
event that will be notified whenever the queue transitions from empty to not empty.
Sub-classes must override this method and return their no-longer-empty event.
Reimplemented in xtsc_queue_pop_if_impl, xtsc_queue_pop_if_multi_impl, and xtsc_-
queue_pop_if_impl.
Definition at line 118 of file xtsc_queue_pop_if.h.
The documentation for this class was generated from the following file:
• xtsc_queue_pop_if.h
Implementation of xtsc_queue_pop_if.
#include <xtsc/xtsc_tx_loader.h>Inheritance diagram for xtsc_queue_pop_if_impl:
xtsc_queue_pop_if
xtsc_queue_pop_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
m_incoming_tx_xfer
xtsc_tx_xfer m_outgoing_tx_xfer
xtsc_queue_push_if
m_data_out_floating
m_pop_floating m_loader xtsc_queue_push_if_impl
m_empty_floating
m_full_floating
m_queue_push_impl
m_data_in_floating
m_push_floating
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating xtsc_tx_loader
m_loader m_tx_xfer_impl
m_queue_pop_impl m_loader
xtsc_queue_pop_if xtsc_queue_pop_if_impl xtsc_tx_xfer_if_impl
xtsc_tx_xfer_if
• bool nb_can_pop ()
• bool nb_pop (sc_dt::sc_unsigned &element, u64 &ticket=pop_ticket)
• u32 nb_get_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the queue transitions from empty to not empty.
Private Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_queue_pop_if.
Definition at line 429 of file xtsc_tx_loader.h.
See also:
xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
7.110.2.2 bool nb_pop (sc_dt::sc_unsigned & element, u64 & ticket = pop_ticket)
[virtual]
See also:
xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
See also:
xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
Definition at line 446 of file xtsc_tx_loader.h.
The documentation for this class was generated from the following file:
• xtsc_tx_loader.h
xtsc_queue_pop_if
xtsc_queue_pop_if_impl
m_queue
xtsc_queue_pop_if_multi_impl
xtsc_command_handler_interface
m_pop_multi_impl
xtsc_queue_pop_if
xtsc_script_file
m_pop_file
xtsc_module
xtsc_resettable
m_push_impl
xtsc_queue_push_if xtsc_queue_push_if_impl
• bool nb_can_pop ()
• bool nb_pop (sc_dt::sc_unsigned &element, xtsc::u64 &ticket=pop_ticket)
• xtsc::u32 nb_get_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the queue transitions from empty to not empty.
Private Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
See also:
xtsc::xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
See also:
xtsc::xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
Definition at line 705 of file xtsc_queue.h.
The documentation for this class was generated from the following file:
• xtsc_queue.h
xtsc_queue_pop_if
xtsc_queue_pop_if_multi_impl
m_queue
xtsc_queue_pop_if_impl
xtsc_command_handler_interface
m_pop_impl
xtsc_queue_pop_if
xtsc_script_file m_pop_file
xtsc_module
xtsc_resettable
m_push_impl
xtsc_queue_push_if xtsc_queue_push_if_impl
• bool nb_can_pop ()
• bool nb_pop (sc_dt::sc_unsigned &element, xtsc::u64 &ticket=pop_ticket)
• xtsc::u32 nb_get_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the queue transitions from empty to not empty.
Private Attributes
• xtsc::u32 m_port_num
Our consumer port number.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
See also:
xtsc::xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
See also:
xtsc::xtsc_queue_pop_if
Implements xtsc_queue_pop_if.
Definition at line 783 of file xtsc_queue.h.
The documentation for this class was generated from the following file:
• xtsc_queue.h
xtsc_connection_interface xtsc_resettable
xtsc_queue_producer
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_wire_write_if
xtsc_command_handler_interface
m_producer xtsc_wire_write_if_impl
xtsc_script_file m_full_floating
m_data_floating
m_push_floating
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating
Classes
• class xtsc_wire_write_if_impl
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• sc_core::sc_out< sc_dt::sc_bv_base > m_push
pin-level push request to queue
Protected Types
• typedef sc_core::sc_export< xtsc::xtsc_wire_write_if > wire_write_export
• void end_of_elaboration ()
Method to check interface width.
• bool nb_can_push ()
This method is used to determine if the queue can accept another element.
• xtsc::u32 nb_get_bit_width ()
Get the element width in bits that the queue implementation will hold.
Protected Attributes
• bool m_control_bound
Something is connected to the control input.
• wire_write_export ∗ m_p_control
Optional control input.
• xtsc_wire_write_if_impl ∗ m_p_write_impl
Implementaion for optional control input.
• sc_dt::sc_unsigned m_control_value
Current value of the control input.
• xtsc::u32 m_control_write_count
Number of times control input is written.
• xtsc::u32 m_control_change_count
Number of times control input is written with a new value.
• xtsc::xtsc_script_file m_test_vector_stream
Script file from "script_file" parameter.
• std::string m_script_file
Script file name from "script_file" parameter.
• std::string m_line
Current line from "script_file".
• xtsc::u32 m_line_count
Current line number from "script_file".
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
From "clock_period" parameter.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_request_phase
From "request_phase" parameter.
• sc_core::sc_time m_sample_phase
From "sample_phase" parameter.
• sc_core::sc_time m_previous_push
Time of most recent previous push.
• sc_core::sc_time m_deassert_delay
From "deassert_delay" parameter.
• bool m_no_timeout
True if <timeout> was not specified in "script_file" for this push.
• xtsc::u64 m_ticket
Save value of last ticket pushed.
• xtsc::u32 m_width1
Bit width of each element.
• bool m_pin_level
From "pin_level" parameter.
• sc_core::sc_trace_file ∗ m_p_trace_file
From "vcd_handle" parameter.
• sc_dt::sc_unsigned m_value
Value from "script_file" when not operating "pin_level".
• sc_dt::sc_bv_base m_value_bv
Value from "script_file" when operating "pin_level".
• sc_dt::sc_bv_base m_zero_bv
Constant 0.
• sc_dt::sc_bv_base m_one_bv
Constant 1.
• sc_core::sc_event m_control_write_event
Notified when control input is written.
• sc_core::sc_event m_next_request
To notify script_thread to advance when operating "pin_level".
• sc_core::sc_event m_assert
To notify request_thread to assert the request.
• sc_core::sc_event m_deassert
To notify request_thread to deassert the request.
• xtsc::u64 m_assert_delta_cycle
Handle thread scheduling indeterminacy at time 0.
• xtsc::xtsc_signal_sc_bv_base_floating m_push_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_data_floating
• xtsc::xtsc_signal_sc_bv_base_floating m_full_floating
A scripted producer to supply a queue. This XTSC module implements a queue producer
that reads an input file ("script_file") to determine when and what data values to send to a
queue module.
This module provides a simple means to deliver test transactions to a queue at the TLM-
level (such as xtsc_queue) or at the pin-level (such as xtsc_queue_pin). To use pin-level
queue connections, you must set the "pin_level" parameter to true.
To provide a degree of feedback or control of the script, the "control" option can be set
to true and a wire writer such as xtsc::xtsc_core, xtsc_mmio, or xtsc_wire_logic can be
connected to the control input. This allows the xtsc_queue_producer device to better
model certain SoC components. To perform port binding of the control input, use the
get_control_input() method to obtain a reference to the sc_export<xtsc_wire_write_if> or
use the xtsc::xtsc_connect() method.
Here is a block diagram of an xtsc_queue_producer as it is used in the queue consumer
example:
queue.m_producer queue.m_consumer
nb_push() nb_pop()
xtsc_queue_producer xtsc_core core0
xtsc_queue queue
producer (consumer.out)
producer.vec
producer.m_queue core0.get_input_queue("INQ2")
See also:
xtsc_queue_producer_parms
xtsc::xtsc_queue_push_if
xtsc::xtsc_connect()
xtsc::xtsc_core::How_to_do_port_binding
Parameters:
module_name Name of the xtsc_queue_producer sc_module.
producer_parms The remaining parameters for construction.
See also:
xtsc_queue_producer_parms
Return the sc_export of the optional control input. This method may be used for port binding
of the optional control input.
For example, to bind the TIE export state named "onebit" of an xtsc_core named core0 to
the control input of an xtsc_queue_producer named producer:
core0.get_export_state("onebit")(producer.get_control_input());
7.113.3.2 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
can_push
Return !full ("pin_level" true) or nb_can_push() ("pin_level" false).
get_push_ticket
Return the ticket of most recent previous element pushed.
TLM only ("pin_level" false).
push <Value>
Return nb_push(<Value>).
reset
Call xtsc_queue_producer::reset().
Implements xtsc_command_handler_interface.
Parameters:
loader The xtsc_tx_loader to connect to.
Parameters:
logic The xtsc_wire_logic to connect to the control input of this xtsc_queue_producer.
output_name The output of the xtsc_wire_logic.
Parameters:
mmio The xtsc_mmio to connect to the control input of this xtsc_queue_producer.
output_name The output of the xtsc_mmio.
This method is used to determine if the queue can accept another element.
Returns:
true if the queue can accept another element, returns false if the queue is full.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_queue_push_if.
Definition at line 546 of file xtsc_queue_producer.h.
7.113.3.7 bool nb_push (const sc_dt::sc_unsigned & element, xtsc::u64 & ticket)
[inline, protected, virtual]
Parameters:
element The sc_unsigned object to be pushed onto the queue.
ticket An optional reference to a u64 object in which to return a ticket number asso-
ciated with this queue element. If a component which implements this interface
choses to support the ticket concept, it should create and return a unique ticket
number for each element pushed into the component (see xtsc_create_queue_-
ticket()). The unique ticket number should be maintained with the element and
returned in nb_pop when the element is popped from the component. It is rec-
ommended that a component that implements both the xtsc_queue_push_if and
xtsc_queue_pop_if interfaces support this ticket concept. For some devices (e.g.
ones that implement just one of the two interfaces), the ticket concept may not be
meaningful and they should just return a constant ticket value (e.g. 0). Typically,
queue clients (such as xtsc_core) use this ticket for non-hardware purposes such
as logging, profiling, and debugging. Clients are free to ignore the ticket.
Returns:
false if the element cannot be added because the queue is full, otherwise returns true.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
See also:
xtsc_create_queue_ticket
Implements xtsc_queue_push_if.
Definition at line 547 of file xtsc_queue_producer.h.
Get the element width in bits that the queue implementation will hold. This method allows
the queue producer to confirm that the implementation will hold elements of a certain bit
width.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_queue_push_if.
Definition at line 548 of file xtsc_queue_producer.h.
The documentation for this class was generated from the following file:
• xtsc_queue_producer.h
xtsc_parms
xtsc_queue_producer_parms
xtsc_parms
xtsc_queue_producer_parms
Constructor parameters for a xtsc_queue_producer object. This class contains the con-
structor parameters for a xtsc_queue_producer object.
"control" bool If true, then a 1-bit TLM control input will be created
and the "WAIT CONTROL" commands will be enabled in the
script file (see "script_file"). The control input can
be used to control the xtsc_queue_producer device with
another device.
Default = false.
Note: The control input is a TLM interface regardless of
the "pin_level" setting.
"script_file" char* The file to read the test vector commands from. Each
command occupies one line in the file. Valid command
formats are shown below (the first format shows a queue
push transaction command):
<value>
<delay> <value> [<timeout>]
<delay> STOP
WAIT <duration>
WAIT CONTROL WRITE|CHANGE|<value> { <count> }
SYNC <time>
TEST_FULL
NOTE message
INFO message
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
"request_phase" u32 This specifies the phase (i.e. the point) in the clock
period at which the request occurs ("pin_level" false)
or starts ("pin_level" true) when using the plain
<value> line format. That is, this parameter only
applies to line formats of:
<value>
It does NOT apply to line formats of:
<delay> <value> [<timeout>]
It is expressed in terms of the SystemC time resolution
(from sc_get_time_resolution()) and must be strictly
less than the clock period as specified by the
"clock_period" parameter. A value of 0 means the
request occurs at posedge clock as specified by
"posedge_offset". A value of 0xFFFFFFFF means to use 0
if "pin_level" is false and to use Phase B if true (see
xtsc_core::set_clock_phase_delta_factors documentation).
Note: When "pin_level" is true it is recommended that
this value NOT be set to 0.
Default = 0xFFFFFFFF.
"sample_phase" u32 This specifies the phase (i.e. the point) in each clock
period at which the full signal is sampled. It is
expressed in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less
than the clock period as specified by the
"clock_period" parameter. A value of 0 means sampling
occurs at posedge clock as specified by "posedge_offset".
This parameter is for pin-level connection only.
Default = 0.
"deassert_delay" u32 During a push attempt, this specifies how long after
the full signal is sampled and found to be false, that
See also:
xtsc_queue_producer
xtsc::xtsc_parms
xtsc::xtsc_script_file
Parameters:
script_file The file name to read the test vectors from.
width1 Width of each queue element in bits.
• xtsc_queue_producer.h
xtsc_queue_push_if
Interface for connecting between a producer and a queue. This interface along with the
xtsc_queue_pop_if is used for one way communication between a producer and a con-
sumer through a queue.
See also:
xtsc_queue_pop_if
xtsc_create_queue_ticket
xtsc_component::xtsc_queue
xtsc_core::How_to_do_port_binding
This method is used to determine if the queue can accept another element.
Returns:
true if the queue can accept another element, returns false if the queue is full.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_queue_push_if_impl, xtsc_queue_push_if_multi_impl, xtsc_queue_-
producer, and xtsc_queue_push_if_impl.
7.115.2.2 virtual bool nb_push (const sc_dt::sc_unsigned & element, u64 & ticket
= push_ticket) [pure virtual]
Parameters:
element The sc_unsigned object to be pushed onto the queue.
ticket An optional reference to a u64 object in which to return a ticket number asso-
ciated with this queue element. If a component which implements this interface
choses to support the ticket concept, it should create and return a unique ticket
number for each element pushed into the component (see xtsc_create_queue_-
ticket()). The unique ticket number should be maintained with the element and
returned in nb_pop when the element is popped from the component. It is rec-
ommended that a component that implements both the xtsc_queue_push_if and
xtsc_queue_pop_if interfaces support this ticket concept. For some devices (e.g.
ones that implement just one of the two interfaces), the ticket concept may not be
meaningful and they should just return a constant ticket value (e.g. 0). Typically,
queue clients (such as xtsc_core) use this ticket for non-hardware purposes such
as logging, profiling, and debugging. Clients are free to ignore the ticket.
Returns:
false if the element cannot be added because the queue is full, otherwise returns true.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
See also:
xtsc_create_queue_ticket
Get the element width in bits that the queue implementation will hold. This method allows
the queue producer to confirm that the implementation will hold elements of a certain bit
width.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_queue_push_if_impl, xtsc_queue_push_if_multi_impl, xtsc_queue_-
producer, and xtsc_queue_push_if_impl.
Return the no-longer-full event. Clients can call this method to get a reference to an event
that will be notified whenever the queue transitions from full to not full.
Sub-classes must override this method and return their no-longer-full event.
• xtsc_queue_push_if.h
Implementation of xtsc_queue_push_if.
#include <xtsc/xtsc_tx_loader.h>Inheritance diagram for xtsc_queue_push_if_impl:
xtsc_queue_push_if
xtsc_queue_push_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
m_incoming_tx_xfer
xtsc_tx_xfer m_outgoing_tx_xfer
xtsc_queue_pop_if
m_data_out_floating
m_pop_floating m_loader xtsc_queue_pop_if_impl
m_empty_floating
m_full_floating
m_queue_pop_impl
m_data_in_floating
m_push_floating
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating xtsc_tx_loader
m_loader m_tx_xfer_impl
m_queue_push_impl m_loader
xtsc_queue_push_if xtsc_queue_push_if_impl xtsc_tx_xfer_if_impl
xtsc_tx_xfer_if
• bool nb_can_push ()
• bool nb_push (const sc_dt::sc_unsigned &element, u64 &ticket=push_ticket)
• u32 nb_get_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the queue transitions from full to not full.
Private Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_queue_push_if.
Definition at line 393 of file xtsc_tx_loader.h.
See also:
xtsc_queue_push_if
Implements xtsc_queue_push_if.
7.116.2.2 bool nb_push (const sc_dt::sc_unsigned & element, u64 & ticket =
push_ticket) [virtual]
See also:
xtsc_queue_push_if
Implements xtsc_queue_push_if.
See also:
xtsc_queue_push_if
Implements xtsc_queue_push_if.
Definition at line 410 of file xtsc_tx_loader.h.
The documentation for this class was generated from the following file:
• xtsc_tx_loader.h
xtsc_queue_push_if
xtsc_queue_push_if_impl
m_queue
xtsc_queue_push_if_multi_impl
xtsc_command_handler_interface
m_push_multi_impl
xtsc_queue_push_if
xtsc_script_file
m_pop_file
xtsc_module
xtsc_resettable
m_queue
xtsc_queue_pop_if_multi_impl
xtsc_queue_pop_if
• bool nb_can_push ()
• bool nb_push (const sc_dt::sc_unsigned &element, xtsc::u64 &ticket=push_ticket)
• xtsc::u32 nb_get_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the queue transitions from full to not full.
Private Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_queue_push_if
Implements xtsc_queue_push_if.
7.117.2.2 bool nb_push (const sc_dt::sc_unsigned & element, xtsc::u64 & ticket =
push_ticket) [virtual]
See also:
xtsc::xtsc_queue_push_if
Implements xtsc_queue_push_if.
See also:
xtsc::xtsc_queue_push_if
Implements xtsc_queue_push_if.
Definition at line 669 of file xtsc_queue.h.
The documentation for this class was generated from the following file:
• xtsc_queue.h
xtsc_queue_push_if
xtsc_queue_push_if_multi_impl
m_queue
xtsc_queue_push_if_impl
xtsc_command_handler_interface
m_push_impl
xtsc_queue_push_if
xtsc_script_file m_pop_file
xtsc_module
xtsc_resettable
m_queue
xtsc_queue_pop_if_multi_impl
xtsc_queue_pop_if
• bool nb_can_push ()
• bool nb_push (const sc_dt::sc_unsigned &element, xtsc::u64 &ticket=push_ticket)
• xtsc::u32 nb_get_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the queue transitions from full to not full.
Private Attributes
• xtsc::u32 m_port_num
Our producer port number.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_queue_push_if
Implements xtsc_queue_push_if.
7.118.2.2 bool nb_push (const sc_dt::sc_unsigned & element, xtsc::u64 & ticket =
push_ticket) [virtual]
See also:
xtsc::xtsc_queue_push_if
Implements xtsc_queue_push_if.
See also:
xtsc::xtsc_queue_push_if
Implements xtsc_queue_push_if.
Definition at line 743 of file xtsc_queue.h.
The documentation for this class was generated from the following file:
• xtsc_queue.h
xtsc_respond_if
xtsc_ram_respond_if_impl
m_udma
xtsc_respond_if xtsc_pif_respond_if_impl
xtsc_mode_switch_if
m_pif_respond_impl
xtsc_command_handler_interface
m_ram_respond_impl m_udma
xtsc_ram_respond_if_impl
m_udma m_rer_lookup_impl
xtsc_udma xtsc_rer_lookup_if_impl
m_descriptor m_udma
udma_descriptor
m_udma_parms
m_wer_lookup_impl
xtsc_parms xtsc_udma_parms
xtsc_lookup_if xtsc_wer_lookup_if_impl
xtsc_resettable xtsc_module
m_pif_response
m_ram_response
xtsc_connection_interface
xtsc_response m_p_response
stream_dumper
m_stream_dumper
Protected Attributes
• xtsc_udma & m_udma
Our xtsc_udma object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_udma.h
Class representing a PIF, XLMI, local memory, snoop, or inbound PIF request transfer.
#include <xtsc/xtsc_request.h>Collaboration diagram for xtsc_request:
xtsc_request
m_p_request m_stream_dumper
stream_dumper
Classes
• class stream_dumper
Helper class to make it easy to dump xtsc_request to an ostream with or without data
values.
Public Types
• enum type_t {
READ = 0x00,
BLOCK_READ = 0x10,
BURST_READ = 0x30,
RCW = 0x50,
WRITE = 0x80,
BLOCK_WRITE = 0x90,
BURST_WRITE = 0xB0,
SNOOP = 0x60 }
Enumeration used to identify the request type.
• enum coherence_t {
NONCOHERENT = 0,
SHARED = 1,
EXCLUSIVE = 2,
INVALIDATE = 3,
LAST = INVALIDATE }
Enumeration used to identify cache coherence information.
• xtsc_request (type_t type, xtsc_address address8, u32 size8, u64 tag=0, u32 num_-
transfers=1, xtsc_byte_enables byte_enables=0xFFFF, bool last_transfer=true, u32
route_id=0, u8 id=0, u8 priority=2, xtsc_address pc=0xFFFFFFFF)
Constructor for most kinds of xtsc_request objects.
• ∼xtsc_request ()
Destructor.
• void initialize (type_t type, xtsc_address address8, u32 size8, u64 tag=0, u32 num_-
transfers=1, xtsc_byte_enables byte_enables=0xFFFF, bool last_transfer=true, u32
route_id=0, u8 id=0, u8 priority=2, xtsc_address pc=0xFFFFFFFF)
Initializer for most kinds of xtsc_request objects.
• void initialize (u64 tag, xtsc_address address8, u32 size8, u32 num_transfers,
bool last_transfer, u32 route_id=0, u8 id=0, u8 priority=2, xtsc_address
pc=0xFFFFFFFF)
Initializer for second through last request of a BLOCK_WRITE.
• void initialize (u64 tag, xtsc_address address8, u32 route_id=0, u8 id=0, u8 prior-
ity=2, xtsc_address pc=0xFFFFFFFF)
Initializer for the second (last) request transfer of a RCW sequence.
• u8 get_pif_req_domain () const
Get the PIF request domain bits of each transfer.
• u8 get_id () const
Get the PIF ID.
• u8 get_priority () const
Get the transaction priority.
Get whether or not this is request is from the Xtensa top XFER control block.
• u8 ∗ get_buffer ()
Get a pointer to the request’s transfer data suitable either for reading or writing the data.
• void zeroize ()
• sc_dt::sc_unsigned ∗ new_sc_unsigned ()
Get a new sc_unsigned (from the pool).
Private Attributes
• xtsc_address m_address8
Byte address.
• u8 m_buffer [xtsc_max_bus_width8]
Data for RCW, WRITE, and BLOCK_WRITE.
• u32 m_size8
Byte size of each transfer.
• u32 m_pif_attribute
PIF request attributes (12 bits). 0xFFFFFFFF => not set.
• sc_dt::sc_unsigned ∗ m_dram_attribute
DRAM write attributes (160 bits). NULL => not set.
• u32 m_route_id
Route ID for arbiters.
• type_t m_type
Request type (READ, BLOCK_READ, etc).
• u32 m_num_transfers
Number of transfers.
• xtsc_byte_enables m_byte_enables
Byte enables.
• u8 m_id
PIF ID.
• u8 m_priority
Transaction priority.
• u8 m_pif_req_domain
PIF request domain (2 bits). 0xFF => not set.
• bool m_last_transfer
True if last transfer of request.
• bool m_instruction_fetch
True if request is for an instruction fetch, otherwise false.
• bool m_xfer_en
True if request is from Xtensa top XFER control block.
• coherence_t m_coherence
Cache Coherence information.
• xtsc_address m_snoop_virtual_address
Virtual address for snoop controller [Reserved for future use].
• xtsc_address m_pc
Program counter associated with request (artificial).
• xtsc_address m_hw_address8
Address that would appear in hardware. BURST_WRITE only.
• u32 m_transfer_num
Number of this transfer. BURST_WRITE only. (artificial).
• void ∗ m_user_data
Arbitrary data supplied by user.
• bool m_adjust_block_write
True if adjust_block_write() has been called.
• bool m_exclusive
True if request is for exclusive access.
• u64 m_tag
Unique tag per request-response set (artificial).
Class representing a PIF, XLMI, local memory, snoop, or inbound PIF request transfer. The
general 2-step procedure to create a request is:
1. Construct the xtsc_request object using the appropriate xtsc_request constructor for
the type of request you want to create (see type_t). These xtsc_request constructors
all have parameters.
2. Use the set_buffer() or get_buffer() methods to fill in the data payload. This step is
only needed for RCW, WRITE, BLOCK_WRITE, and BURST_WRITE request types.
If you wish to preconstruct an empty xtsc_request object before you know the request type
(for example to create a pool of xtsc_request objects to improve performance), use the
xtsc_request constructor that takes no parameters. When you are ready to use the xtsc_-
request object:
1. Call the the appropriate xtsc_request initialize() method for the type of request you
want to create (see type_t).
2. Use the set_buffer() or get_buffer() methods to fill in the data payload. This step is
only needed for RCW, WRITE, BLOCK_WRITE, and BURST_WRITE request types.
If desired, the above two procedures can be mixed. For example, create an RCW xtsc_-
request using the main xtsc_request constructor and then, when the time comes to create
the second RCW request, call the special initialize() method meant for the second RCW
request. This same technique can be used for BLOCK_WRITE and BURST_WRITE trans-
actions.
For protocol and timing information specific to xtsc_core, see xtsc_core::Information_on_-
memory_interface_protocols.
Note: SNOOP and coherence_t are reserved for future use.
See also:
xtsc_request_if
xtsc_respond_if
xtsc_response
xtsc_core::Information_on_memory_interface_protocols.
xtsc_component::xtsc_arbiter
xtsc_component::xtsc_dma_engine
xtsc_component::xtsc_master
xtsc_component::xtsc_mmio
xtsc_component::xtsc_memory
xtsc_component::xtsc_router
xtsc_component::xtsc_slave
Enumeration used to identify cache coherence information. Note: Reserved for future use
Enumerator:
READ Single read.
BLOCK_READ Block read (num_transfers = 2|4|8|16).
BURST_READ Burst read (num_transfers between 2 and 16, inclusive).
RCW Read-conditional-write.
WRITE Write.
BLOCK_WRITE Block write (num_transfers = 2|4|8|16).
BURST_WRITE Burst write (num_transfers between 2 and 16, inclusive).
SNOOP Snoop request to an Xtensa config supporting data cache coherence
[SNOOP is reserved for future use].
Enumeration used to identify cache coherence information. Note: Reserved for future
use
Enumerator:
NONCOHERENT Non-coherent request.
SHARED BLOCK_READ request for shared or SNOOP request for shared.
EXCLUSIVE BLOCK_READ request for exclusive or SNOOP request for exclusive.
INVALIDATE SNOOP request for invalidate.
7.120.4.1 xtsc_request ()
Constructor for an empty xtsc_request object used to create a pool of pre-allocated xtsc_-
request objects. Before using an xtsc_request object that was created with this constructor,
either assign another xtsc_request object to it or call one of the initialize() methods on it.
7.120.4.2 xtsc_request (type_t type, xtsc_address address8, u32 size8, u64 tag =
0, u32 num_transfers = 1, xtsc_byte_enables byte_enables = 0xFFFF,
bool last_transfer = true, u32 route_id = 0, u8 id = 0, u8 priority = 2,
xtsc_address pc = 0xFFFFFFFF)
Constructor for most kinds of xtsc_request objects. This constructor is used to create the
following kinds of xtsc_request objects:
• READ
• BLOCK_READ
• BURST_READ
• RCW (first transfer only)
• WRITE
• BLOCK_WRITE (first transfer only)
• BURST_WRITE (first transfer only)
• SNOOP (reserved for future use)
Parameters:
type Type of request. See xtsc_request::type_t.
address8 Byte address of request. See set_byte_address().
size8 Size in bytes of each transfer. See set_byte_size().
tag The tag if it has already been assigned by the Xtensa ISS. If not, pass in 0 (the
default) and a new non-zero tag will be assigned (and can be obtained by calling
the get_tag() method).
num_transfers See set_num_transfers().
byte_enables See set_byte_enables(). If type is BLOCK_WRITE, BLOCK_READ, or
BURST_READ then this parameter is ignored and the byte enables are all set for
a bus width corresponding to size8. If a different set of byte enables is desired for
BLOCK_WRITE, then call set_byte_enables() after calling this constructor or the
corresponding initialize() method.
Parameters:
tag The tag from the first request of the BLOCK_WRITE sequence.
address8 Byte address of request. This should increment by size8 (bus width) for
each request of the BLOCK_WRITE sequence.
size8 Size in bytes of each transfer. For BLOCK_WRITE, this is always equal to the
bus width.
num_transfers The total number of BLOCK_WRITE request transfers. This should
be the same number as in the first request of the BLOCK_WRITE sequence.
last_transfer True if this is the last request of the BLOCK_WRITE sequence.
route_id The route ID. See set_route_id().
id The PIF ID. See set_id().
priority The transaction priority. See set_priority().
pc The associated processor program counter. See set_pc().
Note: This constructor sets the the byte enables for all bytes of the bus (based on size8). If
you want byte enables other then this, call set_byte_enables() after calling this constructor.
Parameters:
tag The tag from the first request of the RCW sequence.
address8 Byte address of request. This should be the same as the address of the
first RCW request transfer.
route_id The route ID. See set_route_id().
id The PIF ID. See set_id().
priority The transaction priority. See set_priority().
pc The associated processor program counter. See set_pc().
Note: This constructor sets the byte size to 4 and the byte enables to 0xF. If you want
an RCW request with a byte size other then 4, then call set_byte_size() after calling this
constructor. If you want byte enables other then 0xF, call set_byte_enables() after calling
this constructor.
Note: If you use literals or non-byte integers for both id and priority, then at least one of
them will need to be cast to a u8 to disambiguate this constructor from the BLOCK_WRITE
constructor. For example:
xtsc_request rcw2(tag, address8, 0, 0, (u8) 0, pc);
Parameters:
hw_address8 This should be equal to the lowest byte address enabled by a byte
enable in the first request of the sequence. See get_hardware_address().
tag The tag from the first request of the BURST_WRITE sequence.
address8 Byte address of request. This starts out bus-width- aligned and should
increment by the bus width for each request of the BURST_WRITE sequence.
size8 Size in bytes of each transfer. This should be equal to the bus width. See
set_byte_size().
num_transfers The total number of BURST_WRITE request transfers. This should
be the same number as in the first request of the BURST_WRITE sequence.
transfer_num The sequential number of this transfer (valid values are 2 through
num_transfers).
byte_enables The bytes to be written. See set_byte_enables().
route_id The route ID. See set_route_id().
id The PIF ID. See set_id().
priority The transaction priority. See set_priority().
pc The associated processor program counter. See set_pc().
7.120.5.1 void initialize (type_t type, xtsc_address address8, u32 size8, u64 tag =
0, u32 num_transfers = 1, xtsc_byte_enables byte_enables = 0xFFFF,
bool last_transfer = true, u32 route_id = 0, u8 id = 0, u8 priority = 2,
xtsc_address pc = 0xFFFFFFFF)
Initializer for most kinds of xtsc_request objects. This method is used to initialize the fol-
lowing kinds of xtsc_request objects:
• READ
• BLOCK_READ
• BURST_READ
• WRITE
7.120.5.2 void initialize (u64 tag, xtsc_address address8, u32 size8, u32
num_transfers, bool last_transfer, u32 route_id = 0, u8 id = 0, u8
priority = 2, xtsc_address pc = 0xFFFFFFFF)
Initializer for second through last request of a BLOCK_WRITE. See the documentation for
the corresponding constructor.
Initializer for the second (last) request transfer of a RCW sequence. See the documentation
for the corresponding constructor.
Initializer for second through last request of a BURST_WRITE. See the documentation for
the corresponding constructor.
Parameters:
address8 Byte address of request. Should be size-aligned (that is, address8 modulo
m_size8 should be 0). For BLOCK_WRITE requests, address8 starts out aligned
to m_size8∗num_transfers and increases by bus width (m_size8) on each subse-
quent request transfer in the sequence. For BURST_WRITE requests, address8
should start out bus width (m_size8) aligned and should increase by the bus width
(m_size8) on each subsequent request transfer in the sequence. For BLOCK_-
READ, BURST_READ, and SNOOP requests, address8 should be aligned to the
bus width (m_size8); it does not have to be aligned to m_size8∗num_transfers (for
BLOCK_READ, this is to allow critical word first access to memory). address8 is
the same for both request transfers of an RCW sequence.
Note: For a PIF interface, the address in a BLOCK_WRITE xtsc_request differs from the
address in the PIF hardware specification. In XTSC, the address changes with each re-
quest of a BLOCK_WRITE sequence to reflect the target address for that transfer. In the
hardware specification, the address for each transfer is constant and reflects the starting
address of the block.
Note: For a PIF interface, the address in a BURST_WRITE xtsc_request differs from the
address in the PIF hardware specification. In XTSC, the address starts out aligned with the
bus width and increases by the bus width for each request of a BURST_WRITE sequence.
In the hardware specification, the address for all transfers in the sequence is constant and
equal to the lowest address enabled by a byte enable in the first transfer.
Note: The address corresponding to the hardware specification is available by calling the
get_hardware_address() method.
Note: Snoop is reserved for future use.
get_byte_address(). get_hardware_address().
Definition at line 395 of file xtsc_request.h.
See also:
set_byte_address
Get the byte address corresponding to the PIF hardware address signals. For all request
types except BLOCK_WRITE and BURST_WRITE, this method returns the same address
as the get_byte_address() method. For all BLOCK_WRITE requests in a sequence, this
method returns the address of the start of the block unless the adjust_block_write() method
has been called for the request. For the first BURST_WRITE request in a sequence, this
method returns the hardware address inferred by the starting address and the byte enables;
that is, the lowest byte address enabled by a byte enable. For all other BURST_WRITE re-
quests, this method returns the value set by the constructor or the initialize() method (which
is supposed to be the lowest byte address enabled in the first request of the sequence).
Note: For BLOCK_WRITE requests in normal operation, this method computes the return
value based on byte address (from get_byte_address) of the xtsc_request. If the adjust_-
block_write() method has been called for this request, then the value provide by that call is
returned instead.
See also:
adjust_block_write
get_byte_address
Override the computed hardware address and transfer number for a BLOCK_WRITE re-
quest. In normal operations for BLOCK_WRITE requests, xtsc_request computes the hard-
ware address returned by the get_hardware_address() method and the transfer number
returned by the get_transfer_number() method. After constructing or initializing a BLOCK_-
WRITE xtsc_request, this method can be called to override the values normally returned
by the two get methods. This might be done, for example, to test how a model handles a
protocol violation.
See also:
get_hardware_address
get_transfer_number
Parameters:
size8 Size in bytes of each transfer. For BLOCK_READ, BLOCK_WRITE, BURST_-
READ, BURST_WRITE, and SNOOP, this is always equal to the bus width. For
READ, WRITE, and RCW, size8 must be a power of 2 less than or equal to bus
width.
See also:
set_byte_size()
Parameters:
pif_attribute PIF request attributes.
See also:
set_pif_attribute()
Parameters:
pif_req_domain PIF request domain bits.
See also:
set_pif_req_domain()
Parameters:
dram_attribute The DRAM read/write attributes.
See also:
get_dram_attribute()
Parameters:
dram_attribute The DRAM read/write attributes.
Exceptions:
See also:
has_dram_attribute()
set_dram_attribute()
See also:
get_dram_attribute()
set_dram_attribute()
Parameters:
route_id Arbiters add bits to this field as needed to be able to route the return re-
sponse. Terminal devices must echo this field back verbatim in the response. An
arbiter should clear the corresponding bit field in the response before forwarding
the response back upstream. The result should be that the route ID in the re-
sponse that the arbiter sends upstream should match the route ID in the original
request received by the arbiter.
See also:
xtsc_response::set_route_id()
See also:
set_route_id()
See also:
type_t
See also:
type_t
Parameters:
type The desired type.
Parameters:
name The name of the desired type.
Parameters:
num_transfers For READ and WRITE, this is 1. For BLOCK_READ, this is the num-
ber of response transfers expected by this request (2|4|8|16). For BURST_READ,
this is the number of response transfers expected by this request (2-16). For
BLOCK_WRITE this is the number of request transfers in the BLOCK_WRITE
sequence (2|4|8|16). For BURST_WRITE this is the number of request transfers
in the BURST_WRITE sequence (2-16). For RCW, this is 2. For SNOOP, this is
the number of response with data transfers expected by this request (1|2|4|8|16).
See also:
set_num_transfers
Get which request transfer this is in a sequence of request transfers. For READ, BLOCK_-
READ, BURST_READ, WRITE, and SNOOP, this always returns 1. For BLOCK_WRITE
and BURST_WRITE, this returns which request transfer this is in the sequence of BLOCK_-
WRITE or BURST_WRITE request transfers (starting with 1 and going up to m_num_-
transfers). For RCW, this returns 1 for the first request transfer and 2 for the second request
transfer.
Note: For BLOCK_WRITE requests in normal operation, this method computes the return
value based on byte address (from get_byte_address) of the xtsc_request. If the adjust_-
block_write() method has been called for this request, then the value provide by that call is
returned instead.
Note: Snoop is reserved for future use.
See also:
adjust_block_write
get_byte_address
Parameters:
byte_enables Let address8 be the address set by set_byte_address() or an xtsc_-
request constructor or initialize() method. For READ, WRITE, RCW, and
BURST_WRITE, bit 0 of byte_enables applies to address8, bit 1 of byte_-
enables applies to address8+1, ..., bit (size8-1) of byte_enables applies to
address8+size8-1. For BLOCK_WRITE, BLOCK_READ, BURST_READ, and
SNOOP, byte_enables is not used. For the middle requests in a BURST_WRITE
sequence (that is, requests that are neither the first nor the last in the sequence),
all bytes of the bus should be enabled.
See also:
set_byte_enables
Parameters:
id The PIF ID. Terminal devices must echo this field back verbatim in the response.
Master devices are free to use this field to support multiple outstanding PIF re-
quests.
See also:
set_id
Set the transaction priority. Hardware only supports priority values of 0-3 (i.e. 2 bits).
Value Meaning
----- -------
0 Low
1 Medium low
2 Medium high
3 High
The Xtensa LX processor issues all PIF requests at medium-high (2) priority and ignores
the priority bits of PIF responses. Inbound PIF requests to instruction RAMs always have
priority over processor generated instruction fetches regardless of the value set using the
set_priority() method. Inbound PIF requests to data RAMs and XLMI will take priority over
processor generated loads and stores if priority is set to 3 (High). A priority of 0, 1, or 2 will
result in the inbound PIF request getting access to the XLMI or data RAM when it is free.
If an inbound PIF request with a priority less then 3 has been blocked for several cycles by
processor generated loads or stores, then bubbles will be inserted in the Xtensa processor
pipeline to allow the request to make forward progress.
Definition at line 717 of file xtsc_request.h.
See also:
set_priority
Parameters:
last_transfer True if this is the last transfer of the request. For READ, BLOCK_-
READ, BURST_READ, WRITE, and SNOOP, this should always be true. For all
but the last transfer of a BLOCK_WRITE, BURST_WRITE, or RCW sequence,
this should be false and for the last transfer it should be true.
See also:
set_last_transfer
Parameters:
instruction_fetch True indicates this request is for an instruction fetch.
Note: Typically m_instruction_fetch should be false if m_type is neither READ nor BLOCK_-
READ.
Definition at line 758 of file xtsc_request.h.
See also:
set_instruction_fetch
Set whether or not this is request is from the Xtensa top XFER control block.
Parameters:
xfer_en True indicates this request is a local memory request originating from the
Xtensa top XFER control block and therefore must not be RSP_NACC’d.
Note: This interface is only applicable to TX Xtensa cores which have the bootloader inter-
face and at least one local memory with a busy signal.
Definition at line 779 of file xtsc_request.h.
Get whether or not this is request is from the Xtensa top XFER control block. Note: This
interface is only applicable to TX Xtensa cores which have the bootloader interface and at
least one local memory with a busy signal.
See also:
set_xfer_en
Parameters:
coherence The coherence information of this request. For BLOCK_READ this may be
NONCOHERENT, SHARED, or EXCLUSIVE. For SNOOP, this may be SHARED
or EXCLUSIVE or INVALIDATE. For READ, BURST_READ, WRITE, BLOCK_-
WRITE, and BURST_WRITE this is always NONCOHERENT.
See also:
set_coherence
Parameters:
snoop_virtual_address The virtual address for use by the snoop controller.
Get the virtual address associated with this request (for coherent/snoop requests). Note:
Coherence and snoop are reserved for future use.
See also:
set_snoop_virtual_address
Set the processor program counter (PC) associated with this request.
Parameters:
pc The PC associated with this request. If no meaningful PC can be associated with
the request use 0xFFFFFFFF. This signal is not in the hardware, but is provided
for debugging and logging purposes.
Get the processor program counter (PC) associated with this request.
See also:
set_pc
Set the request’s transfer buffer (data payload). This method should only be used for RCW,
WRITE, BLOCK_WRITE, and BURST_WRITE request transaction types.
For RCW transactions, the first RCW request transfer contains that data that the target
should use to compare with the current memory contents and the second RCW request
transfer contains the data that should replace the current contents if the first transfers data
matched the current contents.
Data is arranged in the buffer as follows: Let address8 be the address set by set_byte_-
address() or the xtsc_request constructor or initialize() method. Let size8 be the transfer
size set by set_byte_size() or the xtsc_request constructor.
This format applies regardless of host and target endianess. Note: The above mapping
applies regardless of byte enables; however, byte enables may dictate that certain bytes in
the buffer are meaningless and not to be used. See set_byte_enables().
Get a pointer to the request’s transfer data suitable only for reading the data.
See also:
set_buffer()
Get a pointer to the request’s transfer data suitable either for reading or writing the data.
The buffer size is 64 bytes to accommodate the widest possible Xtensa memory interface;
however, you should only use the first N bytes where N is the size of the actual memory
interface in use.
Warning: Writing past the 64th byte results in undefined bad behavior.
See also:
set_buffer()
Set optional user data associated with this request. Note: User data is neither readable
nor writable by Xtensa Ld/St/iFetch operations.
Note: The initial value of m_user_data is 0 (NULL).
Parameters:
user_data Optional user data.
See also:
set_user_data
Return a string suitable for logging containing bytes from the optional user data associated
with this request.
Parameters:
num_bytes If 0, an empty string is returned. If non-zero, the returned string will begin
with prefix and end with suffix. If positive and m_user_data is not 0 (NULL),
the bytes are taken from the memory pointed to by the user data pointer (user
discretion is advised). If positive and m_user_data is 0, then return string consists
only of the prefix and suffix. If negative, the least significant -num_bytes bytes are
obtained from the user data pointer itself, as shown here:
0xFFFFFFFF or -1: ((u64)p_user_data & 0x00000000000000FF)
0xFFFFFFFE or -2: ((u64)p_user_data & 0x000000000000FFFF)
0xFFFFFFFD or -3: ((u64)p_user_data & 0x0000000000FFFFFF)
0xFFFFFFFC or -4: ((u64)p_user_data & 0x00000000FFFFFFFF)
0xFFFFFFFB or -5: ((u64)p_user_data & 0x000000FFFFFFFFFF)
0xFFFFFFFA or -6: ((u64)p_user_data & 0x0000FFFFFFFFFFFF)
0xFFFFFFF9 or -7: ((u64)p_user_data & 0x00FFFFFFFFFFFFFF)
0xFFFFFFF8 or -8: ((u64)p_user_data & 0xFFFFFFFFFFFFFFFF)
See also:
set_user_data
get_user_data
Parameters:
exclusive True if this request is for exclusive access.
See also:
set_exclusive
Get this request’s tag. This is an artificial number (not in hardware) useful for correlating
requests and responses in, for example, a log file. For READ and WRITE, the tag is the
same for a request and its corresponding response. For BLOCK_WRITE and BURST_-
WRITE, the tag is the same for all request transfers and the single response transfer of the
BLOCK_WRITE or BURST_WRITE sequence. For BLOCK_READ, BURST_READ, and
SNOOP, the tag is the same for the single request transfer and all the response transfers in
the block. For RCW, the tag is the same for both request transfers and the single response
transfer. A request that gets RSP_NACC maintains the same tag when the request is
repeated.
Note: Snoop is reserved for future use.
Definition at line 1000 of file xtsc_request.h.
This method dumps this request’s info to the specified ostream object, optionally including
data (if applicable). The format of the output is:
Where:
<Tag> is m_tag in decimal.
<PC> is m_pc in hexadecimal.
<Type> is READ|BLOCK_READ|BURST_READ|RCW|WRITE|BLOCK_WRITE|BURST_WRITE|
SNOOP.
* indicates m_last_transfer is true.
<Address> is m_address8 in hexadecimal.
<Num> is m_size8 for READ|WRITE, or m_num_transfers for BLOCK_READ|
BURST_READ|SNOOP, or get_transfer_number() for RCW|BLOCK_WRITE|
BURST_WRITE.
<ByteEnables> is m_byte_enables in hexadecimal.
<Coherence> is m_coherence in decimal.
<ID> is m_id in decimal.
<Pri> is m_priority in decimal.
<Attr> is m_pif_attribute or m_dram_attribute in hex. <Attr> is not
present if neither m_pif_attribute nor m_dram_attribute has been
set.
<Dom> is m_pif_req_domain in dec. <Dom> is not present if
m_pif_req_domain has not been set.
<F|E> is the letter "F" if m_instruction_fetch is true, else is the
letter "E" if m_exclusive is true, else is null (not present).
<Data> is the equal sign followed by the contents of m_buffer in
Parameters:
os The ostream object to which the info should be dumped.
dump_data If true, and the request type is RCW|WRITE|BLOCK_WRITE| BURST_-
WRITE, then the request’s buffer contents are dumped. Otherwise, the buffer is
not dumped.
• xtsc_request.h
Interface for sending requests from a memory interface master to a memory interface slave.
#include <xtsc/xtsc_request_if.h>Inheritance diagram for xtsc_request_if:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl xtsc_slave
xtsc_debug_if
xtsc_request_if
Interface for sending requests from a memory interface master to a memory interface slave.
This composite interface is for both debug and normal hardware communication from a
memory interface master module to a memory interface slave module.
A memory interface master is a module (such as xtsc_core) that is capable of making mem-
ory interface requests (for example, read, write, block read, etc.) and a memory interface
slave is a module (such as xtsc_component::xtsc_memory) that is capable of servicing
memory interface requests.
Every memory interface master must have two ports. These two ports are referred to
thoughtout the XTSC documentation as a "memory interface master port pair" or simply a
"master port pair". They are:
Correspondingly, every memory interface slave must have two ports. These two ports are
referred to thoughtout the XTSC documentation as a "memory interface slave port pair" or
simply a "slave port pair". They are:
To connect a memory interface master with a memory interface slave requires two port
binding operations:
See also:
xtsc_request
xtsc_debug_if
xtsc_respond_if
xtsc_response
xtsc_core::How_to_do_port_binding
xtsc_core::Information_on_memory_interface_protocols
xtsc_component::xtsc_arbiter
xtsc_component::xtsc_dma_engine
xtsc_component::xtsc_master
xtsc_component::xtsc_memory
xtsc_component::xtsc_router
xtsc_component::xtsc_slave
7.121.2.1 virtual void nb_request (const xtsc_request & request) [pure virtual]
Calls to this method represent the request phase of real hardware bus activity.
Parameters:
request The xtsc_request object.
The nb_request() method returns void. If the slave module (the callee) does not want to
accept the request (e.g. it is already busy with another request), it must call xtsc_respond_-
if::nb_respond() with xtsc_response::RSP_NACC.
Note: The caller module owns the request object. If the callee module needs access to the
request after returning from the nb_request() call, then the callee module must make its
own copy of the request object.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
See also:
xtsc_request
This method is called to indicate that the oldest outstanding XLMI load has retired. This
method models the DPortNLoadRetiredM signal of XLMI. This method will never be called
by xtsc_core except on an XLMI port.
Parameters:
address8 The address of the oldest outstanding load.
Note: A router should forward this method call out the master port indicated by the address
argument.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Reimplemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_request_if_impl, xtsc_-
request_if_impl, and xtsc_request_if_impl.
Definition at line 315 of file xtsc_request_if.h.
This method is called to indicate that none of the outstanding XLMI loads will commit (and
therefore they should be flushed). This method models the DPortnRetireFlushm signal of
XLMI. This method will never be called by xtsc_core except on an XLMI port.
Note: A router should broadcast this method call out all master ports (i.e. to all slaves).
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Reimplemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_request_if_impl, xtsc_-
request_if_impl, and xtsc_request_if_impl.
Definition at line 331 of file xtsc_request_if.h.
Parameters:
lock If true, the DRamnLockm signal is being asserted. If false, the DRamnLockm
signal is being deasserted.
• A router should broadcast this method call out all master ports (i.e. to all slaves).
• An arbiter should maintain state of the the lock argument for each port.
• An arbiter should actually lock on a port only when a request is received and granted
while the lock argument state is true.
• When an arbiter first locks on a port, it should send a nb_lock(true) call downstream
prior to forwarding the nb_request() call.
• When an arbiter receives an nb_lock(false) call on a port to which it is locked, then it
should unlock the port and foward the nb_lock(false) call downstream.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Reimplemented in xtsc_request_if_impl, xtsc_request_if_impl, xtsc_request_if_impl, xtsc_-
request_if_impl, xtsc_request_if_impl, and xtsc_request_if_impl.
Definition at line 359 of file xtsc_request_if.h.
The documentation for this class was generated from the following file:
• xtsc_request_if.h
Implementation of xtsc_request_if.
#include <xtsc/xtsc_tlm2pin_memory_transactor.h>Inheritance diagram for xtsc_-
request_if_impl:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
xtsc_debug_if
m_transactor
xtsc_request_if xtsc_request_if_impl
m_request_impl xtsc_debug_if_cap
m_p_initial_value_file m_transactor
xtsc_script_file xtsc_memory_b
m_p_memory m_debug_cap
xtsc_tlm2pin_memory_transactor
xtsc_connection_interface xtsc_module
xtsc_resettable xtsc_command_handler_interface
xtsc_module_pin_base
• void nb_retire_flush ()
For XLMI: DPortRetireFlush.
• bool is_connected ()
Return true if a port has been bound to this implementation.
Protected Attributes
• xtsc_tlm2pin_memory_transactor & m_transactor
Our xtsc_tlm2pin_memory_transactor object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
• xtsc::u32 m_lock_port
For DRAM0BS|DRAM1BS, port num of the 0th subbank, otherwise same as m_port_num.
• std::string m_lock_port_str
For DRAM0Bs|DRAM1BS: To add actual port to nb_lock logging.
Implementation of xtsc_request_if.
Definition at line 1115 of file xtsc_tlm2pin_memory_transactor.h.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
Receive requests for information about how to do fast access from the memory interface
master.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
For DRamnLockm.
See also:
xtsc::xtsc_request_if
• xtsc_tlm2pin_memory_transactor.h
Implementation of xtsc_request_if.
#include <xtsc/xtsc_memory.h>Inheritance diagram for xtsc_request_if_impl:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
m_p_exclusive_script_stream
m_p_script_stream
xtsc_script_file m_p_initial_value_file
m_p_memory
xtsc_memory_b
m_filtered_request
m_filtered_response
m_p_request m_stream_dumper m_p_active_response
stream_dumper xtsc_response xtsc_memory
xtsc_request
m_stream_dumper
m_p_active_request_info
m_request
request_info
m_memory_parms
xtsc_memory_parms
xtsc_parms m_fast_access_object
xtsc_fast_access_if
m_request_impl
Protected Attributes
• xtsc_memory & m_memory
Our xtsc_memory object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our slave port pair number.
Implementation of xtsc_request_if.
Definition at line 1613 of file xtsc_memory.h.
Constructor.
Parameters:
memory A reference to the owning xtsc_memory object.
port_num The slave port number that this object serves.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
• xtsc_memory.h
Implementation of xtsc_request_if.
#include <xtsc/xtsc_mmio.h>Inheritance diagram for xtsc_request_if_impl:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
m_mmio
xtsc_debug_if xtsc_request_if xtsc_request_if_impl
m_request_impl
xtsc_resettable xtsc_module
xtsc_script_file m_mmio_parms
xtsc_request m_p_request
stream_dumper
m_stream_dumper
Constructor.
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_request_if.
Definition at line 709 of file xtsc_mmio.h.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
The documentation for this class was generated from the following file:
• xtsc_mmio.h
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
m_request_impl
xtsc_debug_if xtsc_request_if xtsc_request_if_impl
m_transactor
m_transactor
xtsc_connection_interface xtsc_module nb_mm
m_nb_mm
xtsc_xttlm2tlm2_transactor m_transactor
xtsc_resettable xtsc_mode_switch_if
tlm_bw_transport_if_impl
m_request m_tlm_bw_transport_if_impl
xtsc_command_handler_interface
xtsc_request m_p_request
stream_dumper
m_stream_dumper
• bool is_connected ()
Return true if a port has been bound to this implementation.
Protected Attributes
• xtsc::u32 m_port_num
Our port number.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_request_if.
Definition at line 667 of file xtsc_xttlm2tlm2_transactor.h.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
See also:
xtsc::xtsc_request_if
• xtsc_xttlm2tlm2_transactor.h
Implementation of xtsc_request_if.
#include <xtsc/xtsc_router.h>Inheritance diagram for xtsc_request_if_impl:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
m_filtered_response
m_file
xtsc_script_file
m_router_parms
xtsc_parms xtsc_router_parms
m_router
Protected Attributes
• xtsc_router & m_router
Our xtsc_router object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_request_if.
Definition at line 1159 of file xtsc_router.h.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
• xtsc_router.h
Implementation of xtsc_request_if.
#include <xtsc/xtsc_arbiter.h>Inheritance diagram for xtsc_request_if_impl:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
m_responses
m_stream_dumper m_response
xtsc_response response_info
m_p_nascent_response
m_p_response xtsc_respond_if
stream_dumper
m_p_nascent_request
m_stream_dumper m_p_first_request_info req_rsp_info m_arbiter xtsc_respond_if_impl
m_request m_req_rsp_table
xtsc_request request_info
m_requests xtsc_arbiter m_respond_impl
m_arbiter_parms
xtsc_parms xtsc_arbiter_parms
m_request_impl
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
Implementation of xtsc_request_if.
Definition at line 1143 of file xtsc_arbiter.h.
Constructor.
Parameters:
arbiter A reference to the owning xtsc_arbiter object.
port_num The port number that this object serves.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
• xtsc_arbiter.h
Implementation of xtsc_request_if.
#include <xtsc/xtsc_memory_trace.h>Inheritance diagram for xtsc_request_if_impl:
xtsc_debug_if
xtsc_request_if
xtsc_request_if_impl
xtsc_debug_if
m_request_impl m_trace
xtsc_respond_if xtsc_memory_trace
m_trace m_respond_impl
xtsc_respond_if_impl
Protected Attributes
• xtsc_memory_trace & m_trace
Our xtsc_memory_trace object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
• xtsc::u64 m_nb_request_count
Count the nb_request calls on each port.
• xtsc::u32 m_address8
Byte address.
• sc_dt::sc_unsigned m_data
Data.
• xtsc::u32 m_size8
Byte size of each transfer.
• xtsc::u32 m_pif_attribute
PIF request attribute of each transfer.
• xtsc::u32 m_route_id
Route ID for arbiters.
• xtsc::u8 m_type
Request type (READ, BLOCK_READ, etc).
• xtsc::u32 m_num_transfers
Number of transfers.
• xtsc::u16 m_byte_enables
Byte enables.
• xtsc::u8 m_id
PIF ID.
• xtsc::u8 m_priority
Transaction priority.
• bool m_last_transfer
True if last transfer of request.
• xtsc::u32 m_pc
Program counter associated with request.
• xtsc::u64 m_tag
Unique tag per request-response set.
• bool m_instruction_fetch
True if request is for an instruction fetch, otherwise false.
• xtsc::u8 m_coherence
Cache Coherence information.
• xtsc::u32 m_snoop_virtual_address
Virtual address for snoop controller (future use).
• xtsc::u32 m_hw_address8
Address that would appear in hardware.
• xtsc::u32 m_transfer_num
Number of this transfer.
Implementation of xtsc_request_if.
Definition at line 855 of file xtsc_memory_trace.h.
Constructor.
Parameters:
object_name The name of this SystemC channel (aka implementation)
trace A reference to the owning xtsc_memory_trace object.
port_num The port number that this object represents.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
See also:
xtsc::xtsc_debug_if
Implements xtsc_debug_if.
See also:
xtsc::xtsc_request_if
Implements xtsc_request_if.
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request_if
See also:
xtsc::xtsc_request::coherence_t
• xtsc_memory_trace.h
xtsc_lookup_if
xtsc_rer_lookup_if_impl
m_wer_lookup_impl
xtsc_command_handler_interface
m_udma m_udma
xtsc_rer_lookup_if_impl
m_rer_lookup_impl m_ram_respond_impl
xtsc_udma xtsc_ram_respond_if_impl
m_descriptor m_pif_respond_impl
udma_descriptor
m_udma_parms
xtsc_respond_if xtsc_pif_respond_if_impl
xtsc_resettable xtsc_module m_pif_response
m_ram_response
xtsc_connection_interface
xtsc_response m_p_response
stream_dumper
m_stream_dumper
• u32 nb_get_data_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the lookup data is available.
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
See also:
xtsc::xtsc_lookup_if
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
Definition at line 578 of file xtsc_udma.h.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
Definition at line 581 of file xtsc_udma.h.
The documentation for this class was generated from the following file:
• xtsc_udma.h
xtsc_core
xtsc_tx_loader
xtsc_udma
xtsc_arbiter
xtsc_lookup
xtsc_lookup_driver
xtsc_lookup_pin
xtsc_master
xtsc_master_tlm2
xtsc_cache
xtsc_memory
xtsc_dma_engine
xtsc_memory_pin
xtsc_memory_tlm2
xtsc_memory_trace
xtsc_mmio
xtsc_resettable xtsc_module
xtsc_pin2tlm_lookup_transactor
xtsc_pin2tlm_memory_transactor
xtsc_queue
xtsc_queue_consumer
xtsc_queue_pin
xtsc_queue_producer
Interface for objects which can be reset. Note: If a component has any SystenC thread
processes, then those processes may need to be restarted in order to get a clean reset.
SystemC 2.3 provides mechanisms for doing this that were previously not available.
Here is a 6-step idiom for adding thread process reset to an xtsc_module (for an exam-
ple, see m_process_handles, sc_unwind_exception, reset_fifos(), and cancel() in xtsc_-
component::xtsc_arbiter):
1) Add member:
std::vector<sc_core::sc_thread_process> m_process_handles;
2) Add the newly created process to m_process_handles table immediately after each de-
sired SC_THREAD() macro or declare_thread_process() invocation. For example, change
this:
SC_THREAD(worker_thread);
To this:
SC_THREAD(worker_thread); m_process_handles.push_back(sc_get_current_process_handle());
xtsc_reset_processes(m_process_handles);
m_arbiter_thread_event.cancel();
To this:
Typically, the catch clause should either not log or should only log at verbose or debug level
because xtsc_reset_processes() will log each process that is reset.
6) Reset any applicable thread state. This may involve emptying standard library con-
tainer and/or sc_fifo instances. Note that an element cannot be removed from an sc_fifo
in the same delta cycle in which it was added, so the general case may require waiting a
delta cycle which should NOT be done from the reset() method. One technique is to do a
wait(SC_ZERO_TIME) when first entering an SC_THREAD and then emptying any desired
sc_fifo objects. For an example, see xtsc_component::xtsc_arbiter::reset_fifos().
See also:
xtsc_reset_processes()
xtsc_reset
• xtsc.h
Interface for sending responses from a memory interface slave back to the requesting mem-
ory interface master.
#include <xtsc/xtsc_respond_if.h>Inheritance diagram for xtsc_respond_if:
xtsc_respond_if
Interface for sending responses from a memory interface slave back to the requesting
memory interface master. This interface is for communication from a memory interface
slave module (for example, xtsc_component::xtsc_memory) back to the memory interface
master module (for example, xtsc_core)
Every memory interface master must have two ports. These two ports are referred to
thoughtout the XTSC documentation as a "memory interface master port pair" or simply a
"master port pair". They are:
Correspondingly, every memory interface slave must have two ports. These two ports are
referred to thoughtout the XTSC documentation as a "memory interface slave port pair" or
simply a "slave port pair". They are:
See also:
xtsc_response
xtsc_request_if
xtsc_request
xtsc_core::How_to_do_port_binding
xtsc_core::Information_on_memory_interface_protocols.
xtsc_component::xtsc_arbiter
xtsc_component::xtsc_dma_engine
xtsc_component::xtsc_master
xtsc_component::xtsc_memory
xtsc_component::xtsc_router
xtsc_component::xtsc_slave
This is method is used by a slave module to either reject the master module’s request
(xtsc_response::get_status() == xtsc_response::RSP_NACC) or to respond to that request
(xtsc_response::get_status() != xtsc_response::RSP_NACC). In the latter case, if the mas-
ter module is busy and cannot accept the response during the current clock cycle, the
master module should return false to the nb_respond() call.
Parameters:
response The xtsc_response object.
Note: The caller module owns the response object. If the callee module needs access to
the response after returning from the nb_respond() call, then the callee module must make
its own copy of the response object.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
See also:
xtsc_response
xtsc_core::Information_on_memory_interface_protocols for protocol and timing issues
specific to xtsc_core.
• xtsc_respond_if.h
xtsc_respond_if
xtsc_respond_if_impl
xtsc_connection_interface
xtsc_module
m_transactor
xtsc_resettable
m_id_to_transaction_info_tab transaction_info
xtsc_command_handler_interface
xtsc_tlm22xttlm_transactor m_transactor
m_xtsc_respond_if_impl
tlm_fw_transport_if_impl
xtsc_respond_if xtsc_respond_if_impl m_transactor m_tlm_fw_transport_if_impl
• bool is_connected ()
Return true if a port has been bound to this implementation.
Protected Attributes
• xtsc_tlm22xttlm_transactor & m_transactor
Our xtsc_tlm22xttlm_transactor object.
• xtsc::u32 m_port_num
Our port number.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_respond_if.
Definition at line 431 of file xtsc_tlm22xttlm_transactor.h.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_tlm22xttlm_transactor.h
Implementation of xtsc_respond_if.
#include <xtsc/xtsc_router.h>Inheritance diagram for xtsc_respond_if_impl:
xtsc_respond_if
xtsc_respond_if_impl
m_router
xtsc_connection_interface xtsc_module
xtsc_resettable xtsc_command_handler_interface
m_responses
response_info m_p_nascent_response
m_request request_info
m_filtered_request m_router xtsc_request_if_impl
m_p_response m_stream_dumper
xtsc_response stream_dumper xtsc_request
m_stream_dumper
m_filtered_response
m_file
xtsc_script_file
m_router_parms
xtsc_parms xtsc_router_parms xtsc_request_if
xtsc_debug_if
Protected Attributes
• xtsc_router & m_router
Our xtsc_router object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
Implementation of xtsc_respond_if.
Definition at line 1214 of file xtsc_router.h.
Constructor.
Parameters:
router A reference to the owning xtsc_router object.
port_num The port number that this object represents.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_router.h
Implementation of xtsc_respond_if.
#include <xtsc/xtsc_memory_trace.h>Inheritance diagram for xtsc_respond_if_impl:
xtsc_respond_if
xtsc_respond_if_impl
m_respond_impl m_trace
xtsc_request_if xtsc_memory_trace
m_trace m_request_impl
xtsc_request_if_impl
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
• xtsc::u64 m_nb_respond_count
Count the nb_respond calls on each port.
• xtsc::u64 m_rsp_busy_count
Count the nb_respond calls on each port that are rejected (return false).
• xtsc::u64 m_rsp_ok_count
Count the nb_respond calls on each port that are RSP_OK.
• xtsc::u64 m_rsp_nacc_count
Count the nb_respond calls on each port that are RSP_NACC.
• xtsc::u64 m_rsp_data_err_count
Count the nb_respond calls on each port that are RSP_DATA_ERROR.
• xtsc::u64 m_rsp_addr_err_count
Count the nb_respond calls on each port that are RSP_ADDRESS_ERROR.
• xtsc::u64 m_rsp_a_d_err_count
Count the nb_respond calls on each port that are RSP_ADDRESS_DATA_ERROR.
• xtsc::u32 m_address8
Starting byte address.
• sc_dt::sc_unsigned m_data
Data.
• xtsc::u32 m_size8
Byte size of each transfer.
• xtsc::u32 m_route_id
Route ID for arbiters.
• xtsc::u8 m_status
Response status.
• xtsc::u8 m_id
PIF ID.
• xtsc::u8 m_priority
Transaction priority.
• bool m_last_transfer
True if last transfer of response.
• xtsc::u32 m_pc
Program counter associated with request.
• xtsc::u64 m_tag
Unique tag per request-response set.
• bool m_snoop
True if this is a snoop response, otherwise false (future use).
• bool m_snoop_data
True if this is a snoop response with data, otherwise false (future use).
• xtsc::u8 m_coherence
Cache Coherence information.
Implementation of xtsc_respond_if.
Definition at line 937 of file xtsc_memory_trace.h.
Constructor.
Parameters:
object_name The name of this SystemC channel (aka implementation)
trace A reference to the owning xtsc_memory_trace object.
port_num The port number that this object represents.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
See also:
xtsc::xtsc_response::coherence_t
• xtsc_memory_trace.h
Implementation of xtsc_respond_if.
#include <xtsc/xtsc_arbiter.h>Inheritance diagram for xtsc_respond_if_impl:
xtsc_respond_if
xtsc_respond_if_impl
xtsc_debug_if
xtsc_connection_interface
xtsc_request_if
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
m_responses
m_stream_dumper m_response
xtsc_response response_info xtsc_request_if_impl
m_p_nascent_response m_arbiter
stream_dumper m_p_response
m_p_nascent_request m_req_rsp_table m_request_impl
req_rsp_info xtsc_arbiter
m_stream_dumper m_p_first_request_info
m_request
xtsc_request request_info m_requests
m_arbiter_parms
xtsc_parms xtsc_arbiter_parms
m_respond_impl
Protected Attributes
• xtsc_arbiter & m_arbiter
Our xtsc_arbiter object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_respond_if.
Definition at line 1205 of file xtsc_arbiter.h.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_arbiter.h
Implementation of xtsc_respond_if.
#include <xtsc/xtsc_pin2tlm_memory_transactor.h>Inheritance diagram for xtsc_-
respond_if_impl:
xtsc_respond_if
xtsc_respond_if_impl
xtsc_debug_if xtsc_pin2tlm_memory_transactor
m_pin2tlm m_debug_impl
xtsc_debug_if_impl
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
• xtsc::u32 m_port_num
Our port number.
• xtsc::u32 m_busy_port
For DRAM0BS|DRAM1BS, port num of the 0th subbank, otherwise same as m_port_num.
• xtsc::u32 m_bank
Which bank.
Implementation of xtsc_respond_if.
Definition at line 741 of file xtsc_pin2tlm_memory_transactor.h.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_pin2tlm_memory_transactor.h
Implementation of xtsc_respond_if.
#include <xtsc/xtsc_cache.h>Inheritance diagram for xtsc_respond_if_impl:
xtsc_respond_if
xtsc_respond_if_impl
m_request
line_info
m_lines
xtsc_cache_parms
xtsc_parms xtsc_memory_parms m_cache_parms
m_respond_impl xtsc_cache
m_memory_parms xtsc_respond_if_impl
xtsc_respond_if m_cache
m_p_block_read_response
m_p_single_response
m_p_block_write_response
m_stream_dumper xtsc_response
m_p_request stream_dumper
m_filtered_response
m_p_active_response
m_stream_dumper xtsc_fast_access_if
xtsc_request
xtsc_resettable
m_fast_access_object
xtsc_module
xtsc_connection_interface
xtsc_command_handler_interface
xtsc_memory
m_memory
m_p_exclusive_script_stream
m_p_script_stream m_request_impl
xtsc_request_if_impl
xtsc_memory_b
m_filtered_request
m_request xtsc_request_if
m_p_active_request_info
request_info
xtsc_debug_if
Protected Attributes
• xtsc_cache & m_cache
Our xtsc_cache object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_respond_if.
Definition at line 348 of file xtsc_cache.h.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_cache.h
Implementation of xtsc_respond_if.
#include <xtsc/xtsc_dma_engine.h>Inheritance diagram for xtsc_respond_if_impl:
xtsc_respond_if
xtsc_respond_if_impl
m_request
xtsc_dma_engine
m_p_block_read_response
m_p_single_response
m_p_block_write_response
m_stream_dumper xtsc_response
m_filtered_response
m_stream_dumper stream_dumper m_p_active_response
m_p_exclusive_script_stream
xtsc_request m_p_request m_p_script_stream
xtsc_script_file
m_p_initial_value_file
xtsc_memory_b m_p_memory
m_filtered_request
m_request
m_memory_parms
xtsc_parms xtsc_memory_parms xtsc_memory m_request_impl
m_p_active_request_info
m_memory xtsc_request_if_impl
request_info
m_fast_access_object
xtsc_fast_access_if
xtsc_connection_interface
xtsc_module
xtsc_request_if
xtsc_resettable
xtsc_command_handler_interface
xtsc_debug_if
Protected Attributes
• xtsc_dma_engine & m_dma
Our xtsc_dma_engine object.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_respond_if.
Definition at line 472 of file xtsc_dma_engine.h.
See also:
xtsc::xtsc_respond_if
Implements xtsc_respond_if.
The documentation for this class was generated from the following file:
• xtsc_dma_engine.h
Class representing a PIF, XLMI, local memory, or inbound PIF response transfer.
#include <xtsc/xtsc_response.h>Collaboration diagram for xtsc_response:
xtsc_response
m_p_response m_stream_dumper
stream_dumper
Classes
• class stream_dumper
Helper class to make it easy to dump xtsc_response to an ostream with or without data
values.
Public Types
• enum status_t {
RSP_OK = 0,
RSP_ADDRESS_ERROR = 1,
RSP_DATA_ERROR = 2,
RSP_ADDRESS_DATA_ERROR = 3,
RSP_NACC = 4 }
Enumeration used to identify bus errors and busy information.
• enum coherence_t {
EXCLUSIVE = 0,
MODIFIED = 1,
SHARED = 2,
INVALID = EXCLUSIVE,
NONCOHERENT = EXCLUSIVE,
LAST = SHARED }
Enumeration used to identify cache coherence information.
• u8 get_id () const
Get the PIF ID.
• u8 get_priority () const
Get the priority.
• u8 ∗ get_buffer ()
Get a pointer to the response’s transfer data suitable either for reading or writing the data.
Private Attributes
• xtsc_address m_address8
Starting byte address (artificial).
• u8 m_buffer [xtsc_max_bus_width8]
Data for READ, BLOCK_READ, BURST_READ, RCW, and SNOOP.
• u32 m_size8
Byte size of each transfer (artificial).
• u32 m_route_id
Route ID for arbiters.
• status_t m_status
Response status.
• u8 m_id
PIF ID.
• u8 m_priority
Transaction priority.
• bool m_last_transfer
True if last transfer of response.
• bool m_snoop
True if this is a snoop response, otherwise false.
• bool m_snoop_data
True if this is a snoop response with data, otherwise false.
• bool m_exclusive_req
True if this response is for an exclusive access request.
• bool m_exclusive_ok
True if the exclusive access request was successful.
• coherence_t m_coherence
Cache Coherence information.
• xtsc_address m_pc
• void ∗ m_user_data
Arbitrary data supplied by user.
• u64 m_tag
Unique tag per request-response set (artificial).
Class representing a PIF, XLMI, local memory, or inbound PIF response transfer. The
general 2-step procedure to create a response is:
See also:
xtsc_respond_if
xtsc_request_if
xtsc_request
xtsc_core::Information_on_memory_interface_protocols.
xtsc_component::xtsc_arbiter
xtsc_component::xtsc_dma_engine
xtsc_component::xtsc_master
xtsc_component::xtsc_mmio
xtsc_component::xtsc_memory
xtsc_component::xtsc_router
xtsc_component::xtsc_slave
Enumeration used to identify cache coherence information. Note: Reserved for future use
Enumerator:
RSP_OK 0 => Okay
RSP_ADDRESS_ERROR 1 => Address error
RSP_DATA_ERROR 2 => Data error
RSP_ADDRESS_DATA_ERROR 3 => Address and data error
RSP_NACC 4 => Transaction not accepted (busy)
Enumeration used to identify cache coherence information. Note: Reserved for future
use
Enumerator:
EXCLUSIVE PIF: May Be Exclusive, Snoop: Invalid, also PIF: Non-coherent request.
Parameters:
request The request that this response is in response to.
status The response status. See status_t.
last_transfer True if this is the last transfer of the response sequence, otherwise false.
For READ, WRITE, BLOCK_WRITE, BURST_WRITE, and RCW, this is always
true. For BLOCK_READ, BURST_READ, and SNOOP, this is false except for last
response transfer in the sequence of BLOCK_READ, BURST_READ, or SNOOP
response transfers.
Get the starting byte address. The starting byte address is determined from the xtsc_-
request object used to create this response and it cannot be changed.
Note: This address does not change for multiple BLOCK_READ, BURST_READ, or
SNOOP responses.
Note: For BLOCK_WRITE responses this address is the beginning address of the block.
Note: Snoop is reserved for future use.
Definition at line 109 of file xtsc_response.h.
Get the number of bytes of data in this response’s buffer. This is an artificial field (i.e. not
in real hardware) used for logging/debugging.
Definition at line 116 of file xtsc_response.h.
See also:
status_t
See also:
status_t
Parameters:
status The status whose c-string is desired.
Parameters:
last_transfer True if this is the last transfer of the response sequence, otherwise false.
For READ, WRITE, BLOCK_WRITE, BURST_WRITE, and RCW, this is always
true. For BLOCK_READ, BURST_READ, and SNOOP, this is false except for last
response transfer in the sequence of BLOCK_READ, BURST_READ, or SNOOP
response transfers.
See also:
set_last_transfer
Return true if this is a snoop response, else return false;. Note: Snoop is reserved for
future use.
Definition at line 177 of file xtsc_response.h.
Parameters:
snoop_data True if this is a snoop response AND it has data.
Return true if this is a snoop response with data, else return false.
See also:
set_snoop_data
Parameters:
coherence The coherence information of this response.
See also:
set_coherence
Set the processor program counter (PC) associated with this request.
Parameters:
pc The PC associated with this request. If no meaningful PC can be associated with
the request use 0xFFFFFFFF. This signal is not in the hardware, but is provided
for debugging and logging purposes.
Get the processor program counter (PC) associated with this request.
See also:
set_pc
Parameters:
route_id Arbiters add bits to the route ID of the corresponding xtsc_request to be able
to route the return response. Terminal devices must echo this field back verbatim
in the response (this is taken care of automatically in the constructor, so terminal
devices do not need to call this method). On the return, an arbiter should clear
its bit field in the route ID of the response before forwarding the response back
upstream. The result should be that the route ID in the response that the arbiter
sends upstream should match the route ID in the original request received by the
arbiter.
See also:
xtsc_request::set_route_id()
See also:
set_route_id
Parameters:
id The PIF ID. Terminal devices must echo this field back verbatim in the response
(this is taken care of automatically in the constructor, so terminal devices typically
do not need to call this method). Master devices are free to use this field to
support multiple outstanding PIF requests.
See also:
set_id
Set the priority. Hardware only supports priority values of 0-3 (i.e. 2 bits).
Value Meaning
----- -------
0 Low
1 Medium low
2 Medium high
3 High
The Xtensa LX processor issues all PIF requests at medium-high (2) priority and ignores
the priority bits of PIF responses. For responses to inbound PIF requests, the Xtenasa LX
processor sets the response priority equal to the request priority. Default = The priority in
the request used to create this response.
Definition at line 302 of file xtsc_response.h.
See also:
set_priority
Set the response’s transfer buffer (payload). Used only for READ, BLOCK_READ,
BURST_READ, RCW, and SNOOP. Data is arranged in the buffer as follows: Let address8
be the address returned by xtsc_request::get_byte_address(). Let size8 be the transfer
size returned by xtsc_response::get_byte_size().
Get a pointer to the response’s transfer data suitable for reading (but not writing) the data.
Used only for READ, BLOCK_READ, BURST_READ, RCW, and SNOOP.
See also:
set_buffer()
Get a pointer to the response’s transfer data suitable either for reading or writing the data.
Used only for READ, BLOCK_READ, BURST_READ, RCW, and SNOOP.
The buffer size is 64 bytes to accommodate the widest possible Xtensa memory interface;
however, you should only use the first N bytes where N is the size of the actual memory
interface in use.
Warning: Writing past the 64th byte results in undefined bad behavior.
Note: Snoop is reserved for future use.
See also:
set_buffer()
Set optional user data associated with this response. Note: User data is neither readable
nor writable by Xtensa Ld/St/iFetch operations.
Note: The default user data in the response is obtained from the user data of the request
from which the response was formed.
Parameters:
user_data Optional user data.
See also:
set_user_data
Return a string suitable for logging containing bytes from the optional user data associated
with this response.
Parameters:
num_bytes If 0, an empty string is returned. If non-zero, the returned string will begin
with prefix and end with suffix. If positive and m_user_data is not 0 (NULL),
the bytes are taken from the memory pointed to by the user data pointer (user
discretion is advised). If positive and m_user_data is 0, then return string consists
only of the prefix and suffix. If negative, the least significant -num_bytes bytes are
obtained from the user data pointer itself, as shown here:
0xFFFFFFFF or -1: ((u64)p_user_data & 0x00000000000000FF)
0xFFFFFFFE or -2: ((u64)p_user_data & 0x000000000000FFFF)
0xFFFFFFFD or -3: ((u64)p_user_data & 0x0000000000FFFFFF)
0xFFFFFFFC or -4: ((u64)p_user_data & 0x00000000FFFFFFFF)
0xFFFFFFFB or -5: ((u64)p_user_data & 0x000000FFFFFFFFFF)
0xFFFFFFFA or -6: ((u64)p_user_data & 0x0000FFFFFFFFFFFF)
0xFFFFFFF9 or -7: ((u64)p_user_data & 0x00FFFFFFFFFFFFFF)
0xFFFFFFF8 or -8: ((u64)p_user_data & 0xFFFFFFFFFFFFFFFF)
See also:
set_user_data
get_user_data
See also:
set_exclusive_ok
get_exclusive_ok
Parameters:
ok True if the exclusive access request succeeded.
See also:
set_exclusive_ok
Get this response’s tag. This is an artificial number (not in hardware) useful for correlating
requests and responses in, for example, a log file. For READ and WRITE, the tag is the
same for a request and its corresponding response. For BLOCK_WRITE and BURST_-
WRITE, the tag is the same for all request transfers and the single response transfer of the
BLOCK_WRITE or BURST_WRITE sequence. For BLOCK_READ, BURST_READ, and
SNOOP, the tag is the same for the single request transfer and all the response transfers in
the block. For RCW, the tag is the same for both request transfers and the single response
transfer. A request that gets RSP_NACC maintains the same tag when the request is
repeated.
Note: Snoop is reserved for future use.
Definition at line 458 of file xtsc_response.h.
This method dumps this response’s info to the specified ostream object, optionally including
data (if applicable). The format of the output is:
Where:
<Tag> is m_tag in decimal.
<PC> is m_pc in hexadecimal.
<Status> is RSP_OK|RSP_ADDRESS_ERROR|RSP_DATA_ERROR|
RSP_ADDRESS_DATA_ERROR|RSP_NACC.
* indicates m_last_transfer is true.
<Address> is m_address8 in hexadecimal.
<Coherence> is m_coherence in decimal.
<ID> is m_id in decimal.
<E> is the letter "E" if m_exclusive_ok is true, else is null (not
present).
<Data> is a colon followed by the contents of m_buffer in
hexadecimal (without leading '0x'). This field is only present
if dump_data is true AND m_status is RSP_OK AND m_size8 is non-
zero (indicating this is a response to a READ, BLOCK_READ,
BURST_READ, or RCW request or that m_snoop_data is true).
<UD> is m_user_data (in hex with leading '0x') if non-zero. If
m_user_data is 0, then this field is not present.
Parameters:
os The ostream object to which the info should be dumped.
dump_data If true and the response has data, then the response’s buffer contents
are dumped. Otherwise, the buffer is not dumped.
• xtsc_response.h
Example XTSC module implementing a router on a PIF network or local memory intercon-
nect.
#include <xtsc/xtsc_router.h>Inheritance diagram for xtsc_router:
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_router
xtsc_debug_if
xtsc_request_if
xtsc_script_file
m_file
xtsc_parms xtsc_router_parms
m_router_parms
m_router xtsc_request_if_impl
xtsc_resettable xtsc_module
m_request_impl
xtsc_connection_interface xtsc_command_handler_interface
xtsc_router m_respond_impl
m_filtered_response
m_response response_info
m_p_nascent_response m_req_rsp_table xtsc_respond_if
xtsc_response
m_p_response
m_p_nascent_request req_rsp_info
m_p_first_request_info
m_stream_dumper
stream_dumper m_stream_dumper
m_request
xtsc_request request_info
m_requests
m_filtered_request
Classes
• struct bit_field_info
• class req_rsp_info
Information for PIF width converter (PWC) mode.
• class request_info
Information about each request.
• class response_info
Information about each response.
• class watchfilter_info
Information about each watchfilter.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• SC_HAS_PROCESS (xtsc_router)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
• xtsc::u32 get_num_slaves ()
Get the number of memory interface slaves that can be connected with this xtsc_router
(this is the number of memory interface master port pairs that this xtsc_router has).
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void end_of_simulation ()
• log4xtensa::TextLogger & get_text_logger ()
Get the TextLogger for this component (e.g. to adjust its log level).
Public Attributes
• sc_core::sc_export< xtsc::xtsc_request_if > m_request_export
From single master to us.
Protected Types
• typedef struct xtsc_component::xtsc_router::bit_field_info bit_field_info
• void compute_delays ()
Common method to compute/re-compute time delays.
• void reset_fifos ()
Reset internal fifos.
Protected Attributes
• xtsc_request_if_impl m_request_impl
m_request_export binds to this
• xtsc_respond_if_impl ∗∗ m_respond_impl
m_respond_exports bind to these
• xtsc_router_parms m_router_parms
Copy of xtsc_router_parms.
• bool m_is_pwc
True if acting as a PIF width converter.
• bool m_use_block_requests
PWC: From "use_block_requests" parameter.
• xtsc::u32 m_master_byte_width
PWC: From "master_byte_width" parameter.
• xtsc::u8 m_next_slot
PWC: Next slot to test for availability.
• xtsc::u8 m_pending_request_id
PWC: New ID of pending multi-request (when != m_num_slots).
• xtsc::u8 m_active_block_read_id
PWC: ID of BLOCK_READ request while responses are active.
• xtsc::u32 m_num_slaves
The number of slaves (master port pairs).
• bool m_waiting_for_nacc
True if waiting for RSP_NACC from slave.
• bool m_request_got_nacc
True if active request got RSP_NACC from slave.
• bool m_prev_last_transfer
Last transfer flag of most recent previous accepted request.
• bool m_lock
Lock response arbiter for multiple response sequences.
• xtsc::u32 m_token
For arbitrating responses.
• xtsc::u32 m_default_port_num
If address is not in routing table, send req here.
• xtsc::u32 m_default_delta
Default address translation delta.
• bool m_read_only
From "read_only" parameter.
• bool m_write_only
From "write_only" parameter.
• bool m_log_peek_poke
From "log_peek_poke" parameter.
• bool m_interleave_responses
From "interleave_responses" parameter.
• bool m_flexible_request_id
From "flexible_request_id" parameter.
• sc_core::sc_time m_clock_period
This router’s clock period.
• bool m_delay_from_receipt
True if delay starts upon request receipt.
• bool m_immediate_timing
True if no delay (not even a delta cycle).
• sc_core::sc_time m_last_request_time_stamp
Time last request was sent out.
• sc_core::sc_time m_last_response_time_stamp
Time last response was sent out.
• sc_core::sc_time m_recovery_time
See "recovery_time" in xtsc_router_parms.
• sc_core::sc_time m_request_delay
See "request_delay" in xtsc_router_parms.
• sc_core::sc_time m_read_delay
See "read_delay" in xtsc_router_parms.
• sc_core::sc_time m_write_delay
See "write_delay" in xtsc_router_parms.
• sc_core::sc_time m_nacc_wait_time
See "nacc_wait_time" in xtsc_router_parms.
• sc_core::sc_time m_response_delay
See "response_delay" in xtsc_router_parms.
• sc_core::sc_time m_response_repeat
See "response_repeat" in xtsc_router_parms.
• bool m_address_routing
True if "address_routing_bits" is non-empty.
• xtsc::u32 m_num_bit_fields
Number of address routing bit field pairs.
• xtsc::u32 m_address_routing_turbo_mask
Address mask from routing bits lsb for TurboXim nb_fast_access.
• xtsc::u32 m_address_routing_turbo_size
2∧ lsb for TurboXim nb_fast_access
• std::string m_lua_port_function
From <LuaPortFunction> in lua_function line of "routing_table" file.
• std::string m_lua_addr_function
From <LuaAddrFunction> in lua_function line of "routing_table" file.
• bool m_lua_function
True if there was a lua_function line in "routing_table" file.
• bool m_use_route_by_priority
True if "route_by_priority" is non-empty.
• std::string m_route_by_type
See "route_by_type" in xtsc_arbiter_parms.
• bool m_use_route_by_type
True if "route_by_type" was specified.
• sc_core::sc_event m_router_thread_event
To notify router_thread when a request is accepted.
• sc_core::sc_event m_response_arbiter_thread_event
To notify response_arbiter_thread.
• std::string m_file_name
Routing table file name from "routing_table".
• xtsc::xtsc_script_file ∗ m_file
Pointer to routing table file.
• std::string m_line
Current line of routing table file.
• xtsc::u32 m_line_count
Current line number in routing table file.
• bool m_filter_peeks
True if m_peek_watchfilters is non-empty.
• bool m_filter_pokes
True if m_poke_watchfilters is non-empty.
• bool m_filter_requests
True if m_request_watchfilters is non-empty.
• bool m_filter_responses
True if m_response_watchfilters is non-empty.
• xtsc::xtsc_request m_filtered_request
Copy of most recent previous filtered xtsc_request.
• xtsc::xtsc_response m_filtered_response
Copy of most recent previous filtered xtsc_response.
• bool m_profile_buffers
See "profile_buffers" in xtsc_router_parms.
• xtsc::u32 m_max_num_requests
The maximum available items in request_fifo.
• sc_core::sc_time m_max_num_requests_timestamp
Time when the max request buffer happened.
• xtsc::u64 m_max_num_requests_tag
Tag of max buffered item in request_fifo.
• xtsc::u32 ∗ m_max_num_responses
The maximum available items in response_fifos.
• sc_core::sc_time ∗ m_max_num_responses_timestamp
Time when the max response buffers happened.
• xtsc::u64 ∗ m_max_num_responses_tag
Tag of max buffered items in response_fifos.
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
Example XTSC module implementing a router on a PIF network or local memory inter-
connect. This module allows a memory interface master (for example, an xtsc_core) to
be connected with multiple memory interface slaves (for example, multiple xtsc_memory,
xtsc_router, and xtsc_arbiter objects).
It can be configured to have only one memory interface slave. This can be useful to filter
out unwanted address ranges so the slave never sees them or to introduce a simple delay
device.
It can also be configured to have no memory interface slaves. In this "null router" capacity,
it either discards all requests or responds with RSP_ADDRESS_ERROR to all requests
(depending upon the "default_port_num" parameter).
Typically, the routing that this device performs is configured by specifying a routing table file
using the "routing_table" parameter. The "routing_table" allows specifying a fixed routing
table, or a dynamic routing table (using Lua), or a combination of both. Other means of
defining the routing include:
• Using the "address_routing_bits" parameter to define the routing based on bit field(s)
of the address.
• Using only the high order bits of the address by NOT specifying "route_by_type",
"address_routing_bits", and "routing_table" and leaving "default_routing" true.
If desired this router can be used as a PIF width converter (PWC) by setting the "master_-
byte_width" parameter to indicated the byte width of the upstream PIF master and by setting
the "slave_byte_widths" parameter to indicate the byte width of each downstream PIF slave.
Limitations of PIF Width Convertor:
• Critical word first BLOCK_READ transactions are not supported (i.e. for BLOCK_-
READ requests, the start address must be aligned to the total transfer size, not just
the bus width).
• When going from a wide master to a narrow slave if an incoming BLOCK_READ re-
quest requires multiple outgoing BLOCK_READ requests then the downstream sys-
tem must return all the BLOCK_READ responses in the order the requests were sent
out and without any intervening responses to other requests.
Typically, this module is used as a clocked router on a PIF network (so that routing trans-
actons consumes 1 or more clock periods), but it is also possible to use it as an un-
clocked (asynchronous) multiplexor on a PIF, local memory, or XLMI interconnect by setting
"immediate_timing" to true.
Here is a block diagram of the system used in the xtsc_router example:
(*router.m_respond_exports[0])
(*router.m_request_ports[0])
(router.m_request_export)
router.m_respond_port
nb_respond()
nb_request()
xtsc_memory sysrom
routing.tab nb_request()
xtsc_memory sysram
nb_respond()
(*router.m_request_ports[1])
core0.get_request_port("pif")
(*sysram.m_request_exports[0])
(*sysram.m_respond_port[0])
(*router.m_respond_exports[1])
(core0.get_respond_export("pif"))
Here is the code to connect the system using the xtsc::xtsc_connect() method:
And here is the code to connect the system using manual SystemC port binding:
core0.get_request_port("pif")(router.m_request_export);
router.m_respond_port(core0.get_respond_export("pif"));
(*router.m_request_ports[0])(*sysrom.m_request_exports[0]);
(*sysrom.m_respond_ports[0])(*router.m_respond_exports[0]);
(*router.m_request_ports[1])(*sysram.m_request_exports[0]);
(*sysram.m_respond_ports[0])(*router.m_respond_exports[1]);
See also:
xtsc_router_parms
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
xtsc::xtsc_core::How_to_do_port_binding
Parameters:
module_name Name of the xtsc_router sc_module.
router_parms The remaining parameters for construction.
See also:
xtsc_router_parms
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
7.140.3.2 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
change_clock_period <ClockPeriodFactor>
Call xtsc_router::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this router.
dump_filtered_request
Dump the most recent previous xtsc_request that passed a xtsc_request
watchfilter.
dump_filtered_response
Dump the most recent previous xtsc_response that passed a xtsc_response
watchfilter.
dump_profile_results
Dump max used buffers for request and response fifos.
dump_transaction_id_counts [<Verbose>]
Return the buffer from calling dump_transaction_id_counts(<Verbose>).
<Verbose> may be 0|1 (default is 0).
reset
Call xtsc_router::reset().
watchfilter_dump
Return xtsc_router::watchfilter_dump().
watchfilter_remove <Watchfilter> | *
Return xtsc_router::watchfilter_remove(<Watchfilter>). An * removes all
watchfilters.
Implements xtsc_command_handler_interface.
Connect with an upstream xtsc_arbiter. This method connects the master port pair of the
specified xtsc_arbiter to the slave port pair of this xtsc_router.
Parameters:
arbiter The upstream xtsc_arbiter to connect with.
Connect with an upstream or downstream (inbound pif) xtsc_core. This method connects
this xtsc_router with the memory interface specified by memory_port_name of the specified
xtsc_core. If memory_port_name is "inbound_pif" or "snoop" then the master port pair of
this xtsc_router specified by port_num is connected with the inbound pif or snoop slave port
pair of core. If memory_port_name is neither "inbound_pif" nor "snoop" then the master
port pair of the memory interface of core specified by memory_port_name is connected
with the slave port pair of this xtsc_router.
Parameters:
core The xtsc_core to connect with.
memory_port_name The name of the memory interface of the xtsc_core to connect
with. Case-insensitive.
port_num This specifies which master port pair of this xtsc_router to connect with
the inbound pif or snoop slave port pair of core. This parameter is ignored un-
less memory_port_name is "inbound_pif" or "snoop". If memory_port_name is
"inbound_pif" or "snoop", then this parameter must be explicitly set and must be
in the range of 0 to this xtsc_router’s "num_slaves" parameter minus 1.
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of valid memory_port_-
name values.
Connect with an upstream xtsc_dma_engine. This method connects the master port pair
of the specified xtsc_dma_engine with the slave port pair of this xtsc_router.
Parameters:
dma_engine The xtsc_dma_engine to connect with this xtsc_router.
Connect with an xtsc_master. This method connects the master port pair of the specified
xtsc_master with the slave port pair of this xtsc_router.
Parameters:
master The xtsc_master to connect with this xtsc_router.
Connect with an upstream xtsc_memory_trace. This method connects the specified master
port pair of the specified upstream xtsc_memory_trace with the slave port pair of this xtsc_-
router.
Parameters:
memory_trace The upstream xtsc_memory_trace to connect with this xtsc_router.
port_num The master port pair of the upstream xtsc_memory_trace to connect with
this xtsc_router. port_num must be in the range of 0 to the upstream xtsc_-
memory_trace’s "num_ports" parameter minus 1.
Connect to an upstream xtsc_router. This method connects the specified master port of
the specified upstream xtsc_router to the slave port of this xtsc_router.
Parameters:
router The upstream xtsc_router to connect to.
port_num The master port of the upstream xtsc_router to connect to. port_num must
be in the range of 0 to the upstream xtsc_router’s "num_slaves" parameter minus
1.
Parameters:
pin2tlm The upstream xtsc_pin2tlm_memory_transactor to connect with this xtsc_-
router.
port_num The TLM master port pair of the upstream xtsc_pin2tlm_memory_-
transactor to connect with this xtsc_router. port_num must be in the range of
0 to the upstream xtsc_pin2tlm_memory_transactor’s "num_ports" parameter mi-
nus 1.
Parameters:
tlm22xttlm The upstream xtsc_tlm22xttlm_transactor to connect with this xtsc_router.
port_num The TLM master port pair of the upstream xtsc_tlm22xttlm_transactor to
connect with this xtsc_router. port_num must be in the range of 0 to the upstream
xtsc_tlm22xttlm_transactor’s "num_ports" parameter minus 1.
Parameters:
filter_name The filter instance name. The actual xtsc::xtsc_filter object will be ob-
tained via a call to xtsc::xtsc_filter_get. Its kind must be one of "xtsc_peek",
"xtsc_poke", "xtsc_request", or "xtsc_response".
event The sc_event to notify when a nb_peek, nb_poke, nb_request, or nb_response
(as appropriate) occurs whose payload and port passes the filter.
Returns:
the watchfilter number (use to remove the watchfilter).
See also:
watchfilter_remove
xtsc::xtsc_filter
xtsc::xtsc_filter_get
Parameters:
os The ostream object to which the watchfilters should be dumped.
See also:
watchfilter_add
xtsc::xtsc_filter
Parameters:
watchfilter The number returned from a previous call to watchfilter_add. A -1
(0xFFFFFFFF) means to remove all watchfilters on this xtsc_router instance.
Returns:
the number (count) of watchfilters removed.
See also:
watchfilter_add
xtsc::xtsc_filter
Parameters:
os The ostream object to which the profile results should be dumped.
This method determines the port number to associate with the specified address. It also
modifies the specified address if address translation is in effect. Sub-classes can override
this method to use their own routing and address translation algorithms.
Parameters:
address8 The address to look up in the routing table or routing algorithm. This method
should change the value of address8 as required by any address translation in
effect.
Returns:
the port number or DISCARD_REQUEST or ADDRESS_ERROR.
Get the port based on the transaction type. This method is used in lieu of get_port_and_-
apply_address_translation() when "route_by_type" is specified.
Parameters:
os The ostream object to which the dump should be done. Format is: <Port>
<Transaction id>=""> <OutstandingCount>
verbose If true, transaction ID’s are shown even if their outstanding count is 0.
Returns:
total of all outstanding counts (should be 0 at end_of_simulation)
The documentation for this class was generated from the following file:
• xtsc_router.h
xtsc_parms
xtsc_router_parms
xtsc_parms
xtsc_router_parms
"slave_byte_widths" vector<u32> The byte width of the data interface of each PIF
slave. Typically, this and the "master_byte_width"
parameters are left unset and xtsc_router does not
concern itself with the byte width of the data interface
(it just forwards requests and responses and leaves it
to the upstream master and downstream slaves to have
matching data interface byte widths). If desired when
modeling a PIF interface, this parameter can be set to
indicate the byte widths of each PIF slave (in this case
the "master_byte_width" parameter must also be set to
indicate the byte width of the upstream PIF master) and
the xtsc_router will act as a PIF width convertor (PWC)
to ensure that each request sent out on a request port
has the byte width to match the downstream slave and
that each response sent out on the response port has a
byte width to match the upstream master. If this
parameter is set then "immediate_timing" must be false.
If this parameter is set then it must contain exactly
"num_slaves" entries.
Valid entry values are 4|8|16.
Default = <empty>
"master_byte_width" u32 The data interface byte width of the upstream master.
Typically, this parameter should be left at its default
value of 0; however, if either the "slave_byte_widths"
or "address_routing_bits" parameter is set then this
parameter must be set to a non-zero value to indicate
the byte width of the upstream master.
Valid non-default values are 4|8|16 when acting as a
PIF width converter (when "slave_byte_widths" is set)
and 4|8|16|32|64 when "address_routing_bits" is set.
Default = 0.
"use_block_requests" bool This parameter is only used when acting as a PIF width
converter (i.e. when the "slave_byte_widths" parameter
is set). By default, the downstream request type is the
same as the upstream request type. If this parameter is
set to true when acting as a PIF width converter, then
an upstream WRITE|READ request which has all byte lanes
#lua_beg
function get_port(addr)
-- print("addr=" .. string.format("0x%08x", addr))
return math.floor(addr/0x01000000) % 16
end
#lua_end
lua_function get_port
//<PortNum> <LowAddr> <HighAddr> <NewBaseAddr>
0 0x00000000 0xBFFFFFFF
0 0xD0000000 0xFFFFFFFF
Default = NULL.
"default_port_num" u32 The port number to send requests to when the request's
address is not in the routing table. Two values have
special meaning. If "default_port_num" is
DISCARD_REQUEST (0xFFFFFFFF) then the request is logged
and discarded. If "default_port_num" is ADDRESS_ERROR
(0xFFFFFFFE) then the request is logged and an
RSP_ADDRESS_ERROR response is sent to the upstream
master. To cause an exception to be thrown for a
request address that is not in the routing table, set
this parameter to any number other than the two special
values that is greater than of equal to "num_slaves"
(e.g. 0xbad1bad1).
Default = ADDRESS_ERROR.
value:
"slave_byte_widths"
"master_byte_width"
"use_block_requests"
"default_routing"
"route_by_priority"
"routing_table"
"default_delta"
"default_port_num"
"address_routing_bits"
If desired, the "immediate_timing" parameter can be set
to true to prevent the xtsc_router from consuming
simulation cycles.
Default = NULL.
Examples:
<RouteByType> Description
-------------------- -------------------------------------------------------
read;write All nb_requests() of type READ, BLOCK_READ, BURST_READ,
RCW1, and SNOOP as well as nb_fast_access() and
nb_load_retired() go out port 0. All nb_requests() of
type WRITE, BLOCK_WRITE, BURST_WRITE, and RCW2 go out
port 1.
read,write;rcw Everything goes out port 0 except RCW which goes out
port 1.
Note: When specifying "route_by_type" on the Linux
command line, any semi-colon will require escaping or
quoting. For example:
./xtsc_router -route_by_type="read;write"
"immediate_timing" bool If true, the above timing parameters are ignored and
the router model forwards all requests and responses
immediately (without any delay--not even a delta
"response_fifo_depth" u32 The depth of the response fifos (each memory interface
slave has its own response fifo).
Default = 2.
"profile_buffers" bool If true, the xtsc_router class keeps the track of used
buffers for its internal request and response fifos. At
the end of the simulation, the maximum used buffer and
the first time that the max buffer has been reached are
printed in the output log file at NOTE level. This
information is printed for each request and response fifo
separately.
Default = false.
See also:
xtsc_router
xtsc::xtsc_parms
Parameters:
num_slaves The number of memory interface slaves controlled by the memory inter-
face master. A value of 1 (the default) can be used to cause the router to act like a
simple pass-through delay and/or address-translation device. A value of 0 can be
used to cause the the router to be a terminal device that either discards or rejects
all requests (depending upon default_port_num).
default_routing If true, the xtsc_router base class determines the sematics of
routing_table. If false, an xtsc_router sub-class will determine semantics of
routing_table.
routing_table Information used to create routing table. The xtsc_router class or sub-
class (depending upon default_routing) defines the semantics of this information.
default_port_num The port number to send requests to when the request’s address
is not in the routing table. Default is to reject the request by responding with
RSP_ADDRESS_ERROR.
• xtsc_router.h
See also:
xtsc_sc_out_sc_bv_base_adapter
xtsc_sc_in_sc_bv_base_adapter_base::m_sc_export
xtsc_sc_in_sc_bv_base_adapter_base::m_sc_in
xtsc_core::get_input_pin()
• xtsc.h
Public Attributes
• sc_core::sc_export< sc_core::sc_signal_in_if< sc_dt::sc_bv_base > > m_sc_export
Protected Attributes
• sc_dt::sc_bv_base m_value
Base class for converting an sc_in<T> to an sc_in<sc_bv_base>. Note: This class is not
used directly, instead use xtsc_sc_in_sc_bv_base_adapter.
Definition at line 2376 of file xtsc.h.
The documentation for this class was generated from the following file:
• xtsc.h
See also:
xtsc_sc_out_sc_uint_base_adapter
xtsc_sc_in_sc_uint_base_adapter_base::m_sc_export
xtsc_sc_in_sc_uint_base_adapter_base::m_sc_in
• xtsc.h
Public Attributes
• sc_core::sc_export< sc_core::sc_signal_in_if< sc_dt::sc_uint_base > > m_sc_-
export
Bind the sc_in<sc_uint_base> to here.
Protected Attributes
• sc_dt::sc_uint_base m_value
The documentation for this class was generated from the following file:
• xtsc.h
bool
sc_logic
sc_lv<W>
sc_bv<W>
sc_uint<W>
sc_biguint<W>
unsigned long long
unsigned long
unsigned int
unsigned short
unsigned char
As an example, assume you have two xtsc_core objects. The first is called core0 and
it has a 50-bit TIE export state called "TIE_status" which has been enabled for pin-level
access. The second is called core1 and it has a 50-bit TIE import wire called "TIE_control"
which has been enabled for pin-level access. The following code snippet can be use to
connect these two TIE ports together using two adapters, called status and control, and an
sc_signal<sc_uint<50>>, called core0_to_core1:
Note: These core interfaces can (and typically should) be connected directly without the
use of adapters and an sc_signal. This example is contrived just to illustrate construct-
ing and connecting these adapters. Please consult the xtsc-run documentation and the
cosim sub-directories in the XTSC examples directory for realistic uses of these adapters
to cosimulate XTSC with Verilog.
core0.get_output_pin("TIE_status")(status.m_sc_export);
status.m_sc_out(core0_to_core1);
core1.get_input_pin("TIE_control")(control.m_sc_export);
control.m_sc_in(core0_to_core1);
See also:
xtsc_sc_out_sc_bv_base_adapter_base::m_sc_export
xtsc_sc_out_sc_bv_base_adapter_base::m_sc_out
xtsc_sc_in_sc_bv_base_adapter
xtsc_core::get_output_pin()
• xtsc.h
Public Attributes
Protected Attributes
• sc_dt::sc_bv_base m_value
Base class for converting an sc_out<sc_bv_base> to sc_out<T>. Note: This class is not
used directly, instead use xtsc_sc_out_sc_bv_base_adapter.
• xtsc.h
Note: Please consult the xtsc-run documentation and the cosim sub-directories in the
XTSC examples directory for uses of this adapter to cosimulate XTSC with Verilog.
See also:
xtsc_sc_out_sc_uint_base_adapter_base::m_sc_export
xtsc_sc_out_sc_uint_base_adapter_base::m_sc_out
xtsc_sc_in_sc_uint_base_adapter
• xtsc.h
Public Attributes
Protected Attributes
• sc_dt::sc_uint_base m_value
• xtsc.h
Public Types
• ∼xtsc_script_file ()
Destructor.
• std::string name ()
Return name (for HERE file this returns "HERE_FILE#N").
• void reset ()
Reset script file to the beginning and start over.
• u32 get_words (std::vector< std::string > &words, std::string &line, bool down-
shift=false, std::string ∗p_file=NULL)
Get the next line from the file broken into words.
Private Attributes
• u32 m_active_line_count
• std::string m_script_file_name
• std::string m_parm_name
• std::string m_name
• std::string m_type
• bool m_wraparound
• bool m_skipping_comment
• bool m_skipping_pound_cond
• char m_line_cont_char
• bool m_here_file
• u32 m_here_file_line_num
• vector_string m_here_file_content
• set_string m_macros
• map_string_string m_alias_macros
• map_string_string ∗ m_p_macros
• u32 m_file_depth
• vector_bool m_in_pound_cond
• vector_bool m_found_true_cond
• vector_bool m_found_pound_else
• vector_u32 m_line_number
• vector_string m_file_name
• vector_string m_file_path
• vector_ifstream m_file
• lua_State ∗ m_lua
• lua_State ∗ m_lua_cor
• bool m_use_lua_snippet
• u32 m_lua_line_number
• u32 m_lua_beg_line
• std::string m_whitespace
Utility class for handling a script-style file. This utility class provides a wrapper for handling
a script-style file.
The get_words() method can be used to get the next non-blank, non-comment line from
the file tokenized into words (as a vector of strings).
The getline() method can be used to get the next non-blank, non-comment line from the file
as a string.
The handling of an xtsc_script_file includes a pseudo-preprocessor:
• C and C++ style comments are never returned by the get_words() and getline() meth-
ods.
• A "#define <Identifier>" line defines a simple macro (a simple macro is a macro that
is defined but that doesn’t contain a value and should be contrasted with an alias
macro, see below, that does contain a value). <Identifier> must be a legal C/C++
identifier. The line itself is never returned by the get_words() and getline() methods.
macro preceeded by a dollar sign and opening parenthesis and followed by a closing
parenthesis. Each occurrence is replaced verbatim by the corresponding <String> if
it is an alias macro or by an empty string if it is a simple macro. For example, a script
file consisting only of the following two lines will result in the single line "Hello World"
being returned by the getline() method:
#define entity=World
Hello $(entity)
Note: On preprocessor lines (lines beginning with #), a sub-string in the format
"$(<Identifier>)" where <Identifier> is not a defined macro will be removed (i.e. treated
like <Identifier> is a macro aliased to the empty string). On non-preprocessor lines, no
substitution takes place if the <Identifier> is not a defined macro. If substitution is desired,
then place code similiar to the following earlier in the script file:
#ifndef MY_MACRO
#define MY_MACRO
#endif
• A "#define <Identifier> <Text>" line also defines an alias macro. <Text> can be any
non-blank text that does not contain an equal sign (=). Leading and trailing spaces
are stripped from <Text>, but embedded spaces are left in place. For example, a
script file consisting only of the following two lines will result in the single line "Hello
World" being returned by the getline() method:
Note: The alias macro XTSC_SCRIPT_FILE_PATH is always defined and is equal to the
path to the current script file being processed. It can be used to specify locations in the file
system relative to the xtsc_script_file.
Note: The alias macro XTSC_SCRIPT_FILE_PATH_ESC is always defined and is the
same as XTSC_SCRIPT_FILE_PATH except that any backslashes in the path will be es-
caped with a 2nd backslash.
Note: The alias macro XTSC_SCRIPT_FILE_COMPONENT is always defined and is equal
to the value of the name parameter passed into the xtsc_script_file constructor (which may
be the empty string).
Note: The alias macro XTSC_SCRIPT_FILE_PLATFORM is always defined and is equal
to "LINUX" or "WINDOWS" depending on the platform being used.
Note: The alias macro XTSC_SCRIPT_FILE_COMPILER is always defined according to
the compiler version used to compile the XTSC library. On Linux is will be of the form "GCC-
4.1", "GCC-4.4", etc. On MS Windows it will be of the form "MSVC2010", "MSVC2012",
etc.
• A "#environment" line causes all the environment variables that are valid C/C++ iden-
tifiers to be read in and treated as macros. All environment variables that contain
a value are defined as alias macros. All environment variables that don’t contain a
value are defined as simple macros. The "#environment" line itself is never returned
by the get_words() and getline() methods.
• A "#undef <Identifier>" line removes <Identifier> from the list of defined macros if
such a macro exists (no error is generated if the macro is not currently defined). The
"#undef" line itself is never returned by the get_words() and getline() methods.
• A "#dump" line causes all macros and their value to be logged by logger xtsc_script_-
file at NOTE_LOG_LEVEL if logging has been configured, otherwise they are logged
to STDOUT. This may be useful for trouble-shooting. The "#dump" line itself is never
returned by the get_words() and getline() methods.
• All lines between and including a line starting with "#if 0" and a line starting with
"#elif"/"#else"/"#endif" are ignored and are never returned by the get_words() and
getline() methods.
• Lines starting with "#if 1" and "#elif"/"#else"/"#endif" are never returned by the get_-
words() and getline() methods; however, non-comment, non-blank, non-pseudo-
preprocessor lines between them are.
• Lines starting with "#ifdef <Identifier>" are handled according to one of the previ-
ous two rules depending upon whether or not <Identifier> is a defined macro (ei-
ther a simple macro or an alias macro). "#if defined <Identifier>", "#if !defined
<Identifier>", and "#ifndef <Identifier>" are also supported.
• A "#ifeq (<TextA>,<TextB>)" line is handled like a "#if 1" line if <TextA> is equal to
<TextB>, otherwise, the line is handled like a "#if 0" line. Although it is not a require-
ment, it is common for at least one of <TextA> and <TextB> to be a macro. For
example, "#ifeq ($(GCC_VERSION),3.4.1)". The "#ifneq" directive is also supported.
• Zero, one, or more of the following "#elif" directives are allowed in any combination
between a "#if"-style directive and its corresponding "#else/#endif":
#elif 0
#elif 1
#elif defined <Identifier>
#elif !defined <Identifier>
#elifdef <Identifier>
#elifndef <Identifier>
#elifeq (<TextA>,<TextB>)
#elifneq (<TextA>,<TextB>)
Note: "#warn", "#note", and "#info" lines in an xtsc-run script file do not appear in the XTSC
log file because xtsc-run processes the script file before configuring logging.
• The psuedo-preprocessor will pass the code snippet contained on a "#lua" line or
between a "#lua_beg" and "#lua_end" pair to the Lua library for processing in a
separate Lua coroutine. The "#lua" prefix and the lines between and including
the "#lua_beg" and "#lua_end" lines are never directly returned by the get_words()
and getline() methods; however, the Lua code on the "#lua" line or in the "#lua_-
beg/#lua_end" block may pass lines back to the psuedo-preprocessor for return by
the get_words() or getline() methods by calling the Lua function xtsc.write() which
takes a single string argument containing the line to pass back to the psuedo-
preprocessor. A "#lua_beg/#lua_end" block may NOT contain "#include" lines nor any
of the "#if/#else/#endif"-style constructs; however, other psuedo-processor constructs
such as "#define", "#error", "#warn", "#note", "#info", and $(<Identifier>) macro ex-
pansion are allowed. Also, a "#lua" line or a "#lua_beg/#lua_end" block may appear
inside a "#if/#endif"-style block.
Note: All Lua code in a given xtsc_script_file is processed by the same Lua state. This
allows variables to be set on a "#lua" line or in one "#lua_beg/#lua_end" block and then
to be accessed by subsequent "#lua" lines or "#lua_beg/#lua_end" blocks and backticked
Lua expressions (described next).
• After the first "#lua" line (it may be empty) or "#lua_beg/#lua_end" block, any lines
not on a "#lua" line or in a "#lua_beg/#lua_end" block will undergo backtick expan-
sion such that the string between each pair of backticks will be passed to Lua for
evaluation as a Lua expression. The Lua expression string and enclosing backticks
will be replaced by the result of the expression’s evaluation.
• In the formats described above, the pound sign ("#") must always be in the first col-
umn.
• Other then the formats defined above, script files should not contain any lines that
have a pound sign ("#") in the first column.
• By default, the pseudo-preprocessor uses the backward slash (\) as the line continua-
tion character. The pseudo-preprocessor does not support comments or # constructs
inside continued lines; however, macro expansion is supported. The line continuation
character can be changed using a "#continuation <CHAR>" line, where <CHAR>
is a single non-alphanumeric printable character. Line continuation support can be
turned off using a "#continuation off" line or by defining the environment variable
XTSC_SCRIPT_FILE_LINE_CONTINUATION_OFF. If a line ends with a single line
continuation character then that line and the following line are concatenated after
first stripping the line continuation character and all then trailing whitespace from the
first line and all leading whitespace from the second line. If a line ends with two
consecutive line continuation characters, then that line and the following line are con-
catenated after stripping the two line continuation characters; however, trailing and
leading whitespace are preserved.
Note: Line continuation can be used in an xtsc-run script to allow the HERE file content to
appear on separate lines. For example:
-set_router_parm=routing_table=<;> \
0x0 0x00000000 0x0FFFFFFF; \
0x1 0x10000000 0x1FFFFFFF; \
0x2 0x20000000 0x2FFFFFFF; \
0x3 0x30000000 0xFFFFFFFF
Note: Error messages regarding xtsc_script_file content contained in continued lines, use
the line number of the last line in the sequence (in the preceeding example, this would be
the line number of the line starting with 0x3).
Here is an example script to illustrate most of the supported preprocessor constructs:
#warn Also, not doing this because I did one of the above
#endif
// Line continuation
#note This note is spread \\
over 2 lines
Note: The xtsc-run program can be used to dump the contents of an xtsc_script_file with
preprocessing applied. For example:
xtsc-run -dump_script_file=my_script_file.vec
Parameters:
file_name The name of the script file or a HERE file indicator and contents. If file_-
name does not begin with the HERE file indicator then it must name an existing
file or an exception is thrown. A HERE file is indicated by file_name starting with
the three character pattern "<CHAR>", where CHAR represents any single non-
space, printable character, all occurences of which in the rest of file_name (if any)
will be translated into a new line in the HERE file content. The HERE file name for
logging and error messages will be "HERE_FILE#N" where N is the instantation
number of the HERE file in program execution order. As an example, if file_name
is "<;>one;2;three amigos", then the HERE file indicator is "<;>", the end-of-line
substitution character is ";", and the HERE file content is the following three lines:
one
2
three amigos
Note: The HERE file content in file_name is NOT pre-processed by the pseudo-
preprocessor of this instance of xtsc_script_file; however, if the value of file_name itself
came from another xtsc_script_file (a typical use-case in an xtsc-run script) then it would
have been pre-processed by that xtsc_script_file before being used as file_name in this
constructor call.
Parameters:
m_parm_name Optional parameter name that file_name came from. This is used for
exception messages.
name Optional name of the component using the script file (for example, "ColorLUT").
This is used for exception messages and for supplying the value of the alias macro
XTSC_SCRIPT_FILE_COMPONENT.
type Optional type of component using the script file (for example, "xtsc_lookup").
This is used for exception messages.
wraparound If false (the default), the file is only processed one time. If true, the file
pointer will be reset to the beginning of the file each time the end of file is reached.
If wraparound is true, the file must contain at least one non-blank, non-comment
line or an exception will be thrown.
p_macros Optional pointer to a map of name/value pair strings to be used as pre-
defined alias macros. This mechanism is used by xtsc-run --define command
to allow passing the value of Xtensa Xplorer variables into an xtsc-run script as
xtsc_script_file macros.
log_here_file If true (the default), the HERE file name and contents, if applicable, will
be logged by the constructor.
Get the next line from the file. This method returns the next non-blank, non-comment line
from the file.
Parameters:
line A reference to the string object in which to return the next non-blank, non-
comment line of the file.
p_file An optional pointer to a string in which to return the name of the file from which
this line came from (or NULL if the name of the file is not desired).
Note: By default, the getline() method trims trailing whitespace (tabs and spaces) from the
end of the line before returning it. If this is not desired, define the environment variable
XTSC_SCRIPT_FILE_DO_NOT_TRIM_TRAILING_WHITESPACE.
Returns:
the line number. Returns 0 if wraparound is false and the end of file is reached.
7.150.3.2 u32 get_words (std::vector< std::string > & words, bool downshift =
false, std::string ∗ p_file = NULL)
Get the next line from the file broken into words. This method returns the next non-blank,
non-comment line from the file broken into words. Word tokenization is based on whites-
pace (tab and space characters).
Parameters:
words A reference to a vector<string> object in which to return the words.
downshift If true, all the uppercase characters in each string in the words vector will
be shifted to lowercase.
p_file An optional pointer to a string in which to return the name of the file from which
this line came from (or NULL if the name of the file is not desired).
Returns:
the line number. Returns 0 if wraparound is false and the end of file is reached.
7.150.3.3 u32 get_words (std::vector< std::string > & words, std::string & line,
bool downshift = false, std::string ∗ p_file = NULL)
Get the next line from the file broken into words. This method returns the next non-blank,
non-comment line from the file broken into words. Word tokenization is based on whites-
pace (tab and space characters). In addition, the line read from the file is returned.
Parameters:
words A reference to a vector<string> object in which to return the words.
line A reference to the string object in which to return the line read from the file and
used to form the words vector. Any C-style comment characters will not appear in
line, but the other characters will be in the same case as they came from the file
(i.e. they will not be downshifted).
downshift If true, all the uppercase characters in each string in the words vector will
be shifted to lowercase.
p_file An optional pointer to a string in which to return the name of the file from which
this line came from (or NULL if the name of the file is not desired).
Returns:
the line number. Returns 0 if wraparound is false and the end of file is reached.
Parameters:
exp A Lua expression to evaluate. The expression must not call SystemC wait().
Returns:
the result.
See also:
"LUA_FUNCTION" in "script_file" of xtsc_component::xtsc_memory_parms for an ex-
ample of how this method can be used.
Dump file name and line number info, including include backtrace.
Parameters:
os The ostream object to which the backtrace is to be dumped.
single_line If true, print backtrace on a signle line, otherwise use one line per file.
The documentation for this class was generated from the following file:
• xtsc.h
Pin-level signal for connecting to a TIE export state, TIE import wire, or system-level I/O of
xtsc_core.
#include <xtsc/xtsc.h>Inheritance diagram for xtsc_signal_sc_bv_base:
xtsc_signal_sc_bv_base
xtsc_signal_sc_bv_base_floating
Private Attributes
• u32 m_width1
Pin-level signal for connecting to a TIE export state, TIE import wire, or system-level I/O
of xtsc_core. This convenience class implements a pin-level signal for connecting to a TIE
export state, TIE import wire, or system-level I/O of an xtsc_core. The advantage of using
this class instead of sc_signal<sc_bv_base> (from which it inherits) is that you can directly
specify the bit-width of the underlying sc_bv_base using the width1 constructor parameter
instead of having to indirectly specify it through a separate sc_length_context object.
See also:
xtsc_core::How_to_do_output_pin_binding;
xtsc_core::How_to_do_input_pin_binding;
• xtsc.h
Floating signal for a capped (unused) TIE export state or import wire.
#include <xtsc/xtsc.h>Inheritance diagram for xtsc_signal_sc_bv_base_floating:
xtsc_signal_sc_bv_base
xtsc_signal_sc_bv_base_floating
xtsc_signal_sc_bv_base
xtsc_signal_sc_bv_base_floating
Private Attributes
• log4xtensa::TextLogger & m_text
Floating signal for a capped (unused) TIE export state or import wire. This class imple-
ments the signal use to cap an unconnected TIE export state or TIE import wire.
Definition at line 2100 of file xtsc.h.
The documentation for this class was generated from the following file:
• xtsc.h
Private Attributes
• u32 m_width1
Pin-level signal for connecting certain pin-level memory ports. This convenience class
implements a pin-level signal for connecting pin-level memory ports of template type sc_-
unit_base. The advantage of using this class instead of sc_signal<sc_uint_base> (from
which it inherits) is that you can directly specify the bit-width of the underlying sc_uint_base
using the width1 constructor parameter instead of having to indirectly specify it through a
separate sc_length_context object.
Definition at line 2128 of file xtsc.h.
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_module xtsc_request_if
xtsc_slave
m_response_stream
xtsc_slave
Classes
• class response_info
This class helps keep track of a response and when it is due.
• SC_HAS_PROCESS (xtsc_slave)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
Public Attributes
• int get_words ()
Get the next vector of words which define an xtsc::xtsc_response test vector.
Protected Attributes
• std::string m_script_file
The name of the response script file.
• bool m_wraparound
True if m_script_file should be reread after reaching EOF.
• xtsc::xtsc_script_file ∗ m_response_stream
The response script file object.
• xtsc::u32 m_format
The format in effect. See "format" parameter.
• std::string m_line
Line from m_script_file.
• xtsc::u32 m_line_count
Line number in m_script_file of m_line.
• sc_core::sc_event m_delayed_response_event
Event to notify delayed_response_thread.
• xtsc::u32 m_repeat_count
How many times to repeat a rejected response.
• xtsc::u32 m_ignore_count
How many times to ignore a request.
• sc_core::sc_time m_repeat_delay_time
How long to wait between repeated responses.
• sc_core::sc_time m_clock_period
This modules clock period.
nb_respond()
nb_request()
xtsc_master master xtsc_slave slave
request.vec response.vec
master.m_request_port slave.m_respond_port
master.m_respond_export slave.m_request_export
See also:
xtsc_slave_parms
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
Parameters:
module_name Name of the xtsc_slave sc_module.
slave_parms The remaining parameters for construction.
See also:
xtsc_slave_parms
Connect with an xtsc_arbiter. This method connects the master port pair of the specified
xtsc_arbiter with the slave port pair of this xtsc_slave.
Parameters:
arbiter The xtsc_arbiter to connect with this xtsc_slave.
Connect with an xtsc_core. This method connects the specified memory interface master
port pair of the specified xtsc_core with the slave port pair of this xtsc_slave.
Parameters:
core The xtsc_core to connect with this xtsc_slave.
memory_name The name of the memory interface master port pair of the xtsc_core
to connect with this xtsc_slave.
Connect with an xtsc_master. This method connects the master port pair of the specified
xtsc_master with the slave port pair of this xtsc_slave.
Parameters:
master The xtsc_master to connect with this xtsc_slave.
Connect with an xtsc_memory_trace. This method connects the specified master port pair
of the specified xtsc_memory_trace with the slave port pair of this xtsc_slave.
Parameters:
memory_trace The xtsc_memory_trace to connect with this xtsc_slave.
port_num The xtsc_memory_trace master port pair to connect with this xtsc_slave.
Parameters:
pin2tlm The xtsc_pin2tlm_memory_transactor to connect with this xtsc_slave.
port_num The xtsc_pin2tlm_memory_transactor master port pair to connect with this
xtsc_slave.
Connect with an xtsc_router. This method connects the specified master port pair of the
specified xtsc_router with the slave port pair of this xtsc_slave.
Parameters:
router The xtsc_router to connect with this xtsc_slave.
port_num The xtsc_router master port pair to connect with this xtsc_slave.
Get the optional coherence value. If word at m_words[index] exists and starts with a dollar
sign then convert the rest of the word to a coherence_t value, set offset to 1, and return the
coherence value. Otherwise, set offset to 0 and return a coherence value of 0.
The documentation for this class was generated from the following file:
• xtsc_slave.h
xtsc_parms
xtsc_slave_parms
xtsc_parms
xtsc_slave_parms
"script_file" char* The file to read the responses from. Each response
takes one line in the file; however, the file can
contain a few other lines besides response lines.
Each time an nb_request() call is made to xtsc_slave,
the script file is processed line by line up to and
including the next response line (a response line is a
line that starts with a delay) or to an IGNORE line.
The supported line formats are:
// All formats
REPEAT rcount [rdelay]
IGNORE icount
NOTE <message>
INFO <message>
FORMAT 1|2
// Format 1
delay status size route_id id priority pc last b0 b1 ... bN [CONT]
// Format 2
delay status size route_id id priority pc last coh b0 b1 ... bN [CONT]
"wraparound" bool Specifies what should happen when the end of file (EOF)
is reached on "script_file". When EOF is reached and
"wraparound" is true, "script_file" will be reset to
the beginning of file to get the next response. When
EOF is reached and "wraparound" is false, a standard
response will be used for the current request and all
subsequent requests.
Default = true.
See also:
xtsc_slave
xtsc::xtsc_parms
xtsc::xtsc_response
Parameters:
script_file The file name to read the responses from.
wraparound Indicates if script_file should wraparound to the beginning of the file after
the end of file is reached.
• xtsc_slave.h
xtsc_mode_switch_if
m_switch_if
xtsc_switch_registration
Public Attributes
• sc_core::sc_object ∗ m_object
• xtsc::xtsc_mode_switch_if ∗ m_switch_if
Parameters:
module_name The module that is registering the switch
switch_in The interface class that implements mode switching
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_tlm22xttlm_transactor
xtsc_respond_if
m_transactor xtsc_respond_if_impl
m_xtsc_respond_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable m_transactor
xtsc_tlm22xttlm_transactor
m_id_to_transaction_info_tab transaction_info
xtsc_command_handler_interface
m_transactor
tlm_fw_transport_if_impl
m_tlm_fw_transport_if_impl
Classes
• class address_range
Class to keep track of address ranges and what DMI access has been granted/invalidated.
• class tlm_fw_transport_if_impl
Implementation of tlm_fw_transport_if<>.
• class transaction_info
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Public Types
• typedef tlm::tlm_target_socket< 32 > target_socket_4
target socket with BUSWIDTH = 32 bits ( 4 bytes)
• SC_HAS_PROCESS (xtsc_tlm22xttlm_transactor)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
• xtsc::u32 get_num_ports ()
Get the number of memory ports this device has.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• sc_core::sc_port< xtsc::xtsc_request_if > ∗∗ m_request_ports
From us to downstream slave(s).
Private Types
• typedef tlm_utils::peq_with_get< tlm::tlm_generic_payload > peq
• xtsc::xtsc_request ∗ new_request ()
Get a new xtsc_request (from the pool).
Private Attributes
• target_socket_4 ∗∗ m_target_sockets_4
Initiator socket(s) for 4-byte interface.
• target_socket_8 ∗∗ m_target_sockets_8
Initiator socket(s) for 8-byte interface.
• target_socket_16 ∗∗ m_target_sockets_16
Initiator socket(s) for 16-byte interface.
• target_socket_32 ∗∗ m_target_sockets_32
Initiator socket(s) for 32-byte interface.
• target_socket_64 ∗∗ m_target_sockets_64
Initiator socket(s) for 64-byte interface.
• xtsc_respond_if_impl ∗∗ m_xtsc_respond_if_impl
m_respond_exports bind to these
• tlm_fw_transport_if_impl ∗∗ m_tlm_fw_transport_if_impl
m_target_sockets binds to these
• xtsc::u32 m_next_port_num_worker
Used by worker_thread to get its port number.
• xtsc::u32 m_next_port_num_nb2b
Used by nb2b_thread to get its port number.
• xtsc::u32 m_num_ports
• xtsc::u32 m_width8
See the "byte_width" parameter.
• xtsc::u32 m_priority
See the "priority" parameter.
• xtsc::u32 m_pc
See the "pc" parameter.
• xtsc::u32 m_max_burst_beats
See the "max_burst_beats" parameter.
• bool m_use_pif_block
See the "use_pif_block" parameter.
• bool m_use_pif_burst
See the "use_pif_burst" parameter.
• bool m_allow_dmi
See the "allow_dmi" parameter.
• bool m_allow_transport_dbg
See the "allow_transport_dbg" parameter.
• xtsc::u64 m_clock_period_value
Clock period as u64.
• sc_core::sc_time m_time_resolution
SystemC time resolution.
• sc_core::sc_time m_clock_period
This transactor’s clock period.
• sc_core::sc_event ∗∗ m_worker_thread_event
To notify worker_thread when transaction is accepted.
• peq ∗∗ m_peq
For nb_transport/nb2b_thread (per port).
• bool ∗ m_waiting_for_nacc
• bool ∗ m_request_got_nacc
True if request got RSP_NACC from slave.
• xtsc::u8 ∗ m_next_id
Next potentially available PIF ID (per port).
• int ∗∗ m_id_to_request_tab
Map PIF ID to req entry in m_requests (64 per port).
• xtsc::u32 m_transaction_info_count
Count number of constructed transaction_info objects.
• xtsc::u32 m_request_count
Count number of constructed xtsc_request objects.
Example module implementing an OSCI TLM2 to Xtensa TLM (xttlm) transactor. This
module can be used to connect an OSCI TLM2 memory interface master (for example,
xtsc_master_tlm2) to an Xtensa TLM memory interface slave (for example, the inbound
PIF of xtsc::xtsc_core).
For protocol and timing information specific to xtsc_core and the Xtensa ISS, see
xtsc::xtsc_core::Information_on_memory_interface_protocols.
Here is a block diagram of an xtsc_tlm22xttlm_transactor being used in the xtsc_-
tlm22xttlm_transactor example:
(*tlm22xttlm.m_request_ports[0])
(core0.get_request_export(“inbound_pif”))
master.get_initiator_socket_4()
req
nb_request
xtsc_memory
pif
rsp
xtsc_tlm22xttlm_transactor
xtsc_master_tlm2 b_transport tlm22xttlm xtsc_core
master “num_ports” = 1 core0
req
master_tlm2.vec
nb_respond xtsc_memory
dram0
rsp
core0.get_respond_port(“inbound_pif”)
(*tlm22xttlm.m_respond_exports[0])
(tlm22xttlm.get_target_socket_4(0))
See also:
xtsc_tlm22xttlm_transactor_parms
xtsc::xtsc_request
xtsc::xtsc_response
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
xtsc::xtsc_core
xtsc::xtsc_core::Information_on_memory_interface_protocols.
xtsc_master_tlm2
xtsc_xttlm2tlm2_transactor
Parameters:
module_name Name of the xtsc_tlm22xttlm_transactor sc_module.
transactor_parms The remaining parameters for construction.
See also:
xtsc_tlm22xttlm_transactor_parms
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
change_clock_period <ClockPeriodFactor>
Call xtsc_tlm22xttlm_transactor::change_clock_period(<ClockPeriodFactor>).
Return previous <ClockPeriodFactor> for this device.
Implements xtsc_command_handler_interface.
Parameters:
core The xtsc_core to connect with this xtsc_tlm22xttlm_transactor.
tlm22xttlm_port The master port pair of this xtsc_tlm22xttlm_transactor to connect
with the inbound PIF interface of core.
Parameters:
master_tlm2 The xtsc_master_tlm2 to connect to this xtsc_tlm22xttlm_transactor.
target_socket The target socket of this transactor to connect the initiator socket of
master_tlm2 to.
Parameters:
xttlm2tlm2 The xtsc_xttlm2tlm2_transactor to connect to this xtsc_tlm22xttlm_-
transactor.
initiator_socket The initiator socket of xttlm2tlm2 to connect to this xtsc_tlm22xttlm_-
transactor.
target_socket The target socket of this transactor to connect the initiator socket of
xttlm2tlm2 to.
single_connect If true only one socket of this transactor will be connected. If false,
the default, then all contiguous, unconnected socket numbers of this transactor
starting at target_socket that have a corresponding existing socket in xttlm2tlm2
(starting at initiator_socket) will be connected to that corresponding socket in xt-
tlm2tlm2.
NOTE: This method is just for special testing purposes. In general, connecting a xtsc_-
xttlm2tlm2_transactor to a xtsc_tlm22xttlm_transactor is not guarranteed to meet timing
requirements.
Returns:
number of sockets that were connected by this call (1 or more)
The documentation for this class was generated from the following file:
• xtsc_tlm22xttlm_transactor.h
xtsc_parms
xtsc_tlm22xttlm_transactor_parms
xtsc_parms
xtsc_tlm22xttlm_transactor_parms
"num_ports" u32 The number of TLM2 initiator sockets this transactor has
as well as the number of Xtensa TLM (xttlm) port pairs
this transactor has.
Default = 1.
Minimum = 1.
"byte_width" u32 Bus width in bytes. Valid values are 4, 8, 16, 32, and
64. If byte_width is 32 or 64 then only READ and WRITE
requests are allowed. The exclusive-to-PIF transactions
(BLOCK_READ, BURST_READ, RCW, BLOCK_WRITE, and
BURST_WRITE) are only allowed if byte_width is 4|8|16.
"use_pif_block" bool If true, then a TLM2 burst transfer transaction that can
be mapped to a PIF BLOCK_READ|BLOCK_WRITE transaction
will be.
Default = true.
"use_pif_burst" bool If true, then a TLM2 burst transfer transaction that can
be mapped to a PIF BURST_READ|BURST_WRITE transaction
will be.
Default = false.
"allow_dmi" bool If true, this transactor will attempt to get raw access
to the downstream memory using nb_fast_access in order
to support DMI. If false, no attempt will be made to
support DMI. Even if this parameter is true, DMI can
not be supported if the downstream memory does not
support raw fast access.
Default = true.
See also:
xtsc_tlm22xttlm_transactor
xtsc::xtsc_parms
Parameters:
width8 Memory data bus width in bytes.
num_ports The number of ports this transactor has.
• xtsc_tlm22xttlm_transactor.h
This transactor converts memory transactions from transaction level (TLM) to pin level.
#include <xtsc/xtsc_tlm2pin_memory_transactor.h>Inheritance diagram for xtsc_-
tlm2pin_memory_transactor:
xtsc_connection_interface xtsc_resettable
xtsc_tlm2pin_memory_transactor
xtsc_module_pin_base
m_request_impl
m_p_initial_value_file
xtsc_script_file xtsc_memory_b xtsc_request_if_impl
m_p_memory m_transactor
m_debug_cap
xtsc_connection_interface xtsc_command_handler_interface xtsc_request_if
xtsc_debug_if_cap
xtsc_debug_if
Classes
• class response_info
Information about each response.
• class xtsc_debug_if_cap
To cap an unconnected m_debug_ports port when the user can’t bind anything to it.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
Public Types
• SC_HAS_PROCESS (xtsc_tlm2pin_memory_transactor)
This SystemC macro inserts some code required for SC_THREAD’s to work.
• ∼xtsc_tlm2pin_memory_transactor (void)
Destructor.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
• sc_core::sc_export< xtsc::xtsc_request_if > ∗∗ m_request_exports
• sc_core::sc_port< xtsc::xtsc_respond_if > ∗∗ m_respond_ports
From master to us (per mem port).
• xtsc::Readme How_to_get_input_and_output_ports
From us to slave (per mem port).
Protected Types
• typedef std::deque< response_info ∗ > rsp_info_deque
• typedef std::map< xtsc::u64, rsp_info_deque ∗ > rsp_info_deque_map
• typedef void ∗ HMODULE
• typedef void(∗ peek_t )(xtsc::u32 address8, xtsc::u32 size8, xtsc::u8 ∗buffer, const
char ∗dso_cookie, xtsc::u32 port)
• typedef void(∗ poke_t )(xtsc::u32 address8, xtsc::u32 size8, const xtsc::u8 ∗buffer,
const char ∗dso_cookie, xtsc::u32 port)
Log and send a local-memory or RSP_NACC response; also delete it if it is a last transfer.
Protected Attributes
• xtsc_request_if_impl ∗∗ m_request_impl
m_request_exports binds to this (per mem port)
• xtsc_debug_if_cap ∗∗ m_debug_cap
m_debug_ports binds to this if user can’t (per mem port)
• xtsc::u32 m_num_ports
The number of memory ports this transactor has.
• xtsc::xtsc_memory_b ∗ m_p_memory
Optional shadow memory.
• HMODULE m_dso
from dlopen/LoadLibrary of m_dso_name
• peek_t m_peek
• poke_t m_poke
Function pointer to the poke symbol in m_dso.
• xtsc::u32 m_request_fifo_depth
From "request_fifo_depth" parameter.
• std::string m_interface_uc
Uppercase version of "memory_interface" parameter.
• std::string m_interface_lc
Lowercase version of "memory_interface" parameter.
• memory_interface_type m_interface_type
The memory interface type.
• xtsc::u32 m_width8
Data width in bytes of the memory interface.
• xtsc::u32 m_dram_attribute_width
See "dram_attribute_width" parameter.
• sc_dt::sc_unsigned m_dram_attribute
To retrieve value using xtsc_request::get_dram_attribute().
• sc_dt::sc_bv_base m_dram_attribute_bv
To convert sc_unsigned m_dram_attribute to sc_bv_base.
• xtsc::xtsc_address m_start_byte_address
Number to be subtracted from the TLM request address.
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
This device’s clock period as sc_time.
• sc_core::sc_time m_time_resolution
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• sc_core::sc_time m_sample_phase
Clock phase for sampling inputs and deasserting outputs.
• sc_core::sc_time m_sample_phase_plus_one
m_sample_phase plus one clock period
• sc_core::sc_time m_output_delay
See "output_delay" parameter.
• sc_core::sc_time ∗ m_retire_deassert
Time at which XLMI retire should be deasserted (per mem port).
• sc_core::sc_time ∗ m_flush_deassert
Time at which XLMI flush should be deasserted (per mem port).
• sc_core::sc_time m_read_delay_time
See "read_delay" parameter.
• xtsc::u32 m_read_delay
See "read_delay" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• bool m_is_7_stage
If "read_delay" is 1.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• bool m_cosim
See "cosim" parameter.
• bool m_shadow_memory
See "shadow_memory" parameter.
• bool m_test_shadow_memory
• bool m_cbox
See "cbox" parameter.
• bool m_split_rw
True if m_interface_type is DRAM0RW or DRAM1RW.
• bool m_has_dma
See "has_dma" parameter.
• bool m_external_udma
See "external_udma" parameter.
• bool m_append_id
True if pin port names should include the set_id.
• bool m_inbound_pif
True if interface is inbound PIF.
• bool m_snoop
True if interface is snoop port. See "snoop" parameter.
• bool m_has_coherence
See "has_coherence" parameter.
• bool m_has_pif_attribute
See "has_pif_attribute" parameter.
• bool m_has_pif_req_domain
See "has_pif_req_domain" parameter.
• bool m_big_endian
True if the memory interface master is big endian.
• bool m_write_responses
See "write_responses" parameter (PIF|IDMA0 only).
• bool m_track_write_requests
See "track_write_requests" parameter (PIF only).
• bool m_discard_unknown_responses
See "discard_unknown_responses" parameter (PIF only).
• bool m_has_request_id
True if the "POReqId" and "PIRespId" ports should be present.
• std::string m_dso_name
See "dso_name" parameter.
• std::string m_req_user_data
See "req_user_data" parameter.
• std::string m_req_user_data_name
Name of request user data port.
• xtsc::u32 m_req_user_data_width1
Bit width of request user data port.
• std::string m_rsp_user_data
See "rsp_user_data" parameter.
• std::string m_rsp_user_data_name
Name of response user data port.
• xtsc::u32 m_rsp_user_data_width1
Bit width of response user data port.
• sc_dt::sc_bv_base ∗ m_user_data_val
Value for req_user_data port.
• xtsc::u8 m_memory_fill_byte
See "memory_fill_byte" parameter.
• xtsc::u32 m_address_bits
Number of bits in the address (non-PIF|IDMA0 only).
• xtsc::u32 m_check_bits
Number of bits in ECC/parity signals (from "check_bits").
• xtsc::u32 m_ram_select_bit
See "ram_select_bit" parameter.
• bool m_ram_select_normal
See "ram_select_normal" parameter.
• xtsc::u32 m_ram_select_mask
Mask with all bits 0 except m_ram_select_bit.
• xtsc::xtsc_address m_address_mask
Address mask.
• xtsc::xtsc_address m_bus_addr_bits_mask
Address mask to get bits which indicate which byte lane.
• xtsc::u32 m_address_shift
Number of bits to right-shift the address.
• xtsc::u32 m_route_id_bits
Number of bits in the route ID (PIF|IDMA0 only).
• xtsc::u32 m_route_id_mask
Mask to get bits for m_route_id.
• xtsc::u32 m_pif_id_mask
Mask to get bits of PIF request ID.
• xtsc::u32 m_next_port_pif_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_response_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_pif_drive_resp_rdy_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_request_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_xlmi_retire_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_xlmi_flush_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_xlmi_load_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_dram_lock_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_busy_write_rsp_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_7stage_write_rsp_thread
To give each thread instance a port number.
• xtsc::u32 m_next_port_lcl_sample_read_data_thread
To give each thread instance a port number.
• bool m_has_busy
True if memory interface has a busy/rdy pin (non-PIF|IDMA0 only).
• bool m_has_lock
True if memory interface has a lock pin (DRAM0|DRAM0BS|DRAM0RW|DRAM1|DRAM1BS|DRAM1RW
only).
• bool m_has_xfer_en
True if memory interface has Xfer enable pin (NA PIF|IDMA0|DROM0|XLMI0).
• sc_core::sc_event ∗ m_write_response_event
Event used to notify pif_response_thread (per mem port).
• sc_core::sc_event ∗ m_request_event
Event used to notify request_thread (per mem port).
• sc_core::sc_event ∗ m_retire_event
Event used to notify xlmi_retire_thread (per mem port).
• sc_core::sc_event ∗ m_flush_event
Event used to notify xlmi_flush_thread (per mem port).
• sc_dt::sc_uint_base m_address
The address after any required shifting and masking.
• sc_dt::sc_uint_base m_vadrs
SnoopReqCohVadrsIndex.
• sc_dt::sc_uint_base m_req_coh_cntl
POReqCohCntl;.
• sc_dt::sc_uint_base m_lane
Byte/Word enables.
• sc_dt::sc_uint_base m_id
POReqId/PIRespId.
• sc_dt::sc_uint_base m_priority
POReqPriority/PIRespPriority.
• sc_dt::sc_uint_base m_route_id
POReqRouteId/PIRespRouteId.
• sc_dt::sc_uint_base m_req_attribute
POReqAttribute/PIReqAttribute.
• sc_dt::sc_uint_base m_req_domain
POReqDomain.
• sc_dt::sc_bv_base m_data
Read/write data.
• req_cntl m_req_cntl
Value for POReqCntrl.
• bool_fifo ∗∗ m_resp_rdy_fifo
sc_fifo to keep track of PORespRdy pin (per mem port)
• sc_core::sc_event ∗ m_drive_resp_rdy_event
Notify when PORespRdy should be driven (per mem port).
• bool ∗ m_previous_response_last
true if previous response was a last transfer (per mem port)
• sc_core::sc_event_queue ∗ m_busy_write_rsp_event_queue
When busy should be sampled and/or write rsp sent (per mem port).
• sc_core::sc_event_queue ∗ m_7stage_write_rsp_event_queue
When write rsp should be sent (per mem port) 7 stage only.
• sc_core::sc_event_queue ∗ m_read_data_event_queue
When read data should be sampled (per mem port).
• sc_core::sc_event_queue ∗ m_lock_event_queue
When DRamLock should be driven (per mem port).
• sc_core::sc_event_queue ∗ m_load_event_queue
When DPortLoad/m_p_preload should be driven (per mem port).
• bool_signal ∗∗ m_p_preload
DPortLoad prior to qualification with the busy pin.
• bool_output ∗∗ m_p_en
DPortEn, DRamEn, DRomEn, IRamEn, IRomEn.
• uint_output ∗∗ m_p_addr
DPortAddr, DRamAddr, DRomAddr, IRamAddr, IRomAddr.
• uint_output ∗∗ m_p_lane
DPortByteEn, DRamByteEn, DRomByteEn, IRamWordEn, IRomWordEn.
• wide_output ∗∗ m_p_wrdata
DPortWrData, DRamWrData, IRamWrData.
• bool_output ∗∗ m_p_wr
DPortWr, DRamWr, IRamWr.
• bool_output ∗∗ m_p_load
DPortLoad, IRamLoadStore, IRomLoad.
• bool_output ∗∗ m_p_retire
DPortLoadRetired.
• bool_output ∗∗ m_p_flush
DPortRetireFlush.
• bool_output ∗∗ m_p_lock
DRamLock (per bank if subbanked).
• wide_output ∗∗ m_p_attr
DRamAttr, DRamWrAttr.
• wide_output ∗∗ m_p_check_wr
DRamCheckWrData, IRamCheckWrData.
• wide_input ∗∗ m_p_check
DRamCheckData, IRamCheckData.
• bool_output ∗∗ m_p_xfer_en
DRamXferEn, IRamXferEn, IRomXferEn, URamXferEn.
• bool_input ∗∗ m_p_busy
DPortBusy, DRamBusy, DRomBusy, IRamBusy, IRomBusy (per bank if subbanked).
• wide_input ∗∗ m_p_data
DPortData, DRamData, DRomData, IRamData, IRomData.
• bool_output ∗∗ m_p_ram0
DmaDRam0.
• bool_output ∗∗ m_p_ram1
DmaDRam1.
• bool_output ∗∗ m_p_req_valid
POReqValid.
• uint_output ∗∗ m_p_req_cntl
POReqCntl.
• uint_output ∗∗ m_p_req_adrs
POReqAdrs.
• wide_output ∗∗ m_p_req_data
POReqData.
• uint_output ∗∗ m_p_req_data_be
POReqDataBE.
• uint_output ∗∗ m_p_req_id
POReqId.
• uint_output ∗∗ m_p_req_priority
POReqPriority.
• uint_output ∗∗ m_p_req_route_id
POReqRouteId.
• uint_output ∗∗ m_p_req_attribute
POReqAttribute.
• uint_output ∗∗ m_p_req_domain
POReqDomain.
• uint_output ∗∗ m_p_req_coh_vadrs
POReqCohVAdrsIndex/SnoopReqCohVAdrsIndex.
• uint_output ∗∗ m_p_req_coh_cntl
POReqCohCntl/SnoopReqCohCntl.
• wide_output ∗∗ m_p_req_user_data
Request User Data. See "req_user_data" parameter.
• bool_input ∗∗ m_p_req_rdy
PIReqRdy.
• bool_input ∗∗ m_p_resp_valid
PIRespValid.
• uint_input ∗∗ m_p_resp_cntl
PIRespCntl.
• wide_input ∗∗ m_p_resp_data
PORespData.
• uint_input ∗∗ m_p_resp_id
PIRespId.
• uint_input ∗∗ m_p_resp_priority
PIRespPriority.
• uint_input ∗∗ m_p_resp_route_id
PIRespRouteId.
• uint_input ∗∗ m_p_resp_coh_cntl
PIRespCohCntl/SnoopRespCohCntl.
• wide_input ∗∗ m_p_resp_user_data
Response User Data. See "rsp_user_data" parameter.
• bool_output ∗∗ m_p_resp_rdy
PORespRdy.
• rsp_info_deque_map ∗ m_tran_id_rsp_info
Storage for pending responses (per mem port) (PIF only) Map transaction ID to deque of
response_info objects.
• xtsc::u64 m_pending_rsp_info_cnt
Count of entries in m_tran_id_rsp_info.
This transactor converts memory transactions from transaction level (TLM) to pin level. This
module is a transactor which converts TLM memory requests (xtsc_request_if) to pin-level
requests and the corresponding pin-level responses into TLM responses (xtsc_respond_if).
On the TLM side, this module can be connected with any XTSC memory interface master
(e.g. xtsc_core, xtsc_arbiter, xtsc_master, xtsc_router, etc). However, it is always config-
ured for the specified memory interface of xtsc_core (such as DRAM0, DRAM1, IRAM0,
PIF, etc) or of the external micro-DMA engine. See the xtsc_tlm2pin_memory_transactor_-
parms "memory_interface" ∗ parameter and the "external_udma" parameter.
Although there is a pin-level XTSC memory model (xtsc_memory_pin) that this transactor
can be connected to on the pin-level side, the main use for this transactor is assumed to
be for connecting to RTL (Verilog) models of, for instance, XLMI or PIF devices. When con-
necting to RTL, there is no guarranteed support for the TLM debug interface (see the m_-
debug_ports data member) because there is no way to guarrantee support for non-blocking
access across the SystemC-Verilog boundary for peek and poke to arbitrary Verilog mod-
ules. See the discussion of the "dso_name", "dso_cookie", "cosim", and "shadow_memory"
parameters in xtsc_tlm2pin_memory_transactor_parms for more information.
This module inherits from the xtsc_module_pin_base class which is responsible for main-
taining the pin-level sc_in<> and sc_out<> ports. The pin-level port names exactly match
the Xtensa RTL. These names, as well as their SystemC type and bit width, are logged at
info log-level when the module is constructed.
This module supports driving multi-ported memories. See the "num_ports" parameter of
xtsc_tlm2pin_memory_transactor_parms.
Note: The parity/ECC signals (DRamNCheckDataM, DRamNCheckWrDataM, IRam-
NCheckData, and IRamNCheckWrData) are present for IRAM and DRAM interfaces when
"check_bits" is non-zero; however, the input signal is ignored and the output signal is driven
with constant 0.
POReqValid
req
PIReqRdy
POReqCntl 8
/
POReqAdrs 32
/
POReqData 32
/
POReqDataBE 4
/
POReqId 6
/
rsp PIRespValid
xtsc_core core0
PORespRdy
PIRespCntl 8
/
PIRespData 32
/
PIRespId 6
/
PIRespPriority 2
/
See also:
xtsc_module_pin_base
xtsc_memory_pin
xtsc_tlm2pin_memory_transactor_parms
xtsc::xtsc_core
xtsc_arbiter
xtsc_master
xtsc_router
Parameters:
module_name Name of the xtsc_tlm2pin_memory_transactor sc_module.
tlm2pin_parms The remaining parameters for construction.
See also:
xtsc_tlm2pin_memory_transactor_parms
dump_pending_rsp_info
Return the buffer from calling dump_pending_rsp_info().
get_pending_rsp_info_cnt
Return get_pending_rsp_info_cnt().
Implements xtsc_command_handler_interface.
Parameters:
arbiter The xtsc_arbiter to connect with this xtsc_tlm2pin_memory_transactor.
port_num The TLM slave port pair of this xtsc_tlm2pin_memory_transactor to con-
nect with the xtsc_arbiter.
Parameters:
core The xtsc_core to connect with this xtsc_tlm2pin_memory_transactor.
memory_port_name The name of the memory interface master port pair of the xtsc_-
core to connect with this xtsc_tlm2pin_memory_transactor. Case-insensitive.
port_num The slave port pair of this xtsc_tlm2pin_memory_transactor to connect the
xtsc_core with.
single_connect If true only one slave port pair of this device will be connected. If
false, the default, and if memory_port_name names the first port of an uncon-
nected multi-ported interface of core and if port_num is 0 and if the number of
ports this device has matches the number of multi-ports in the core interface,
then all master port pairs of the core interface specified by memory_port_name
will be connected to the slave port pairs of this xtsc_tlm2pin_memory_transactor.
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of valid memory_port_-
name values.
Returns:
number of ports that were connected by this call (1 or 2)
Parameters:
master The xtsc_master to connect with this xtsc_tlm2pin_memory_transactor.
port_num The slave port pair of this xtsc_tlm2pin_memory_transactor to connect the
xtsc_master with.
Parameters:
memory_trace The xtsc_memory_trace to connect with this xtsc_tlm2pin_memory_-
transactor.
trace_port The master port pair of the xtsc_memory_trace to connect with this xtsc_-
tlm2pin_memory_transactor.
port_num The TLM slave port pair of this xtsc_tlm2pin_memory_transactor to con-
nect the xtsc_memory_trace with.
single_connect If true only one TLM slave port pair of this xtsc_tlm2pin_memory_-
transactor will be connected. If false, the default, then all contiguous, uncon-
nected slave port pairs of this xtsc_tlm2pin_memory_transactor starting at port_-
num that have a corresponding existing master port pair in memory_trace (start-
ing at trace_port) will be connected with that corresponding memory_trace master
port pair.
Returns:
number of ports that were connected by this call (1 or more)
Parameters:
router The xtsc_router to connect with this xtsc_tlm2pin_memory_transactor.
router_port The master port pair of the xtsc_router to connect with this xtsc_tlm2pin_-
memory_transactor. router_port must be in the range of 0 to the xtsc_router’s
"num_slaves" parameter minus 1.
port_num The TLM slave port pair of this xtsc_tlm2pin_memory_transactor to con-
nect the xtsc_router with.
The implementation of reset() in xtsc_module logs a warning and does nothing else. Sub-
classes should provide their own implementation if they are able to support reset.
Reimplemented from xtsc_module.
Handle nb_peek() calls. This method can be overriden by a derived class to provide custom
nb_peek handling when this device is used to connect to a Verilog module.
Handle nb_poke() calls. This method can be overriden by a derived class to provide custom
nb_poke handling when this device is used to connect to a Verilog module.
Handle nb_fast_access() calls. This method can be overriden by a derived class to provide
custom nb_fast_access handling when this device is used to connect to a Verilog module.
See also:
xtsc_module_pin_base::get_bool_input()
xtsc_module_pin_base::get_uint_input()
xtsc_module_pin_base::get_wide_input()
xtsc_module_pin_base::get_bool_output()
xtsc_module_pin_base::get_uint_output()
xtsc_module_pin_base::get_wide_output()
• xtsc_tlm2pin_memory_transactor.h
xtsc_parms
xtsc_tlm2pin_memory_transactor_parms
xtsc_parms
xtsc_tlm2pin_memory_transactor_parms
"memory_interface" char* The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW",
"DROM0", "IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0",
"PIF", and "IDMA0" (case-insensitive).
Note: For inbound PIF, set this parameter to "PIF" and
set the "inbound_pif" parameter to true.
Note: For snoop port, set this parameter to "PIF" and
set the "snoop" parameter to true.
"num_ports" u32 The number of memory ports this transactor has. A value
of 1 means this transactor is single-ported, a value of
2 means this transactor is dual-ported, etc. If
"memory_interface" is "DRAM0RW" or "DRAM1RW", then a
read port counts as one port and its corresponding write
port counts as another port.
Default = 1.
Minimum = 1.
"byte_width" u32 Memory data interface width in bytes. Valid values for
"DRAM0", "DRAM0RW", "DRAM1", "DRAM1RW", "DROM0",
"URAM0", and "XLMI0" are 4, 8, 16, 32, and 64. Valid
values for "DRAM0BS" and "DRAM1BS" are 4, 8, 16, and 32.
Valid values for "IRAM0", "IRAM1", "IROM0", "PIF", and
"IDMA0" are 4, 8, and 16.
"dso_cookie" char* Optional C-string to pass to the peek and poke methods
of the DSO named by the "dso_name" parameter. This
model does not use this parameter in any way other then
to pass it to the DSO methods.
Default = NULL.
"initial_value_file" char* If not NULL or empty, this names a text file from which
to read the initial memory contents as byte values.
This parameter is ignored unless a shadow memory is
used.
Default = NULL.
The text file format is:
([@<Offset>] <Value>*)*
"memory_fill_byte" u32 The low byte specifies the value used to initialize
memory contents at address locations not initialize
from "initial_value_file".
This parameter is ignored unless a shadow memory is
used.
Default = 0.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
"sample_phase" u32 This specifies the phase (i.e. the point) in a clock
period at which input pins are sampled. PIF output pins
which are used for handshaking (POReqValid/PORespRdy)
are also sampled at this time. This value is expressed
in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be less than the
clock period as specified by the "clock_period"
parameter. A value of 0 means pins are sampled on
posedge clock as specified by "posedge_offset". A value
of 0xFFFFFFFF, the default, means if "memory_interface"
is PIF|IDMA0, then pins will be sampled at posedge
clock, and if "memory_interface" is not PIF|IDMA0
(i.e. a local memory), then pins will be sampled at 1
SystemC time resolution prior to phase A. This later
value is used to enable meeting the TLM timing
requirements of the local memory interfaces of
xtsc_core. See the discussion under
xtsc_core::set_clock_phase_delta_factors().
Default = 0xFFFFFFFF
"output_delay" u32 This specifies how long to delay before output pins are
driven. The output pins will remain driven for one
clock period (see the "clock_period" parameter). For
request output pins, the delay timing starts when the
nb_request() call is received. For DPortLoadRetired,
DPortRetireFlush, and DRamLock, the delay timing starts
when the nb_load_retire(), nb_retire_flush(), or
nb_lock() call (respectively) is received. For
PORespRdy, the delay timing starts at the sample phase
(see "sample_phase") when the nb_respond() call
returns false. This value is expressed in terms of the
SystemC time resolution (from sc_get_time_resolution())
and must be less than the clock period. A value of 0
means one delta cycle.
Default = 1 (i.e. 1 time resolution).
"inbound_pif" bool Set to true for inbound PIF. Set to false for outbound
PIF or snoop. This parameter is ignored if
"memory_interface" is other then "PIF".
"snoop" bool Set to true for snoop port. Set to false for outbound
or inbound PIF. This parameter is ignored if
"memory_interface" is other then "PIF".
Default = false (outbound or inbound PIF).
"route_id_bits" u32 Number of bits in the route ID. Valid values are 0-32.
If "route_id_bits" is 0, then the "POReqRouteId" and
"PIRespRouteId" output ports will not be present. This
parameter is ignored unless "memory_interface" is "PIF"
or "IDMA0".
"req_user_data" char* If not NULL or empty, this specifies the optional pin-
level port that should be used for xtsc_request user
data. The string must give the port name and bit width
using the format: PortName,BitWidth
Note: The values driven on PortName will be obtained
from the low order BitWidth bits of the void*
pointer returned by xtsc_request::get_user_data().
BitWidth may not exceed 32 or 64 depending on
whether you are using a 32 or 64 bit simulator.
This parameter is ignored unless "memory_interface" is
"PIF" or "IDMA0".
Default = "" (xtsc_request user data is ignored).
"rsp_user_data" char* If not NULL or empty, this specifies the optional pin-
level port that should be used for xtsc_response user
data. The string must give the port name and bit width
using the format: PortName,BitWidth
Note: The values read from PortName will be written to
the low order BitWidth bits of the void* pointer
passed to xtsc_response::set_user_data().
BitWidth may not exceed 32 or 64 depending on
whether you are using a 32 or 64 bit simulator.
This parameter is ignored unless "memory_interface" is
"PIF" or "IDMA0".
Default = "" (xtsc_response user data is ignored).
Parameters which apply to local memories only (that is, non-PIF|IDMA0 memories):
"has_busy" bool True if the memory interface has a busy pin (or ready
pin if "external_udma" is true). This parameter is
"has_lock" bool True if the memory interface has a lock pin. This
parameter is ignored unless "memory_interface" is
"DRAM0", "DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", or
"DRAM1RW".
Default = false.
"has_xfer_en" bool True if the memory interface has an xfer enable pin.
This parameter is ignored if "memory_interface" is
"DROM0", "XLMI0", "PIF", or "IDMA0".
Default = false.
"has_dma" bool True if the memory interface has split Rd/Wr ports
("DRAM0RW"|"DRAM1RW") accessible from inbound PIF.
Default = false.
"ram_select_bit" u32 This parameter specifies which bit in the 32-bit address
selects DataRam0 and DataRam1 when "external_udma" is
true. This parameter is ignored when "external_udma" is
false.
Default = 0xFFFFFFFF (must be explicitly set).
"ram_select_normal" bool This parameter specifies the value that the address bit
specified by "ram_select_bit" should have to select
DataRam0 or DataRam1. True means a value of 0 selects
DataRam0 and a value of 1 selects DataRam1. False
selects the opposite way. This parameter is ignored
when "external_udma" is false.
Default = true.
See also:
xtsc_tlm2pin_memory_transactor
xtsc::xtsc_parms
xtsc::xtsc_initialize_parms
Parameters:
memory_interface The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW", "DROM0",
"IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", "PIF", and "IDMA0" (case-
insensitive).
byte_width Memory data interface width in bytes.
address_bits Number of bits in address. Ignored for "PIF" and "IDMA0".
num_ports The number of memory ports this transactor has.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_tlm2pin_-
memory_transactor_parms.
memory_interface The memory interface type. Valid values are "DRAM0",
"DRAM0BS", "DRAM0RW", "DRAM1", "DRAM1BS", "DRAM1RW", "DROM0",
"IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", "PIF", and "IDMA0" (case-
insensitive).
num_ports The number of ports this transactor has. If 0, the default, the num-
ber of ports will be inferred thusly: For banked DRAM0|DRAM1|DROM0,
the "num_ports" will be equal to the number of banks. For subbanked
DRAM0BS|DRAM1BS, the "num_ports" will be equal to the number of banks
times the number of subbanks per bank. For split R/W DRAM0RW|DRAM1RW,
the "num_ports" will be 2 times the number of Load/Store units plus 2 if there is
an inbound PIf interface. For non-banked, non-split R/W interfaces, if memory_-
interface is a LD/ST unit 0 port of a dual-ported core interface, and the core is
dual-ported and has no CBox, and if the 2nd port of the core has not been bound,
then "num_ports" will be 2; otherwise, "num_ports" will be 1.
The documentation for this class was generated from the following file:
• xtsc_tlm2pin_memory_transactor.h
core0.get_export_state("onebit")(onebit.m_sc_export);
onebit.m_sc_out(onebit_to_BReset);
BReset.m_sc_port(core1.get_input_wire("BReset"));
BReset.m_sc_in(onebit_to_BReset);
See also:
xtsc_tlm2pin_wire_transactor_base::m_sc_export
xtsc_tlm2pin_wire_transactor_base::m_sc_out
xtsc_core::get_export_state()
xtsc_core::get_output_wire()
xtsc_core::get_input_wire()
• xtsc.h
xtsc_wire_write_if
xtsc_tlm2pin_wire_transactor_base< W, T >
xtsc_wire_write_if
xtsc_tlm2pin_wire_transactor_base< W, T >
Public Attributes
Private Attributes
• u32 m_bit_width
This method is called by the wire driver to write a new value to the wire. For the typical
case of an xtsc_core TIE export state, this method is called on each clock cycle in which
the Xtensa core writes a value to the TIE_xxx interface (where xxx is the state name in the
user TIE code).
Parameters:
value The sc_unsigned object containing the value to be written.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_wire_write_if.
Get the wire width in bits. This method allows the wire driver to confirm that the implemen-
tation is using the correct size for the wire.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_wire_write_if.
Definition at line 2899 of file xtsc.h.
The documentation for this class was generated from the following file:
• xtsc.h
xtsc_connection_interface xtsc_resettable
xtsc_module
xtsc_tx_loader
xtsc_tx_xfer_if
m_loader xtsc_tx_xfer_if_impl
xtsc_resettable m_tx_xfer_impl
xtsc_module
xtsc_connection_interface m_incoming_tx_xfer
m_outgoing_tx_xfer m_loader
xtsc_tx_xfer xtsc_tx_loader
m_data_out_floating m_queue_push_impl
xtsc_queue_push_if_impl
m_pop_floating
m_empty_floating m_loader
m_full_floating
m_data_in_floating
m_push_floating
xtsc_queue_push_if m_queue_pop_impl
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating
xtsc_queue_pop_if_impl
xtsc_queue_pop_if
Classes
• class xtsc_queue_pop_if_impl
Implementation of xtsc_queue_pop_if.
• class xtsc_queue_push_if_impl
Implementation of xtsc_queue_push_if.
• class xtsc_tx_xfer_if_impl
Implementation of xtsc_tx_xfer_if.
Public Types
• enum state {
PowerSave = 0,
Configuration = 1,
Loading = 2,
Reading = 3,
ZeroWrites = 4 }
Boot loader state.
• enum internal_address {
IA_address = 0x0,
IA_length = 0x2,
IA_config_read = 0x3,
IA_config_write = 0x4,
IA_boot_loader_mode = 0x5,
IA_done_pin_control = 0x6 }
• typedef enum xtsc::xtsc_tx_loader::state state
Boot loader state.
• SC_HAS_PROCESS (xtsc_tx_loader)
For SystemC modules with processes.
• void before_end_of_elaboration ()
SystemC callback.
• void end_of_elaboration ()
SystemC callback.
• void start_of_simulation ()
SystemC callback.
• void process_image_file_thread ()
Thread to process the image file.
• void handle_tlm_queue_command_input_thread ()
Thread to handle TLM queue input.
• void handle_pin_queue_command_input_thread ()
Thread to handle pin-level queue input (incoming commands).
• void handle_pin_queue_read_thread ()
Thread to handle pin-level queue output (read data).
• void drive_read_queue_output_method ()
SystemC method to drive the read queue’s outputs (empty and data signals).
• void drive_full_queue_output_method ()
SystemC method to drive the read queue’s outputs (empty and data signals).
• void detect_overflow_method ()
SystemC method to detect read fifo overflow.
Public Attributes
• xtsc_tx_xfer ∗ new_xfer (bool done, u32 address, u32 data, bool write, bool turbo)
Get an xtsc_tx_xfer from the pool.
Protected Attributes
• xtsc_signal_sc_bv_base_floating ∗ m_push_floating
Pin: To cap unused push interface.
• xtsc_signal_sc_bv_base_floating ∗ m_data_in_floating
Pin: To cap unused push interface.
• xtsc_signal_sc_bv_base_floating ∗ m_full_floating
Pin: To cap unused push interface.
• xtsc_signal_sc_bv_base_floating ∗ m_pop_floating
Pin: To cap unused pop interface.
• xtsc_signal_sc_bv_base_floating ∗ m_empty_floating
Pin: To cap unused pop interface.
• xtsc_signal_sc_bv_base_floating ∗ m_data_out_floating
Pin: To cap unused pop interface.
• xtsc_tx_xfer_if_impl m_tx_xfer_impl
m_tx_xfer_export binds to this
• xtsc_queue_push_if_impl ∗ m_queue_push_impl
m_producer binds to this
• xtsc_queue_pop_if_impl ∗ m_queue_pop_impl
m_consumer binds to this
• bool m_pin_level
See the "pin_level" parameter.
• sc_core::sc_trace_file ∗ m_p_trace_file
From the "vcd_handle" parameter.
• xtsc_tx_xfer m_outgoing_tx_xfer
For VCD tracing.
• xtsc_tx_xfer m_incoming_tx_xfer
For VCD tracing.
• u32 m_outgoing_count
• u32 m_incoming_count
For VCD tracing.
• u32 m_push_word
For VCD tracing.
• u32 m_read_word
For VCD tracing.
• u32 m_push_count
For VCD tracing.
• u32 m_read_count
For VCD tracing.
• std::string m_image_file_name
See the "image_file" parameter.
• std::ifstream m_image_file
The "image_file" stream.
• u32 m_word_number
word/line number in "image_file"
• bool m_hex_format
See the "hex_format" parameter.
• bool m_binary_format
See the "binary_format" parameter.
• bool m_turbo
See the "turbo" parameter.
• bool m_squelch_loading
See the "squelch_loading" parameter.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• sc_core::sc_time m_clock_period
• u64 m_clock_period_value
Clock period as u64.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• u64 m_posedge_offset_value
m_posedge_offset as u64
• sc_core::sc_time m_sample_phase
From "sample_phase" parameter.
• u64 m_sample_phase_value
Sample phase as u64.
• sc_core::sc_time m_output_delay
From "output_delay" parameter.
• u32 m_address
Address for loading, reading, zeroing.
• u32 m_counter
Counter for loading, reading, zeroing.
• bool m_processing_image_file
Image file processing is in progress.
• state m_state
Boot loader state (aka Mode).
• sc_dt::sc_unsigned m_mode_unsigned
Boot loader state (aka Mode) as sc_unsigned.
• sc_dt::sc_unsigned m_done_unsigned
Done output as sc_unsigned.
• sc_dt::sc_bv_base m_read_bv_base
• sc_dt::sc_bv_base m_full_bv_base
Command queue full output as sc_bv_base.
• bool m_self_connected
m_tx_xfer_port is connected to m_tx_xfer_export
• bool m_done_bound
m_done is connected
• bool m_mode_bound
m_mode is connected
• bool m_push_bound
pin-level input queue interface is connected
• bool m_read_bound
pin-level output queue interface is connected
• u32 m_read_fifo_depth
See the "read_fifo_depth" parameter.
• bool m_allow_overflow
See the "allow_overflow" parameter.
• sc_core::sc_event m_have_read_data_event
Notified when m_consumer (m_read_fifo) has data.
• sc_core::sc_event m_can_accept_push_event
Notified when another push can be accepted.
• sc_core::sc_event m_have_queue_input_event
• sc_core::sc_event m_drive_read_queue_output_event
Used to notify drive_read_queue_output_method.
• sc_core::sc_event m_drive_full_queue_output_event
Used to notify drive_full_queue_output_method.
• sc_core::sc_event m_detect_overflow_event
Used to notify detect_overflow_method.
• u64 m_fifo_overflow_delta_cycle
Delta cycle in which m_read_fifo overflow occurred.
• u32 m_fifo_overflow_old_data
Data that was overwritten by the m_read_fifo overflow.
• u64 m_pop_delta_cycle
Delta cycle in which last pop of m_read_fifo occurred.
XTSC module to model a boot loader for a TX Xtensa chain. This module is designed to
model the boot loader provided by Tensilica. It can be provided an image file to load or
it can be driven by its input queue interface (m_producer). The input queue interface can
be driven by an xtsc_core with a 32-bit TIE output queue interface or by an xtsc_queue_-
producer. Read data can be obtained from the output queue interface (m_consumer). The
output queue interface can be read by an xtsc_core with a 32-bit TIE input queue interface
or by an xtsc_queue_consumer.
If desired, an image file can be provided and after the image file is loaded the input queue
interface can be used.
If desired, this module can be driven by a Verilog module when doing SystemC-Verilog
cosimulation. To do this, set the "pin_level" parameter to true to cause the command input
queue and the read data output queue interfaces to be pin-level. The Done and Mode
wire outputs will remain as TLM interfaces, but transactors can be used to convert them
to pin-level. The xtsc-run program will automatically take care of this for you. For more
information, see the --connect_proxy_loader and/or --connect_wrapper_loader commands
in the xtsc-run reference manual (available using the "xtsc-run --manual" command).
Note: The xtsc_tx_xfer_if has no pin-level counterpart. Because of this, the TX chain
itself cannot cross the SystemC-Verilog boundary. That is, when doing SystemC-Verilog
cosimulation with TX cores, the boot loader and the TX cores it is controlling must all be on
the same side of the boundary (all in SystemC or all in Verilog).
Here is a block diagram of an xtsc_tx_loader as it is used in the xtsc_tx_loader example:
nb_tx_xfer()
core0.get_tx_xfer_export()
xtsc_tx_loader
loader
core0.get_tx_xfer_port()
m_tx_xfer_export
nb_tx_xfer() xtsc_core xtsc_core
m_tx_xfer_port core0
nb_tx_xfer() core1
xtsc_queue_producer
loader_driver (TX with (TX with
boot loader boot loader
“control” = true option) option)
nb_push()
m_control m_queue m_producer
nb_push() xtsc_queue nb_pop()
OUTQ1 INQ1
Q01
“script_file” m_done
=
loader_driver.vec
m_consumer
INQ1
nb_pop() xtsc_queue nb_push() OUTQ1
m_mode Q10
xtsc_wire_logic
logic
nb_write()
CoreHalted CoreHalted0
nb_write() CoreHalted
CoreHalted1
nb_write()
JobDone
See also:
xtsc_tx_loader_parms
xtsc_tx_xfer_if
xtsc_core
xtsc_component::xtsc_queue_producer
xtsc_component::xtsc_queue_consumer
Parameters:
module_name Name of the xtsc_tx_loader sc_module.
loader_parms The remaining parameters for construction.
See also:
xtsc_tx_loader_parms
Connect with an upstream xtsc_core. This method connects this loader with the specified
upstream xtsc_core. Which interfaces are connected depends on the iface argument.
Parameters:
core The xtsc_core to connect with.
iface If iface is "tx_xfer_out", then the output XFER interface of core is connected to
input XFER interface of this loader (so core is the last TX in the chain). If iface
is not "tx_xfer_out", then \"pin_level\" must be false and iface must name a 32-
bit TLM TIE output queue interface of core, which will be connected to the TLM
command queue interface (m_producer) of this loader.
The documentation for this class was generated from the following file:
• xtsc_tx_loader.h
xtsc_parms
xtsc_tx_loader_parms
xtsc_parms
xtsc_tx_loader_parms
"image_file" char* Name of the optional image file to load. This is the
file produced by the xt-load program.
"turbo" bool If true, then the optional image file will be processed
in turbo mode (in 0 simulation time).
Default = As specified by the "turbo" parameter of
xtsc_initialize_parms.
"squelch_loading" bool This parameter controls the logging of data while in the
Loading state. If true, then XTSC_VERBOSE() is used.
If false, then XTSC_INFO() is used.
Default = true.
"allow_overflow" bool If true, then read fifo data that is not popped will be
overwritten after the fifo becomes full. If false, then
an exception will be thrown.
Default = true.
"pin_level" bool If true, pin-level connections are used for the queue
interfaces.
Default = false (TLM connections are used).
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
"sample_phase" u32 This specifies the phase (i.e. the point) in each clock
period at which the signals are sampled. It is
expressed in terms of the SystemC time resolution (from
sc_get_time_resolution()) and must be strictly less than
the clock period as specified by the "clock_period"
parameter. A value of 0 means sampling occurs at
posedge clock as specified by "posedge_offset".
Default = 0.
"output_delay" u32 This specifies how long to delay before queue output
pins are driven. The delay is expressed in terms of the
SystemC time resolution (from sc_get_time_resolution())
and must be less than the clock period. A value of 0
means one delta cycle.
Default = 1 (i.e. 1 time resolution).
See also:
xtsc_tx_loader
xtsc_parms
Parameters:
image_file Name of the optional image file to load.
• xtsc_tx_loader.h
This class carries the information of a TLM transaction on the TX Xtensa XFER (boot
loader) interface.
#include <xtsc/xtsc_tx_xfer.h>
• xtsc_tx_xfer (bool done, u32 address, u32 data, bool config_xfer, bool write, bool
turbo)
Constructor for a normal xtsc_tx_xfer.
• void initialize (bool done, u32 address, u32 data, bool config_xfer, bool write, bool
turbo, u64 tag=0ULL)
Method to re-initialize a pre-existing xtsc_tx_xfer.
• void zeroize ()
Private Attributes
• bool m_done
m_data contains Done pin value (XFER block just passes this one along)
• u32 m_address
The word address (byte address = m_address∗4).
• u32 m_data
The data.
• bool m_config_xfer
True if configuration transaction, false if regular transaction.
• bool m_write
True if write transaction, false if read transaction.
• bool m_read_data
Set to true by the TX core targeted by a read transaction.
• bool m_turbo
Use fast-access (peek/poke).
• u64 m_tag
Unique tag per XFER transaction (artificial).
Friends
• class xtsc_tx_loader
This class carries the information of a TLM transaction on the TX Xtensa XFER (boot
loader) interface.
See also:
xtsc_tx_xfer_if
7.165.2.1 xtsc_tx_xfer ()
Constructor for an empty xtsc_tx_xfer object used to create a pool of pre-allocated xtsc_-
tx_xfer objects. Before using an xtsc_tx_xfer object that was created with this constructor,
either assign another xtsc_tx_xfer object to it or call the initialize() method on it.
See also:
set_done()
See also:
set_address()
See also:
set_data()
See also:
set_config_xfer()
See also:
set_read_data()
See also:
set_turbo()
Get this xfer transaction’s tag. This is an artificial number (not in hardware) useful for
correlating xfer transactions, for example, a log file.
Definition at line 114 of file xtsc_tx_xfer.h.
Parameters:
done If true, then m_data carries the new value of the Done pin (0 or 1). If false, then
this is a regular transaction.
Set the data. For write transacitions, this method may only be called by the boot loader
(although typically, the constructor or the initialize() method would be used instead of this
method). For read transactions, this method must only be called by the TX targeted by the
read transaction.
See also:
get_data()
See also:
get_config_xfer()
See also:
get_write()
Set whether or not this read transaction is carrying read data. Before calling this method,
the TX targeted by a read transaction should first call get_read_data() and throw an excep-
tion if it returns true. It should then call this method with an argument of true.
See also:
get_read_data()
Set whether or not this transaction should be handled turbo style. In turbo style, the trans-
action should propagate completely around the TX chain without yielding to the SystemC
kernel (that is, in a single delta cycle), this includes any reading or writing of configuration
registers and any reading or writing of the DRAM or IRAM memories. In non-turbo style,
each TX in the TX chain has a write transaction for one clock cycle. For a read transaction,
each non-targeted TX also has the transaction for one clock cycle while the TX targeted
by the read transaction has the transaction for two cycles (the extra cycle is to allow the
read transaction to the local memory (DRAM or IRAM) to take place prior to the transaction
being passed to the next TX in the chain.
See also:
get_turbo()
This method dumps this xfer transactions’s info to the specified ostream object. The format
of the output is:
Where:
<Tag> is m_tag in decimal.
<Type> is Done if m_done is true, else is Write if m_write is true,
else is Read.
! indicates m_turbo is true.
# indicates m_config_xfer is true.
<Address> is m_address in hexadecimal (word address).
<Data> is the contents of m_data in hexadecimal.
* indicates m_read_data is false (so data is suspect).
Parameters:
os The ostream object to which the info should be dumped.
The documentation for this class was generated from the following file:
• xtsc_tx_xfer.h
xtsc_tx_xfer_if
xtsc_tx_xfer_if_impl
Interface for sending TLM TX XFER interface transactions. This interface is used for send-
ing TLM XFER interface transactions around a boot loader TX Xtensa chain. A TX chain
starts and ends at the boot loader and has one or more TX cores in the chain.
See also:
xtsc_tx_xfer
xtsc_core
Method to send a TLM XFER transaction. This method is used to send an XFER transac-
tion in the following three situations:
The boot loader is responsible for creating and destroying the xtsc_tx_xfer object.
By contract, the boot loader may not destroy or re-use the xtsc_tx_xfer object until the
delta cycle after the final TX core in the chain has called the nb_tx_xfer() method of the
boot loader.
By contract, a TX core may not modify the xtsc_tx_xfer object passed to it by a call to its
nb_tx_xfer() method after it has called the nb_tx_xfer() method of the downstream module
(either the next TX core in the chain or the boot loader).
A TX core is allow to use an xtsc_tx_xfer in a read-only capacity (for example, for logging)
after it has called nb_tx_xfer of the downstream module so-long as it has not yielded to the
SystemC kernel.
Parameters:
tx_xfer The xtsc_tx_xfer object.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
See also:
xtsc_tx_xfer
Implemented in xtsc_tx_xfer_if_impl.
The documentation for this class was generated from the following file:
• xtsc_tx_xfer_if.h
Implementation of xtsc_tx_xfer_if.
#include <xtsc/xtsc_tx_loader.h>Inheritance diagram for xtsc_tx_xfer_if_impl:
xtsc_tx_xfer_if
xtsc_tx_xfer_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
m_incoming_tx_xfer
xtsc_tx_xfer m_outgoing_tx_xfer
xtsc_queue_push_if
m_data_out_floating
m_pop_floating m_loader xtsc_queue_push_if_impl
m_empty_floating
m_full_floating
m_queue_push_impl
m_data_in_floating
m_push_floating
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating xtsc_tx_loader
m_loader m_queue_pop_impl
m_tx_xfer_impl m_loader
xtsc_tx_xfer_if xtsc_tx_xfer_if_impl xtsc_queue_pop_if_impl
xtsc_queue_pop_if
• bool is_self_connected ()
Return true if the loader’s tx_xfer port is connected to its own export.
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_tx_xfer_if.
Definition at line 363 of file xtsc_tx_loader.h.
Constructor.
Parameters:
object_name The name of this SystemC channel (aka implementation)
loader A reference to the owning xtsc_tx_loader object.
See also:
xtsc_tx_xfer_if
Implements xtsc_tx_xfer_if.
The documentation for this class was generated from the following file:
• xtsc_tx_loader.h
xtsc_connection_interface xtsc_resettable
xtsc_udma
xtsc_respond_if
m_udma
xtsc_pif_respond_if_impl
xtsc_command_handler_interface m_pif_respond_impl
m_ram_respond_impl
udma_descriptor xtsc_ram_respond_if_impl
m_descriptor
m_udma
xtsc_parms xtsc_udma_parms
m_udma_parms
xtsc_udma m_udma
xtsc_connection_interface xtsc_module
m_rer_lookup_impl
m_pif_response xtsc_rer_lookup_if_impl
xtsc_resettable xtsc_mode_switch_if m_ram_response m_wer_lookup_impl
xtsc_lookup_if
xtsc_response m_p_response m_udma
xtsc_wer_lookup_if_impl
m_stream_dumper stream_dumper
Classes
• struct udma_descriptor
Data structure used to store a uDMA descriptor.
• class xtsc_pif_respond_if_impl
Implementation of xtsc_respond_if for system RAM port.
• class xtsc_ram_respond_if_impl
Implementation of xtsc_respond_if for local RAM port.
• class xtsc_rer_lookup_if_impl
Implementation of xtsc_lookup_if for RER port.
• class xtsc_wer_lookup_if_impl
Implementation of xtsc_lookup_if for WER port.
• SC_HAS_PROCESS (xtsc_udma)
This SystemC macro inserts some code required for SC_THREAD’s to work.
• ∼xtsc_udma ()
Destructor.
For xtsc_connection_interface.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
Protected Types
• enum register_address_map {
CONFIG = 0xD0000000,
STATUS,
SRCPTR,
DESTPTR,
DESCFIRSTPTR = 0xD0000010,
DESCLASTPTR,
DESCCURPTR,
DESCNUM,
DESCNUMINCR,
NUMREGS = 9 }
Enumeration used to identify software accessible registers.
• enum direction_t {
RAM2PIF = 0,
PIF2RAM = 1,
RAM2RAM = 2,
PIF2PIF = 3 }
Enumeration used to identify the access direction.
• enum error_t {
BAD_DESCRIPTOR_ERROR = 0x0001,
CROSS_RAM_BOUNDARY_ERROR = 0x0002,
PIF_ADDRESS_ERROR = 0x0004,
PIF_DATA_ERROR = 0x0008,
PIF_ADDRESS_DATA_ERROR = 0x0010,
UDMA_OK = 0x0000 }
Enumeration used to identify DMA error codes.
• bool compute_block_transfers ()
Compute PIF block transfer size (returns false if BAD_DESCRIPTOR error happens).
• void compute_delays ()
Common method to compute/re-compute time delays.
• error_t do_local_read_transfers ()
This method implements local RAM read transfers in a cycle-accurate simulation.
• error_t do_local_write_transfers ()
This method implements local RAM write transfers in a cycle-accurate simulation.
• error_t do_pif_block_read_transfers ()
This method implements PIF block read transfers in a cycle-accurate simulation.
• error_t do_pif_block_write_transfers ()
This method implements PIF block write transfers in a cycle-accurate simulation.
• error_t do_pif_single_read_transfers ()
This method implements PIF partial read transfers in a cycle-accurate simulation.
• error_t do_pif_single_write_transfers ()
This method implements PIF partial write transfers in a cycle-accurate simulation.
• void do_turbo_transfers ()
This method implements uDMA operation in turbo mode.
• void flush_pif_fifo ()
Flush PIF output fifo.
Protected Attributes
• xtsc_udma_parms m_udma_parms
Copy of xtsc_udma_parms.
• u32 m_ram_byte_width
See "ram_byte_width".
• u32 m_pif_byte_width
See "pif_byte_width".
• u8 m_ram_read_priority
See "ram_read_priority".
• u8 m_ram_write_priority
See "ram_write_priority".
• u8 m_pif_read_priority
See "pif_read_priority".
• u8 m_pif_write_priority
See "pif_write_priority".
• sc_core::sc_time m_clock_period
See "clock_period".
• sc_core::sc_time m_ram_read_delay
See "ram_read_delay".
• sc_core::sc_time m_ram_write_delay
See "ram_write_delay".
• sc_core::sc_time m_nacc_wait_time
See "nacc_wait_time".
• sc_core::sc_time m_posedge_offset
See "posedge_offset".
• sc_core::sc_time m_sync_offset
See "sync_offset".
• bool m_turbo
See "turbo".
• bool m_use_peek_poke
See "use_peek_poke".
• bool m_log_single_line
See "log_single_line".
• u8 m_udma_version
See "udma_version".
• xtsc_address m_source_address
Current source address.
• xtsc_address m_destination_address
Current destination address.
• xtsc_address m_desc_first_ptr
Descriptor first pointer in memory.
• xtsc_address m_desc_last_ptr
Descriptor last pointer in memory.
• xtsc_address m_desc_cur_ptr
Descriptor current pointer in memory.
• u32 m_desc_num
Number of descriptors to execute.
• u16 m_error_status
Keep the error state of uDMA operation.
• bool m_udma_enable
Indicate that uDMA is enabled to start its operation.
• bool m_busy
If true, uDMA is busy and transferring data.
• bool m_error_intr_enabled
If true, assert an error interrupt at the completion of the current descriptor (if needed).
• udma_descriptor m_descriptor
Current descriptor.
• direction_t m_udma_direction
uDMA transfer direction (RAM2PIF or PIF2RAM)
• u32 m_block_transfers
Block transfer size (2,4,8, or 16 transfers).
• u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• sc_core::sc_time m_sync_offset_plus_one
The sync offset on the next clock cycle.
• u32 m_ram_transfer_byte_size
Local ram transfer byte size, needed when RAM byte width is greater than the transfer byte
number.
• u32 m_ram_words_index
Index of stored data in m_ram_words buffer.
• u8 m_ram_words [xtsc::xtsc_max_bus_width8]
Buffer used for collecting data from PIF and sending it to the local RAM.
• sc_core::sc_event m_dma_thread_start_event
Signal uDMA to start its operation.
• sc_core::sc_event m_ram_control_start_event
Signal ram_control_thread to start its operation.
• sc_core::sc_event m_ram_words_available_event
Notify ram_control_thread when ram write data is collected via PIF port and is ready to
send.
• u32 m_pif_response_count
PIF response count, used in block transfers.
• u32 m_pif_transfer_byte_size
Byte size of partial or block PIF transfers.
• u16 m_pif_error
• bool m_terminate_transfers
uDMA threads notify transfers terminations when a PIF error happens
• xtsc_rer_lookup_if_impl ∗ m_rer_lookup_impl
RER xtsc_lookup_if implementation, m_rer_lookup_export binds to this.
• u32 m_rer_address_bit_width
RER tie lookup address bit width.
• u32 m_rer_data_bit_width
RER tie lookup data bit width.
• sc_dt::sc_unsigned m_rer_data
RER tie lookup data.
• xtsc_wer_lookup_if_impl ∗ m_wer_lookup_impl
WER xtsc_lookup_if implementation, m_wer_lookup_export binds to this.
• u32 m_wer_address_bit_width
WER tie lookup address bit width.
• u32 m_wer_data_bit_width
WER tie lookup data bit width.
• xtsc_ram_respond_if_impl ∗ m_ram_respond_impl
Local RAM xtsc_response_if implementation.
• xtsc_response ∗ m_ram_response
Pointer to a local RAM response.
• sc_core::sc_event m_ram_response_available_event
To notify that uDMA has received a local RAM response.
• xtsc_pif_respond_if_impl ∗ m_pif_respond_impl
PIF xtsc_response_if implementation.
• xtsc_response ∗ m_pif_response
Pointer to a PIF response.
• sc_core::sc_event m_pif_response_available_event
• u16 m_num_out_pif_requests
Keep the number of outstanding PIF requests.
• bool m_prepare_to_switch
Indicate switch to turbo mode.
• sc_core::sc_event m_ready_to_switch_event
Signal ready to switch simulation mode.
• sc_core::sc_event m_switch_mode_done_event
Signal a successful simulation mode switch.
• sc_core::sc_event m_turbo_finish_event
Indicate completion of turbo transfers for the programmed uDMA.
• u64 m_descriptor_cycle_count
Total number of cycles for teh current descriptor execution.
• double m_descriptor_transfer_rate
Transfer rate [bytes/cycle] of the current descriptor.
• Source address
• Destination address
• Control (syncInterrupt enable, maximum block size, maximum outstanding PIF re-
quests, number of bytes to transfer)
• Number of rows
• Source pitch
• Destination pitch
• For partial size transfers (1, 2, 4, 8, 16 Bytes): (a) both source and destination ad-
dress must have the same 16B alignment, (b) both source and destination address
must be aligned to the number of bytes being transferred.
• For block size transfers (32, 64, 128, 256 Bytes): (a) the total number of bytes must
be an integer multiple of the block size, (b) the external memory address must be
aligned to the byte size of the block transaction, (c) the local memory address must
be aligned to the smaller of the local memory byte width or the block transaction byte
size, (d) the row transfer must not cross the local memory boundaries.
The xtsc_udma has a set of software accessible registers, that can be programmed via
RER and WER instructions:
--------------------------------------------------------------------------------------------
Register Name WER/RER Address Description
--------------------------------------------------------------------------------------------
Config 0xD0000000 Configuration register, which includes the following
fields.
Enable: Index 0 0: Disabled, 1: Enabled
NMI: Index 1 0: Disabled, 1: Enabled
Version:Index 31:28
Status 0xD0000001 Status register, which includes the following fields.
Busy: Index 0 Busy processing uDMA descriptors
Error: Index 31:16 One-hot error bits:
0x0001: Bad descriptor
0x0002: DMA crosses DRam boundary
0x0004: PIF address bus error
0x0008: PIF data bus error
SrcPtr 0xD0000002 Current source address register.
DestPtr 0xD0000003 Current destination address register.
DescFirstPtr 0xD0000010 Descriptor first pointer in memory.
DescLastPtr 0xD0000011 Descriptor last pointer in memory.
DescCurPtr 0xD0000012 Descriptor current pointer in memory.
DescNum 0xD0000013 Number of descriptor to execute. Valid values 0 to 63.
DescNumIncr 0xD0000014 Increment number of descriptors. Write-only.
see xtsc_udma_parms
Definition at line 334 of file xtsc_udma.h.
Enumerator:
CONFIG Configuration register.
STATUS DMA status.
SRCPTR Current source address pointer.
DESTPTR Current destination address pointer.
DESCFIRSTPTR Descriptor first pointer in memory.
DESCLASTPTR Descriptor last pointer in memory.
DESCCURPTR Descriptor current pointer in memory.
DESCNUM Number of descriptors to execute.
Enumerator:
RAM2PIF Local RAM to PIF transfers.
PIF2RAM PIF to local RAM transfers.
RAM2RAM Local RAM to local RAM transfers.
PIF2PIF PIF to PIF transfers.
Enumerator:
BAD_DESCRIPTOR_ERROR Bad descriptor.
CROSS_RAM_BOUNDARY_ERROR DMA crosses DRAM boundary.
PIF_ADDRESS_ERROR PIF address bus error.
PIF_DATA_ERROR PIF data bus error.
PIF_ADDRESS_DATA_ERROR PIF address and data bus error.
UDMA_OK DMA OK (no error).
Parameters:
module_name Name of the xtsc_udma sc_module.
udma_parms The remaining parameters for construction.
See also:
xtsc_udma_parms
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
7.168.4.2 void dump_descriptor (std::ostream & os, bool single_line = true) const
This method dumps the current descriptor info to the specified ostream object.
Parameters:
os The ostream object to which the dump should be done.
single_line If true, a single line format will be used.
Where:
<address> is m_desc_cur_ptr in hexadecimal.
<SA> is m_descriptor.source_address in hexadecimal.
<DA> is m_descriptor.destination_address in hexadecimal.
<NumBytes> is m_descriptor.num_bytes in decimal.
<NumTransfers> is m_descriptor.max_block_transfers in decimal.
<NumOutstanding> is m_descriptor.max_num_out in decimal.
<NumRows> is m_descriptor.num_rows in decimal.
<SP> is m_descriptor.source_pitch in hexadecimal.
<DP> is m_descriptor.destination_pitch in hexadecimal.
<IntrEnable> is is m_descriptor.sync_intr_enabled in boolean.
Parameters:
os The ostream object to which the dump should be done.
Where:
<address> is m_desc_cur_ptr in hexadecimal.
<CC> is the total number of cycles in decimal.
<TR> is the number of bytes transfered per cycle in double.
Calculated as (m_descriptor.num_rows x m_descriptor.num_bytes) / <CC>.
change_clock_period <ClockPeriodFactor>
Call xtsc_udma::change_clock_period(<ClockPeriodFactor>). Return previous
<ClockPeriodFactor> for this uDMA.
dump_descriptor
Call xtsc_udma::dump_descriptor(). Dump the current descriptor details.
dump_profile_results
Call xtsc_udma::dump_profile_results(). Dump the current descriptor execution info.
reset
Call xtsc_udma::reset().
Implements xtsc_command_handler_interface.
The documentation for this class was generated from the following file:
• xtsc_udma.h
xtsc_parms
xtsc_udma_parms
xtsc_parms
xtsc_udma_parms
Constructor parameters for an xtsc_udma object. This class contains the constructor pa-
rameters for a xtsc_udma object.
"ram_byte_width" u32 The byte width of the data interface of the local
memory slaves. NOTE: this parameter must be an
integral multiple of "pif_byte_width" parameter.
Default = 64.
"pif_byte_width" u32 The byte width of the data interface of PIF slave.
Default = 16.
See also:
xtsc_udma
xtsc::xtsc_parms
Constructor for an xtsc_udma object. After the object is constructed, the data members
can be directly written using the appropriate xtsc_parms::set() method in cases where non-
default values are desired.
Parameters:
ram_byte_width The byte width of the data interface of the local memory.
ram_start_address Starting byte address of the local memory.
ram_byte_size Local memory byte size.
pif_byte_width The byte width of the data interface of PIF slave.
• xtsc_udma.h
• xtsc.h
xtsc_lookup_if
xtsc_wer_lookup_if_impl
m_rer_lookup_impl
xtsc_command_handler_interface
m_udma m_udma
xtsc_wer_lookup_if_impl
m_wer_lookup_impl m_ram_respond_impl
xtsc_udma xtsc_ram_respond_if_impl
m_descriptor m_pif_respond_impl
udma_descriptor
m_udma_parms
xtsc_respond_if xtsc_pif_respond_if_impl
xtsc_resettable xtsc_module m_pif_response
m_ram_response
xtsc_connection_interface
xtsc_response m_p_response
stream_dumper
m_stream_dumper
• u32 nb_get_data_bit_width ()
• virtual const sc_core::sc_event & default_event () const
Get the event that will be notified when the lookup data is available.
Protected Attributes
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
See also:
xtsc::xtsc_lookup_if
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
Definition at line 621 of file xtsc_udma.h.
See also:
xtsc::xtsc_lookup_if
Implements xtsc_lookup_if.
Definition at line 624 of file xtsc_udma.h.
The documentation for this class was generated from the following file:
• xtsc_udma.h
xtsc_connection_interface xtsc_resettable
xtsc_wire
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
xtsc_wire_write_if xtsc_wire
m_read_file
xtsc_wire_read_if
xtsc_script_file
• ∼xtsc_wire ()
Destructor.
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• sc_dt::sc_unsigned nb_read ()
This method is used to read a value from this xtsc_wire.
• xtsc::u32 nb_get_bit_width ()
Returns the bit width of this wire implementation.
• void get_next_read_file_value ()
Set m_has_read_file_value and m_read_file_value.
Protected Attributes
• bool m_use_wire
Function as a normal wire or use read/write files.
• xtsc::u32 m_width1
Bit width of wire.
• xtsc::u32 m_width8
Byte width of wire.
• sc_dt::sc_unsigned ∗ m_p_wire
The wire.
• sc_dt::sc_unsigned m_initial_value
Initial value of the wire.
• sc_dt::sc_unsigned m_value
Latest value written to or read from the wire.
• sc_core::sc_trace_file ∗ m_p_trace_file
Pointer to sc_trace_file or NULL if not tracing.
• bool m_log_data_binary
True if transaction data should be logged by m_binary.
• std::string m_write_file_name
Name of file to write values to.
• std::string m_read_file_name
Name of file to read values from.
• std::ofstream ∗ m_write_file
File to write values to.
• bool m_timestamp
From "timestamp" parameter.
• xtsc::xtsc_script_file ∗ m_read_file
File to read values from.
• bool m_wraparound
Should "read_file" wraparound.
• bool m_has_read_file_value
Does "read_file" have more values.
• sc_dt::sc_unsigned m_read_file_value
Current value from "read_file".
• std::string m_line
Current line from "read_file".
• xtsc::u32 m_next_word_index
Index of current value word in m_words vector.
• xtsc::u32 m_read_file_line_number
Current line of "read_file".
• sc_core::sc_event m_write_event
Each time nb_write() is called.
• bool m_host_shared_memory
See "host_shared_memory" parameter.
• std::string m_shmem_name
Shared Memory: name.
• xtsc::u8 ∗ m_p_buffer
Shared Memory: intermediate buffer between sc_unsigned & host OS shared memory.
• xtsc::u8 ∗ m_p_shmem
Shared Memory: pointer to host OS shared memory.
• xtsc::u32 m_shmem_total_size
Shared Memory: number of bytes in shared memory.
A wire implementation that connects using TLM-level ports. Example XTSC wire class that
implements xtsc::xtsc_wire_write_if and xtsc::xtsc_wire_read_if.
To write to this xtsc_wire, bind an sc_port<xtsc_wire_write_if> object to this xtsc_wire. To
read from this xtsc_wire, bind an sc_port<xtsc_wire_read_if> object to this xtsc_wire. This
can be done manually using raw SystemC port binding or by using the xtsc::xtsc_connect()
method.
By default this xtsc_wire uses an internal data member to store the wire value. If desired,
the wire can be configured to instead use host OS shared memory to store the wire value
by setting "host_shared_memory" to true. This can be used to speed up a multi-core
simulation by partitioning it into multiple host processes that run on separate processor
cores of the host workstation. It can also be used to allow a separate (potentially non-
XTSC) host process to read and/or write the wire or just passively monitor it. For example
on Linux:
hexdump -C /dev/shm/username.core0_to_core1
(core0_to_core1)
core0.get_export_state(“status”) core1.get_import_wire("control")
xtsc_core core0
nb_write() nb_read() xtsc_core core1
xtsc_wire core0_to_core1
(source.out) (sink.out)
Here is the code to connect the xtsc_wire between core0 and core1 using raw SystemC
port binding:
core0.get_export_state("status")(core0_to_core1);
core1.get_import_wire("control")(core0_to_core1);
And here is the code in sc_main.cpp to do the same thing using the xtsc::xtsc_connect()
method:
See also:
xtsc_wire_parms
xtsc::xtsc_wire_read_if
xtsc::xtsc_wire_write_if
xtsc::xtsc_connect()
xtsc::xtsc_core::How_to_do_port_binding
xtsc::xtsc_core::get_export_state()
xtsc::xtsc_core::get_import_wire()
xtsc::xtsc_core::get_system_output_wire()
Parameters:
module_name Name of the xtsc_wire sc_module.
wire_parms The remaining parameters for construction.
See also:
xtsc_wire_parms
7.172.3.1 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
read
Return the value from calling nb_read().
write <Value>
Call nb_write(<Value>).
reset
Call xtsc_wire::reset().
Implements xtsc_command_handler_interface.
Connect to an xtsc_core. This method connects an export state, import wire, or system-
level output of an xtsc_core to this xtsc_wire.
Parameters:
core The xtsc_core to connect to.
core_intf_name The export state, import wire, or system-level output of the xtsc_core
that is to be connected to this xtsc_wire. For an export state or an import wire,
core_intf_name is the name as it appears in the user’s TIE code (it must NOT
begin with the "TIE_" prefix). For a system-level output, core_intf_name is the
name as it appears in the Xtensa microprocessor data book. See xtsc::xtsc_-
core::get_output_wire().
Parameters:
source The xtsc_wire_source to connect to.
output_name The output of the xtsc_wire_source to be connected to this xtsc_wire.
If NULL then the default (first/only) output of source will be connected.
Connect to an xtsc_mmio. This method connects the named output of the xtsc_mmio to
this xtsc_wire.
Parameters:
mmio The xtsc_mmio to connect to.
output_name The output of the xtsc_mmio to be connected to this xtsc_wire.
Connect to an xtsc_wire_logic. This method connects the named output of the xtsc_wire_-
logic to this xtsc_wire.
Parameters:
logic The xtsc_wire_logic to connect to.
output_name The output of the xtsc_wire_logic to be connected to this xtsc_wire.
Connect to an xtsc_tx_loader. This method connects the named output of the xtsc_tx_-
loader to this xtsc_wire.
Parameters:
loader The xtsc_tx_loader to connect to.
output_name The output of the xtsc_tx_loader to be connected to this xtsc_wire.
Valid output names are Mode and Done.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
See also:
xtsc::xtsc_wire_read_if
Implements xtsc_wire_read_if.
See also:
xtsc::xtsc_wire_read_if
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
Definition at line 458 of file xtsc_wire.h.
The documentation for this class was generated from the following file:
• xtsc_wire.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_command_handler_interface
xtsc_wire_logic
xtsc_connection_interface xtsc_resettable
m_p_definition_file
xtsc_wire_logic
Classes
• class input_definition
Input definition and sc_export.
• class iterator_definition
Iterator definition.
• class output_definition
Output definition and sc_port.
• class output_info
Information about a delayed output value.
• SC_HAS_PROCESS (xtsc_wire_logic)
This SystemC macro inserts some code required for SC_THREAD’s to work.
• ∼xtsc_wire_logic (void)
Destructor.
• void delay_thread ()
Handle delayed outputs.
• virtual void execute (const std::string &cmd_line, const std::vector< std::string >
&words, const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
• void connect (xtsc::xtsc_core &core, const char ∗core_intf_name, const char ∗io_-
name)
Connect an xtsc_wire_logic input or output to an xtsc_core.
• void connect (xtsc_wire_logic &logic, const char ∗output_name, const char ∗input_-
name)
Connect the output of another xtsc_wire_logic to an input of this xtsc_wire_logic.
• void connect (xtsc_mmio &mmio, const char ∗output_name, const char ∗input_-
name)
Connect an xtsc_mmio output to an input of this xtsc_wire_logic.
Protected Types
• typedef std::vector< xtsc::u32 > rpn_assignment
• typedef std::vector< rpn_assignment ∗ > assignment_table
• typedef std::vector< output_definition ∗ > output_definition_vector
• typedef std::map< std::string, output_definition ∗ > output_definition_map
• typedef std::vector< input_definition ∗ > input_definition_vector
• typedef std::map< std::string, input_definition ∗ > input_definition_map
• typedef std::map< std::string, iterator_definition ∗ > iterator_definition_map
• typedef std::vector< iterator_definition ∗ > iterator_definition_vector
• typedef std::set< output_definition ∗ > output_set
• typedef std::set< input_definition ∗ > input_set
• typedef sc_core::sc_port< xtsc::xtsc_wire_write_if, NSPP > wire_write_port
• typedef sc_core::sc_export< xtsc::xtsc_wire_write_if > wire_write_export
• void handle_iterator ()
Handle iterator line.
• void handle_assign ()
Handle assign line.
• void handle_lua_function ()
Handle lua_function line.
Protected Attributes
• sc_core::sc_time m_clock_period
This device’s clock period.
• xtsc::xtsc_script_file ∗ m_p_definition_file
The script file from "definition_file" parameter.
• std::string m_definition_file
The name of the script file from the "definition_file" parameter.
• std::string m_line
Current line of script file.
• xtsc::u32 m_line_count
Current line number in script file.
• output_definition_vector m_outputs
Vector of all output definitions.
• output_definition_vector m_delayed_outputs
Vector of output definitions for delayed outputs.
• output_definition_map m_output_definition_map
Map of output definitions.
• input_definition_vector m_inputs
Vector of all input definitions.
• input_definition_map m_input_definition_map
Map of input definitions.
• iterator_definition_map m_iterator_definition_map
Map of iterator definitions.
• iterator_definition_vector m_iterators
Vector of all iterator definitions.
• xtsc::u32 m_max_depth
Maximum stack depth needed.
• assignment_table m_assignments
List of all defined RPN assignments.
• xtsc::u32 m_next_delay_thread_index
Used by delay_thread upon entry to get its output.
• xtsc::xtsc_port_table m_port_table_all
All wire inputs and outputs.
• xtsc::xtsc_port_table m_port_table_all_inputs
All wire inputs.
• xtsc::xtsc_port_table m_port_table_all_outputs
All wire outputs.
Friends
• std::ostream & operator<< (std::ostream &os, const output_definition &output)
• std::ostream & operator<< (std::ostream &os, const input_definition &input)
• std::ostream & operator<< (std::ostream &os, const iterator_definition &output)
A general-purpose glue logic device for the xtsc::xtsc_wire_write_if. This device supports
general-purpose glue and delay logic for the xtsc::xtsc_wire_write_if. It can have an arbi-
trary number of inputs and an arbitrary number of outputs and have each bit of each output
be an arbitrary function of the input bits. A file (named by the "definition_file" parameter
of xtsc_wire_logic_parms) is used to define the input and output ports and the mapping
between them.
This device has as many I/O ports as are defined in the definition file. The input ports
(technically, sc_export<xtsc_wire_write_if>) can be written by any device having an sc_-
port<xtsc_wire_write_if>, for example, a TIE export state of an xtsc::xtsc_core, an xtsc_-
mmio output, or an xtsc_wire_source. The output ports (technically, sc_port<xtsc_wire_-
write_if>) can be connected to any device implementing the xtsc::xtsc_wire_write_if, for
example, a system-level input wire of an xtsc::xtsc_core such as "BInterrupt" or "BReset",
an xtsc_mmio input, or an xtsc_wire.
Because the I/O ports are not known until construction time (when the definition file is
processed), they are not named members of the class. To perform port binding, use the
xtsc::xtsc_connect() method or do manual SystemC port binding using the get_input() and
get_output() methods to obtain references to the desired ports.
Here is a block diagram of an xtsc_wire_logic as it is used in the example:
xtsc_wire_logic logic
(logic.def)
32
xtsc_wire not_A
not_A / (not_A.dat)
32
xtsc_wire A_and_B
A_and_B / (A_and_B.dat)
32
xtsc_wire A_or_B
A_or_B / (A_or_B.dat)
xtsc_wire_source source
(source.def)
(source.vec) nb_write() 32
xtsc_wire A_xor_B
A_xor_B / (A_xor_B.dat)
32
A / A
xtsc_wire A0
A0 (A0.dat)
nb_write()
32
xtsc_wire A1
B / B A1 (A1.dat)
32
xtsc_wire A_dup1
A_dup1 / (A_dup1.dat)
32
xtsc_wire A_dup2
A_dup2 / (A_dup2.dat)
64
xtsc_wire A_B
A_B / (A_B.dat)
And here is the code to connect using manual SystemC port binding:
source.get_tlm_output("A")(logic.get_input("A"));
source.get_tlm_output("B")(logic.get_input("B"));
logic.get_output("not_A") (not_A);
logic.get_output("A_and_B")(A_and_B);
logic.get_output("A_or_B") (A_or_B);
logic.get_output("A_xor_B")(A_xor_B);
logic.get_output("A0") (A0);
logic.get_output("A1") (A1);
logic.get_output("A_dup1") (A_dup1);
logic.get_output("A_dup2") (A_dup2);
logic.get_output("A_B") (A_B);
See also:
xtsc_wire_logic_parms
xtsc::xtsc_core
xtsc_mmio
xtsc_wire
xtsc_wire_source
xtsc::xtsc_connect()
xtsc::xtsc_core::How_to_do_port_binding
xtsc::xtsc_core::get_export_state()
xtsc::xtsc_core::get_system_input_wire()
xtsc::xtsc_core::get_system_output_wire()
Parameters:
module_name Name of the xtsc_wire_logic sc_module.
wire_logic_parms The remaining parameters for construction.
See also:
xtsc_wire_logic_parms
Return the sc_export of the named input. This method is used for port binding. For exam-
ple, to bind the TIE export state named "foo" of an xtsc_core named core0 to the sc_export
input named "bar" of an xtsc_wire_logic named logic:
core0.get_export_state("foo")(logic.get_input("bar"));
Return the sc_port of the named output. This method is used for port binding. For exam-
ple, to bind the sc_port output named "vectors" of an xtsc_wire_logic named logic to the
"BInterrupt" system-level input of an xtsc_core named core0:
logic.get_output("vectors")(core0.get_input_wire("BInterrupt"));
7.173.3.3 virtual void execute (const std::string & cmd_line, const std::vector<
std::string > & words, const std::vector< std::string > & words_lc,
std::ostream & result) [virtual]
reset
Call xtsc_wire_logic::reset().
Implements xtsc_command_handler_interface.
Parameters:
core The xtsc_core to connect to.
core_intf_name The export state or system-level output/input wire of the xtsc_core
that is to be connected to this xtsc_wire_logic. For an export state, core_intf_-
name is the name as it appears in the user’s TIE code (it must NOT begin with
the "TIE_" prefix). For a system-level output/input wire, core_intf_name is the
name as it appears in the Xtensa microprocessor data book.
io_name The output or input of this xtsc_wire_logic to be connected to the xtsc_core.
If core_intf_name is an xtsc_core export state or a system-level output wire then
io_name must name an input. If core_intf_name is an xtsc_core system-level
input wire then io_name must name an output.
See also:
xtsc::xtsc_core::get_output_wire().
xtsc::xtsc_core::get_input_wire().
Parameters:
loader The xtsc_tx_loader to be connected.
output_name The output of the xtsc_tx_loader to be connected to this xtsc_wire_-
logic.
input_name The input of this xtsc_wire_logic that the xtsc_tx_loader is to be con-
nected to.
7.173.3.6 void connect (xtsc_wire_logic & logic, const char ∗ output_name, const
char ∗ input_name)
Parameters:
logic The other xtsc_wire_logic to be connected.
output_name The output of the other xtsc_wire_logic to be connected to this xtsc_-
wire_logic.
input_name The input of this xtsc_wire_logic that the xtsc_wire_logic is to be con-
nected to.
7.173.3.7 void connect (xtsc_mmio & mmio, const char ∗ output_name, const
char ∗ input_name)
Parameters:
mmio The xtsc_mmio to be connected.
output_name The output of the xtsc_mmio to be connected to this xtsc_wire_logic.
input_name The input of this xtsc_wire_logic that the xtsc_mmio is to be connected
to.
Parameters:
source The xtsc_wire_source to connect to this xtsc_wire_logic.
output_name The output of the xtsc_wire_source to be connected to this xtsc_wire_-
logic. If this parameter is NULL or empty then the default (first/only) output of
source will be connected.
input_name The input of this xtsc_wire_logic that the xtsc_wire_source is to be con-
nected to.
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
7.173.3.10 bool parse_operand (xtsc::u32 index, std::string & io_name, bool &
is_iterator, xtsc::u32 & index_value) [protected]
Parse operand at m_words[index] (this could also be the LHS of the assign).
Parameters:
index Index into m_words.
io_name A reference in which to return the input/output name found in the operand
is_iterator A reference in which to return whether operand is an iterator.
index_value A reference in which to return the iterator index or the input/output index.
Returns:
true if operand has an iterator or an input/output index.
The documentation for this class was generated from the following file:
• xtsc_wire_logic.h
xtsc_parms
xtsc_wire_logic_parms
xtsc_parms
xtsc_wire_logic_parms
input SigIn2 3
output SigOut 9
iterator i 0 5
assign SigOut[i] = SigIn1[i]
iterator i 6 8
iterator j 0 2
assign SigOut[i] = SigIn2[j]
- 4 bit output is bit-wise AND of two 4-bit inputs
input SigIn1 4
input SigIn2 4
output SigOut 4
assign SigOut = SigIn1 SigIn2 &
- 1 bit output is reduction AND of 4 bit input
input In 4
output Out 1
assign Out = In[0] In[1] In[2] In[3] & & &
- 1 bit output is OR of 4 1-bit inputs
Using assign:
input In0 1
input In1 1
input In2 1
input In3 1
output Out 1
assign Out = In0 In1 In2 In3 | | |
Using lua_function:
#lua_beg
function my_or(arg1, arg2, arg3, arg4)
return ((arg1 == "0x1") or
(arg2 == "0x1") or
(arg3 == "0x1") or
(arg4 == "0x1")) and "0x1" or "0x0"
end
#lua_end
input In0 1
input In1 1
input In2 1
input In3 1
output Out 1
lua_function Out my_or In0 In1 In2 In3
See also:
xtsc_wire_logic
xtsc::xtsc_parms
Parameters:
definition_file See the "definition_file" parameter
• xtsc_wire_logic.h
xtsc_parms
xtsc_wire_parms
xtsc_parms
xtsc_wire_parms
• void init (xtsc::u32 width1=1, const char ∗write_file=0, const char ∗read_file=0, bool
wraparound=false)
Do initialization common to both constructors.
Constructor parameters for a xtsc_wire object. This class contains the constructor param-
eters for a xtsc_wire object.
"wraparound" bool Specifies what should happen when the end of file
(EOF) is reached on "read_file". When EOF is
reached and "wraparound" is true, "read_file" will
be reset to the beginning of file and nb_read() will
return the first value from the file. When EOF is
reached and "wraparound" is false, nb_read() will
return the last value in "read_file" (or 0 if
"read_file" is empty).
Default = false.
"host_shared_memory" bool If true the storage for the wire value will be created
at module construction time as host OS shared memory
using shm_open() on Linux and CreateFileMapping() on
MS Windows. If this parameter is set true, then neither
"read_file" nor "write_file" may be used.
Default = false.
Note: To cause xtsc_wire to function as a normal wire, set both "write_file" and
"read_file" parameter values to null (the default) or empty and bind at least
one sc_port<xtsc_wire_write_if> to the xtsc_wire and bind at least one
sc_port<xtsc_wire_read_if> to the xtsc_wire.
To cause xtsc_wire to sink from one file and source from another, specify both
file names and bind at least one sc_port<xtsc_wire_write_if> to the xtsc_wire
and bind at least one sc_port<xtsc_wire_read_if> to the xtsc_wire.
To use host OS shared memory for the wire value, set "host_shared_memory" to
true and do not set "read_file" or "write_file".
See also:
xtsc_wire
xtsc::xtsc_parms
Parameters:
width1 Width of the wire in bits.
write_file Name of file to write nb_write() values to instead of writing them to the wire.
read_file Name of file to read nb_read() values from instead of reading them from the
wire.
wraparound Indicates if read_file should wraparound to the beginning of the file after
the end of file is reached.
Constructor for an xtsc_wire_parms object based upon an xtsc_core object and a named
TIE export state, import wire, or system-level output wire. This constructor will determine
width1 by querying the core object and then pass it to the init() method. If desired, after
the xtsc_wire_parms object is constructed, its data members can be changed using the
appropriate xtsc::xtsc_parms::set() method before passing it to the xtsc_wire constructor.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_wire_parms.
core_intf_name The name of the TIE export state or import wire as it appears in the
user’s TIE code or the name of the system level output as it appears in the Xtensa
Microprocessor Data Book. Only a subset of system level outputs is supported.
See xtsc::xtsc_core::get_output_wire().
write_file Name of file to write nb_write() values to instead of writing them to the wire.
read_file Name of file to read nb_read() values from instead of reading them from the
wire.
wraparound Indicates if read_file should wraparound to the beginning of the file after
the end of file is reached.
The documentation for this class was generated from the following file:
• xtsc_wire.h
xtsc_wire_read_if
xtsc_wire
Interface for reading (sinking) a wire. This TLM-level interface is for connecting between a
wire sink (e.g. an import wire of an xtsc_core) and a wire implementation provided by the
user (e.g. xtsc_component::xtsc_wire). The wire sink has an sc_port<xtsc_wire_read_if>
used to connect to the wire implementation which either inherits from this interface or has
an sc_export<xtsc_wire_read_if>.
Note: The methods of xtsc_wire_read_if are all non-blocking in the OSCI TLM sense. That
is, they must NEVER call wait() either directly or indirectly. The "nb_" method prefix stands
for Non-Blocking.
See also:
xtsc_wire_read_if
xtsc_core::How_to_do_port_binding
xtsc_core::get_import_wire
xtsc_component::xtsc_wire
This method is called by the wire sink to read the value of the wire. For the typical case of
an xtsc_core TIE import wire, this method is called on each clock cycle in which the Xtensa
core reads a value from the TIE_xxx interface (where xxx is the import wire name in the
user TIE code).
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_wire.
Get the wire width in bits. This method allows the wire sink to confirm that the implementa-
tion is using the correct size for the wire.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_wire.
The documentation for this class was generated from the following file:
• xtsc_wire_read_if.h
xtsc_connection_interface xtsc_resettable
xtsc_module xtsc_wire_write_if
xtsc_wire_source
xtsc_wire_write_if
xtsc_connection_interface
xtsc_wire_write_if_impl
m_source
xtsc_module
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating
Classes
• class output_definition
Output definition and sc_port.
• class xtsc_wire_write_if_impl
• void connect (xtsc::xtsc_core &core, const char ∗input_name, const char ∗output_-
name=NULL)
Connect to an xtsc_core.
Public Attributes
• sc_core::sc_out< sc_dt::sc_bv_base > m_pin
Pin-level port.
Protected Types
• typedef std::vector< output_definition ∗ > output_definition_vector
• typedef std::map< std::string, output_definition ∗ > output_definition_map
• typedef std::set< output_definition ∗ > output_set
• xtsc::u32 nb_get_bit_width ()
Get the wire width in bits.
Protected Attributes
• log4xtensa::TextLogger & m_text
TextLogger.
• xtsc::u32 m_width1
Bit width of 1st output port.
• bool m_control
From "control" parameter.
• bool m_control_bound
• wire_write_export ∗ m_p_control
Optional control input.
• xtsc_wire_write_if_impl ∗ m_p_write_impl
Implementaion for optional control input.
• sc_dt::sc_unsigned m_control_value
Current value of the control input.
• xtsc::u32 m_control_write_count
Number of times control input is written.
• xtsc::u32 m_control_change_count
Number of times control input is written with a new value.
• sc_core::sc_event m_control_write_event
Notified when control input is written.
• bool m_wraparound
Should "script_file" wraparound.
• bool m_pin_level
True if pin-level, false if TLM.
• sc_core::sc_trace_file ∗ m_p_trace_file
Pointer to sc_trace_file or NULL if not tracing.
• std::string m_definition_file
Name of file to get outputs from (from "definition_file").
• std::string m_script_file
Name of file to read values from (from "script_file").
• xtsc::xtsc_script_file ∗ m_p_test_vector_stream
File to read values from.
• std::string m_line
Current line of "definition_file"/"script_file".
• xtsc::u32 m_line_count
• xtsc::u64 m_clock_period_value
This device’s clock period as u64.
• sc_core::sc_time m_clock_period
From "clock_period" parameter.
• sc_core::sc_time m_time_resolution
The SystemC time resolution.
• bool m_has_posedge_offset
True if m_posedge_offset is non-zero.
• sc_core::sc_time m_posedge_offset
From "posedge_offset" parameter.
• xtsc::u64 m_posedge_offset_value
m_posedge_offset as u64
• output_definition_vector m_outputs
Vector of all output definitions.
• output_definition_map m_output_definition_map
Map of output definitions.
• xtsc::xtsc_port_table m_port_table_all
All wire outputs and control input (if present).
• xtsc::xtsc_port_table m_port_table_all_outputs
All wire outputs.
For reset.
• xtsc::xtsc_signal_sc_bv_base_floating m_pin_floating
BReset.m_write core0.get_input_wire(“BReset")
Here is the code to connect the xtsc_wire_source to core0 using raw SystemC port binding
and the xtsc_wire_source::m_write data member:
BReset.m_write(core0.get_input_wire("BReset"));
Alternately, raw SystemC port binding can be done using the get_tlm_output() method
which will also work when a "definition_file" is used:
BReset.get_tlm_output("m_write")(core0.get_input_wire("BReset"));
See also:
xtsc_wire_source_parms
xtsc_wire
xtsc_wire_logic
xtsc::xtsc_wire_write_if
xtsc::xtsc_connect()
xtsc::xtsc_core
xtsc::xtsc_core::How_to_do_port_binding
xtsc::xtsc_core::get_system_input_wire()
Parameters:
module_name Name of the xtsc_wire_source sc_module.
source_parms The remaining parameters for construction.
See also:
xtsc_wire_source_parms
Return the sc_export of the optional control input. This method may be used for port binding
of the optional control input.
For example, to bind the TIE export state named "onebit" of an xtsc_core named core0 to
the control input of an xtsc_wire_source named source:
core0.get_export_state("onebit")(source.get_control_input());
Return the sc_port of the named TLM output. This method can be used for port binding
when "pin_level" is false.
For example, to bind the sc_port output named "vectors" of an xtsc_wire_source named
source to the "BInterrupt" system-level input of an xtsc_core named core0:
source.get_tlm_output("vectors")(core0.get_input_wire("BInterrupt"));
Return the sc_out<sc_bv_base> of the named pin-level output. This method can be used
for port binding when "pin_level" is true.
For example, to bind the sc_out<sc_bv_base> output named "vectors" of an xtsc_wire_-
source named source to the "BInterrupt" system-level input of an xtsc_core named core0
(the "SimPinLevelInterfaces" parameter of the xtsc_core_parms object used to create
core0 must have contained "BInterrupt"):
source.get_output_pin("vectors")(core0.get_input_pin("BInterrupt"));
Parameters:
logic The xtsc_wire_logic to connect to the control input of this xtsc_wire_source.
output_name The output of the xtsc_wire_logic.
Connect an xtsc_mmio output to the control input of this xtsc_wire_source. This method
connects the specified output of the specified xtsc_mmio to the optional control input of this
xtsc_wire_source. This method should not be used unless the "control" parameter was set
to true.
Parameters:
mmio The xtsc_mmio to connect to the control input of this xtsc_wire_source.
output_name The output of the xtsc_mmio.
7.177.3.6 void connect (xtsc::xtsc_core & core, const char ∗ input_name, const
char ∗ output_name = NULL)
Connect to an xtsc_core. This method connects the specified output of this xtsc_wire_-
source to a system-level TLM input of an xtsc_core. This method should not be used when
"pin_level" is true.
Parameters:
core The xtsc_core to connect to.
input_name The system-level input of the xtsc_core that this xtsc_wire_source is to
be connected to. input_name is the name as it appears in the Xtensa micropro-
cessor data book.
output_name The output of this xtsc_wire_source. If output_name is NULL, then the
default (first/only) output of this xtsc_wire_source is used.
This method is called by the wire driver to write a new value to the wire. For the typical
case of an xtsc_core TIE export state, this method is called on each clock cycle in which
the Xtensa core writes a value to the TIE_xxx interface (where xxx is the state name in the
user TIE code).
Parameters:
value The sc_unsigned object containing the value to be written.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_wire_write_if.
Definition at line 707 of file xtsc_wire_source.h.
Get the wire width in bits. This method allows the wire driver to confirm that the implemen-
tation is using the correct size for the wire.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implements xtsc_wire_write_if.
Definition at line 708 of file xtsc_wire_source.h.
The documentation for this class was generated from the following file:
• xtsc_wire_source.h
xtsc_parms
xtsc_wire_source_parms
xtsc_parms
xtsc_wire_source_parms
Constructor parameters for a xtsc_wire_source object. This class contains the constructor
parameters for a xtsc_wire_source object.
"control" bool If true, then a 1-bit TLM control input will be created
and the "WAIT CONTROL" commands will be enabled in the
script file (see "script_file"). The control input can
be used to control the xtsc_wire_source device with
another device (for example, an xtsc_core when modeling
level-sensitive interrupts).
Default = false.
Note: The control input is a TLM interface regardless of
the "pin_level" setting.
"script_file" char* The file to read the test vector commands from (if a
"definition_file" is provided and all outputs have an
<InitialValue> specified then this parameter is
optional). Each command occupies one line in the file.
"posedge_offset" u32 This specifies the time at which the first posedge of
this device's clock conceptually occurs. It is
expressed in units of the SystemC time resolution and
the value implied by it must be strictly less than the
value implied by the "clock_period" parameter. A value
of 0xFFFFFFFF means to use the same posedge offset as
the system clock (from
xtsc_get_system_clock_posedge_offset()).
Default = 0xFFFFFFFF.
See also:
xtsc_wire_source
xtsc::xtsc_parms
xtsc::xtsc_script_file
Parameters:
bit_width The width of the output port in bits (only used if definition_file is NULL).
script_file The file name to read test vectors from.
wraparound If false (the default), the file is only processed one time. If true, the file
pointer will be reset to the beginning of the file each time the end of file is reached.
definition_file See the "definition_file" parameter
• xtsc_wire_source.h
xtsc_tlm2pin_wire_transactor_base< W, T >
xtsc_wire_write_if xtsc_wire_write_if_impl
xtsc_wire
xtsc_wire_source
Interface for writing (driving/sourcing) a wire. This TLM-level interface is for connecting
between a wire driver (e.g. an export state or system-level output of xtsc_core) and a
wire sink (e.g. an xtsc_component::xtsc_wire or system-level input of xtsc_core). The wire
driver has an sc_port<xtsc_wire_write_if> used to connect to the wire sink which either
inherits from this interface or has an sc_export<xtsc_wire_write_if>.
Note: The methods of xtsc_wire_write_if are all non-blocking in the OSCI TLM sense. That
is, they must NEVER call wait() either directly or indirectly. The "nb_" method prefix stands
for Non-Blocking.
See also:
xtsc_wire_read_if
xtsc_core::How_to_do_port_binding
xtsc_component::xtsc_wire
xtsc_component::xtsc_wire_logic
xtsc_component::xtsc_wire_source
This method is called by the wire driver to write a new value to the wire. For the typical
case of an xtsc_core TIE export state, this method is called on each clock cycle in which
the Xtensa core writes a value to the TIE_xxx interface (where xxx is the state name in the
user TIE code).
Parameters:
value The sc_unsigned object containing the value to be written.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_tlm2pin_wire_transactor_base< W, T >, xtsc_wire_write_if_impl,
xtsc_wire_write_if_impl, xtsc_wire_write_if_impl, xtsc_wire, xtsc_wire_write_if_impl, xtsc_-
wire_source, and xtsc_wire_write_if_impl.
Get the wire width in bits. This method allows the wire driver to confirm that the implemen-
tation is using the correct size for the wire.
This non-blocking method must never call the SystemC wait() method (either directly or
indirectly).
Implemented in xtsc_tlm2pin_wire_transactor_base< W, T >, xtsc_wire_write_if_impl,
xtsc_wire_write_if_impl, xtsc_wire_write_if_impl, xtsc_wire, xtsc_wire_write_if_impl, xtsc_-
wire_source, and xtsc_wire_write_if_impl.
The documentation for this class was generated from the following file:
• xtsc_wire_write_if.h
xtsc_wire_write_if
xtsc_wire_write_if_impl
xtsc_connection_interface
xtsc_module
xtsc_resettable
xtsc_command_handler_interface
xtsc_queue_push_if
m_test_vector_stream xtsc_queue_producer
xtsc_script_file
m_full_floating
m_data_floating
m_push_floating
xtsc_signal_sc_bv_base xtsc_signal_sc_bv_base_floating
m_p_write_impl
xtsc_wire_write_if xtsc_wire_write_if_impl
m_producer
Protected Attributes
• std::string m_name
Our name as a std::string.
• xtsc::u32 m_bit_width
Width in bits.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
Definition at line 474 of file xtsc_queue_producer.h.
The documentation for this class was generated from the following file:
• xtsc_queue_producer.h
Implementation of xtsc_wire_write_if.
#include <xtsc/xtsc_wire_logic.h>Inheritance diagram for xtsc_wire_write_if_impl:
xtsc_wire_write_if
xtsc_wire_write_if_impl
xtsc_connection_interface xtsc_resettable
m_p_definition_file
xtsc_wire_logic xtsc_wire_write_if_impl
input_definition
Protected Attributes
• input_definition & m_input_definition
Our input_definition object.
• std::string m_name
Our name as a std::string.
• xtsc::u32 m_bit_width
Port width in bits.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_wire_write_if.
Definition at line 830 of file xtsc_wire_logic.h.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
The documentation for this class was generated from the following file:
• xtsc_wire_logic.h
xtsc_wire_write_if
xtsc_wire_write_if_impl
xtsc_wire_source
Protected Attributes
• xtsc_wire_source & m_source
Our xtsc_wire_source object.
• std::string m_name
Our name as a std::string.
• xtsc::u32 m_bit_width
Width in bits.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
Definition at line 630 of file xtsc_wire_source.h.
The documentation for this class was generated from the following file:
• xtsc_wire_source.h
Implementation of xtsc_wire_write_if.
#include <xtsc/xtsc_mmio.h>Inheritance diagram for xtsc_wire_write_if_impl:
xtsc_wire_write_if
xtsc_wire_write_if_impl
m_p_wire_write_impl
xtsc_wire_write_if xtsc_wire_write_if_impl
xtsc_resettable m_input_definition
xtsc_module input_definition
m_mmio
xtsc_connection_interface
xtsc_command_handler_interface m_p_register_definition
m_mmio register_definition
m_p_definition_file
xtsc_script_file xtsc_mmio
m_mmio_parms m_mmio
xtsc_debug_if xtsc_request_if
xtsc_request m_p_request
stream_dumper
m_stream_dumper
Protected Attributes
• input_definition & m_input_definition
Our input_definition object.
• std::string m_name
Our name as a std::string.
• xtsc::u32 m_bit_width
Port width in bits.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
Implementation of xtsc_wire_write_if.
Definition at line 832 of file xtsc_mmio.h.
Implements xtsc_wire_write_if.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
The documentation for this class was generated from the following file:
• xtsc_mmio.h
xtsc_wire_write_if
xtsc_wire_write_if_impl
m_script_file_stream
m_p_write_impl m_master
m_p_return_value_file
xtsc_master
Protected Attributes
• xtsc_master & m_master
Our xtsc_master object.
• std::string m_name
Our name as a std::string.
• xtsc::u32 m_bit_width
Width in bits.
• sc_core::sc_port_base ∗ m_p_port
Port that is bound to us.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
See also:
xtsc::xtsc_wire_write_if
Implements xtsc_wire_write_if.
Definition at line 764 of file xtsc_master.h.
The documentation for this class was generated from the following file:
• xtsc_master.h
xtsc_connection_interface xtsc_resettable
xtsc_xttlm2tlm2_transactor
xtsc_debug_if xtsc_request_if
m_transactor xtsc_request_if_impl
xtsc_connection_interface
m_request_impl
xtsc_module
xtsc_resettable
xtsc_mode_switch_if
m_transactor
xtsc_xttlm2tlm2_transactor m_nb_mm nb_mm
tlm_bw_transport_if_impl
stream_dumper
m_stream_dumper
Classes
• class address_range
Class to keep track of address ranges and what DMI access has been granted/invalidated.
• class nb_mm
Class for tlm_mm_interface for nb_transport.
• class tlm_bw_transport_if_impl
Implementation of tlm_bw_transport_if.
• class transaction_info
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
Public Types
• typedef tlm::tlm_initiator_socket< 32 > initiator_socket_4
initiator socket with BUSWIDTH = 32 bits ( 4 bytes)
• SC_HAS_PROCESS (xtsc_xttlm2tlm2_transactor)
• virtual const char ∗ kind () const
Our C++ type (SystemC uses this).
For xtsc_mode_switch_if.
• void execute (const std::string &cmd_line, const std::vector< std::string > &words,
const std::vector< std::string > &words_lc, std::ostream &result)
Implementation of the xtsc::xtsc_command_handler_interface.
Public Attributes
Private Types
• tlm::tlm_generic_payload ∗ new_transaction ()
Get a new transaction object (from the pool).
• xtsc::u8 ∗ new_buffer ()
Get a new u8 buffer object (from the pool). Size is m_width8∗m_max_transfers.
Private Attributes
• initiator_socket_4 ∗∗ m_initiator_sockets_4
Initiator socket(s) for 4-byte interface.
• initiator_socket_8 ∗∗ m_initiator_sockets_8
Initiator socket(s) for 8-byte interface.
• initiator_socket_16 ∗∗ m_initiator_sockets_16
Initiator socket(s) for 16-byte interface.
• initiator_socket_32 ∗∗ m_initiator_sockets_32
Initiator socket(s) for 32-byte interface.
• initiator_socket_64 ∗∗ m_initiator_sockets_64
Initiator socket(s) for 64-byte interface.
• xtsc_request_if_impl ∗∗ m_request_impl
m_request_exports bind to these
• tlm_bw_transport_if_impl ∗∗ m_tlm_bw_transport_if_impl
m_initiator_sockets_BW binds to these
• nb_mm m_nb_mm
tlm_mm_interface for nb_transport
• xtsc::u32 m_next_worker_port_num
Used by worker_thread to get its port number.
• xtsc::u32 m_next_request_port_num
Used by request_thread to get its port number.
• xtsc::u32 m_next_respond_port_num
Used by respond_thread to get its port number.
• xtsc::u32 m_num_ports
See the "num_ports" parameter.
• xtsc::xtsc_core::memory_port m_memory_port
See the "memory_interface" parameter.
• xtsc::u32 m_width8
The bus width in bytes. See "byte_width".
• xtsc::u32 m_request_fifo_depth
See the "request_fifo_depth" parameter.
• xtsc::u32 m_max_burst_beats
See the "max_burst_beats" parameter.
• bool m_use_nb_transport
See the "use_nb_transport" parameter.
• bool m_turbo_switch
See the "turbo_switch" parameter.
• bool m_revoke_on_dmi_hint
See the "revoke_on_dmi_hint" parameter.
• bool m_using_nb_transport
True if currently using nb_transport, false if using b_transport.
• bool m_use_tlm2_burst
See the "use_tlm2_burst" parameter.
• bool m_use_tlm2_busy
See the "use_tlm2_busy" parameter.
• bool m_immediate_timing
See "immediate_timing" parameter.
• bool m_has_pif_width
True if m_width8 is 4|8|16.
• xtsc::u32 m_rcw_support
See the "rcw_support" parameter.
• xtsc::u32 m_turbo_support
See the "turbo_support" parameter.
• sc_core::sc_time m_clock_period
This transactor’s clock period.
• sc_core::sc_event ∗∗ m_worker_thread_event
To notify worker_thread when a request is accepted.
• sc_core::sc_event ∗∗ m_request_thread_event
To notify request_thread when a request is accepted.
• sc_core::sc_event ∗∗ m_request_phase_ended_event
To notify request_thread when the request phase ends.
• sc_core::sc_event m_ready_to_switch_event
Signal ready to switch simulation mode.
• peq ∗∗ m_respond_thread_peq
For respond_thread.
• xtsc::xtsc_request ∗∗ m_request
Our copy of current request.
• bool ∗ m_busy
True when we have a current request (fifo not used).
• bool m_mode_switch_pending
Indicate simulation mode switch is in progress.
• bool m_dmi_invalidated
To ensure no DMI invalidate occurred.
• bool m_can_revoke_fast_access
All fast access requests (if any) allowed revocation.
• bool ∗ m_rcw_have_first_transfer
True when we’ve rec’d 1st xfer of RCW but not 2nd.
• bool ∗ m_first_block_write
Next BLOCK_WRITE is a first transfer Only used when "use_tlm2_burst" is true.
• xtsc::u8 ∗∗ m_rcw_compare_data
Comparison data from RCW request.
• xtsc::u8 ∗∗ m_burst_data
Accumulate data for BLOCK_READ|BURST_READ|BLOCK_WRITE|BURST_WRITE
(used when m_use_tlm2_burst is true).
• xtsc::u8 ∗∗ m_byte_enables
For byte enable pointer in gp.
• xtsc::u32 ∗ m_burst_index
Index into m_burst_data for BLOCK_WRITE|BURST_WRITE.
• sc_core::sc_time ∗ m_burst_start_time
• sc_core::sc_time ∗ m_prev_response_time
When previous response was sent.
• transaction_info_map m_transaction_info_map
Map tlm_generic_payload to transaction_info.
• xtsc::u32 m_transaction_count
Count each newly created transaction in new_transaction.
• xtsc::u32 m_transaction_info_count
Count each newly created transaction_info.
• xtsc::u32 m_request_count
Count each newly created xtsc_request.
• xtsc::u32 m_buffer_count
Count each newly created u8 buffer.
Example module implementing an Xtensa TLM (xttlm) to OSCI TLM2 transactor. This
module can be used to connect an Xtensa TLM memory interface master (for example,
xtsc::xtsc_core, xtsc_component::xtsc_arbiter, etc.) to an OSCI TLM2 memory interface
slave (for example, xtsc_memory_tlm2).
By default, b_transport is used on the OSCI TLM2 side. The "use_nb_transport" parameter
can be set to true to cause the module to use nb_transport. In addition, the "turbo_switch"
parameter can be set to true to cause the module to use b_transport when the cycle-
accurate ISS is active and to use nb_transport when TurboXim is active.
For protocol and timing information specific to xtsc::xtsc_core and the Xtensa ISS, see
xtsc::xtsc_core::Information_on_memory_interface_protocols.
A TLM2 response status of TLM_ADDRESS_ERROR_RESPONSE is translated to an
Xtensa TLM RSP_ADDRESS_ERROR response status. A TLM2 response status of TLM_-
GENERIC_ERROR_RESPONSE is translated to an Xtensa TLM RSP_ADDRESS_DATA_-
ERROR response status. A TLM2 response status of TLM_INCOMPLETE_RESPONSE
is treated as an Xtensa TLM RSP_NACC if "use_tlm2_busy" is true, otherewise it causes
an exception to be thrown (as does any other TLM2 error response status not mentioned
here).
Note: Nothing in the TLM2 base protocol requires the target to respond within the deadline
that xtsc::xtsc_core requires for Xtensa local memories (1 cycle for a 5-stage pipeline and
2 cycles for 7-stage). This transactor should not be used for an Xtensa local memory
interface unless you can be sure the downstream TLM2 subsystem will always respond
within the required deadline.
Note: This model ignores the xtsc_request_if::nb_lock() call which is used if the Xtensa
processor executes an S32C1I instruction targeting DataRAM. This transactor should not
be used for an Xtensa DataRAM interface if S32C1I instructions might target that interface
unless there is an upstream model (e.g. xtsc_arbiter) that is handling nb_lock() calls or
unless you do not care if nb_lock() calls are ignored.
Note: If this transactor is used to connect to a TLM2 memory subsystem containing Xtensa
code (memory that will be accessed via Xtensa IFetch), then TurboXim should not be used
unless that memory subsystem can support either unrestricted DMI access (that is, DMI
pointers will always be given and will never be invalidated) or transport_dbg access. See
the "turbo_support" parameter.
(*tran_dram0.m_request_exports[0])
(mem_dram0.get_target_socket_4(0))
core0.get_request_port(“dram0ls0”)
tran_dram0.get_initiator_socket_4(0)
dram0ls0
nb_request
b_transport
nb_respond invalidate_direct_mem_ptr
dram0ls0
xtsc_xttlm2tlm2_transactor xtsc_memory_tlm2
tran_dram0 mem_dram0
“num_ports” = 2 “num_ports” = 2
nb_request
dram0ls1
b_transport
nb_respond invalidate_direct_mem_ptr
dram0ls1
xtsc_core core0
(memory_test.out)
nb_request
pif
xtsc_xttlm2tlm2_transactor xtsc_memory_tlm2
tran_pif
b_transport
mem_pif
“num_ports” = 1 “num_ports” = 1
nb_respond invalidate_direct_mem_ptr
pif
(*tran_pif.m_respond_ports[0])
(core0.get_respond_export(“pif”))
See also:
xtsc_xttlm2tlm2_transactor_parms
xtsc::xtsc_request
xtsc::xtsc_response
xtsc::xtsc_request_if
xtsc::xtsc_respond_if
xtsc::xtsc_core
xtsc::xtsc_core::Information_on_memory_interface_protocols.
xtsc_memory_tlm2
xtsc_tlm22xttlm_transactor
Parameters:
module_name Name of the xtsc_xttlm2tlm2_transactor sc_module.
transactor_parms The remaining parameters for construction.
See also:
xtsc_xttlm2tlm2_transactor_parms
Parameters:
clock_period_factor Specifies the new length of this device’s clock period expressed
in terms of the SystemC time resolution (from sc_get_time_resolution()).
change_clock_period <ClockPeriodFactor>
Call xtsc_xttlm2tlm2_transactor::change_clock_period(<ClockPeriodFactor>).
Return previous <ClockPeriodFactor> for this device.
reset [<Hard>]
Call xtsc_xttlm2tlm2_transactor::reset().
Implements xtsc_command_handler_interface.
Parameters:
arbiter The xtsc_arbiter to connect with this xtsc_xttlm2tlm2_transactor.
port_num The Xtensa TLM slave port pair of this xtsc_xttlm2tlm2_transactor to con-
nect with the xtsc_arbiter.
Parameters:
core The xtsc_core to connect with this xtsc_xttlm2tlm2_transactor.
memory_port_name The name of the memory interface master port pair of the xtsc_-
core to connect with this xtsc_xttlm2tlm2_transactor. Case-insensitive.
port_num The slave port pair of this xtsc_xttlm2tlm2_transactor to connect the xtsc_-
core with.
single_connect If true only one slave port pair of this device will be connected. If
false, the default, and if memory_port_name names the first port of an uncon-
nected multi-ported interface of core and if port_num is 0 and if the number of
ports this device has matches the number of multi-ports in the core interface,
then all master port pairs of the core interface specified by memory_port_name
will be connected to the slave port pairs of this xtsc_xttlm2tlm2_transactor.
See also:
xtsc::xtsc_core::How_to_do_memory_port_binding for a list of valid memory_port_-
name values.
Returns:
number of ports that were connected by this call (1 or 2)
Parameters:
master The xtsc_master to connect with this xtsc_xttlm2tlm2_transactor.
port_num The slave port pair of this xtsc_xttlm2tlm2_transactor to connect the xtsc_-
master with.
Parameters:
memory_trace The xtsc_memory_trace to connect with this xtsc_xttlm2tlm2_-
transactor.
trace_port The master port pair of the xtsc_memory_trace to connect with this xtsc_-
xttlm2tlm2_transactor.
port_num The Xtensa TLM slave port pair of this xtsc_xttlm2tlm2_transactor to con-
nect the xtsc_memory_trace with.
single_connect If true only one Xtensa TLM slave port pair of this xtsc_xttlm2tlm2_-
transactor will be connected. If false, the default, then all contiguous, uncon-
nected slave port pairs of this xtsc_xttlm2tlm2_transactor starting at port_num
that have a corresponding existing master port pair in memory_trace (starting at
trace_port) will be connected with that corresponding memory_trace master port
pair.
Returns:
number of ports that were connected by this call (1 or more)
Parameters:
router The xtsc_router to connect with this xtsc_xttlm2tlm2_transactor.
router_port The master port pair of the xtsc_router to connect with this xtsc_-
xttlm2tlm2_transactor. router_port must be in the range of 0 to the xtsc_router’s
"num_slaves" parameter minus 1.
port_num The Xtensa TLM slave port pair of this xtsc_xttlm2tlm2_transactor to con-
nect the xtsc_router with.
The documentation for this class was generated from the following file:
• xtsc_xttlm2tlm2_transactor.h
xtsc_parms
xtsc_xttlm2tlm2_transactor_parms
xtsc_parms
xtsc_xttlm2tlm2_transactor_parms
"memory_interface" char* The memory interface type. Valid values are "DRAM0",
"DRAM1", "DROM0", "IRAM0", "IRAM1", "IROM0", "URAM0",
"XLMI0", and "PIF" (case-insensitive).
"num_ports" u32 The number of Xtensa TLM (xttlm) port pairs this
transactor has as well as the number of TLM2 sockets
this transactor has.
Default = 1.
Minimum = 1.
"byte_width" u32 Bus width in bytes. Valid values are 4, 8, 16, 32, and
64. If byte_width is 32 or 64 then only READ and WRITE
requests are allowed. The exclusive-to-PIF transactions
(BLOCK_READ, BURST_READ, RCW, BLOCK_WRITE, and
BURST_WRITE) are only allowed if byte_width is 4|8|16.
"request_fifo_depth" u32 The request fifo depth. A value of 0 means to not use
a request fifo which causes the incoming request channel
to be blocked as soon as one request is accepted until
that request is completed.
If "use_nb_transport" is true, then "request_fifo_depth"
must be non-zero.
Default = 1.
time.
If "use_nb_transport" is true, then "immediate_timing"
must be false and "request_fifo_depth" must be non-zero.
Default = false.
"rcw_support" u32 This parameter specifies how the model should support
the RCW transaction. The legal values and their meaning
are:
0 = Use the transport_dbg() interface.
Note: If this option is selected then RCW requests
may not have any disabled byte lanes.
1 = Use the b_transport() interface and throw an
exception if the read and write beats do not
occur at the same time and in the same delta cycle.
2 = Use the b_transport() interface and log a warning
if the read and write beats do not occur at the
same time and in the same delta cycle.
3 = Use the b_transport() interface and log at
INFO_LOG_LEVEL if the read and write beats do not
occur at the same time and in the same delta cycle.
Note: This model will make the read and write calls to
b_transport() back-to-back (without an intervening
wait() call) however, the downstream TLM2
sub-system might insert calls to wait() inside the
b_transport() call and this violates the atomicity
of the RCW sequence.
Caution: Options 2 and 3 are not recommended.
Caution: Option 0 is not recommended if the memory has
read/write side effects that transport_dbg()
won't trigger.
Default = 1.
"turbo_support" u32 This parameter specifies how the model should support
TurboXim fast access. The legal values and their
meaning are:
0 = Do not allow TurboXim fast access for load/store.
1 = Give TurboXim peek/poke fast access to all
addresses except those specified by
"deny_fast_access".
2 = Give TurboXim raw access to all addresses allowed
by the get_direct_mem_ptr() method except those
specified by "deny_fast_access".
Caution: Options 1 and 2 are not recommended if the
target memory has side effects.
Note: If TurboXim is denied fast access then it will use
non-fast access (XTSC:nb_request to
TLM2:b_transport) for loads and stores; however,
for IFetch it will use XTSC:nb_peek to
TLM2:transport_dbg.
Default = 2.
See also:
xtsc_xttlm2tlm2_transactor
xtsc::xtsc_parms
Parameters:
memory_interface The memory interface type. Valid values are "DRAM0", "DRAM1",
"DROM0", "IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", and "PIF" (case-
insensitive).
width8 Memory data bus width in bytes.
num_ports The number of ports this transactor has.
Parameters:
core A reference to the xtsc_core object upon which to base the xtsc_xttlm2tlm2_-
transactor_parms.
memory_interface The memory interface type. Valid values are "DRAM0", "DRAM1",
"DROM0", "IRAM0", "IRAM1", "IROM0", "URAM0", "XLMI0", and "PIF" (case-
insensitive). Note: The core configuration must have the named memory inter-
face.
num_ports The number of ports this transactor has. If 0, the default, the number of
ports (1 or 2) will be inferred thusly: If memory_interface is a LD/ST unit 0 port
of a dual-ported core interface, and the core is dual-ported and has no CBox,
and if the 2nd port of the core has not been bound, then "num_ports" will be 2;
otherwise, "num_ports" will be 1.
The documentation for this class was generated from the following file:
• xtsc_xttlm2tlm2_transactor.h
8. File Documentation
#include <xtsc/xtsc_types.h>
#include <ostream>
#include <string>
#include <set>
#include <vector>
#include <iomanip>
#include "xtensa-versions.h"
#include <xtsc/xtsc_exception.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_wire_write_if.h>
#include <xtsc/xtsc_mode_switch_if.h>
#include <log4xtensa/log4xtensa.h>
Include dependency graph for xtsc.h:
xtsc.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc.h
xtsc_request.h xtsc_lookup.h xtsc_lookup_driver.h xtsc_master_tlm2.h xtsc_mode_switch_if.h xtsc_queue.h xtsc_queue_consumer.h xtsc_queue_producer.h xtsc_wire.h xtsc_wire_source.h xtsc_lookup_pin.h xtsc_pin2tlm_lookup_transactor.h xtsc_queue_pin.h xtsc_tx_loader.h xtsc_wire_logic.h
xtsc_module_pin_base.h xtsc_xttlm2tlm2_transactor.h xtsc_udma.h xtsc_router.h xtsc_slave.h xtsc_arbiter.h xtsc_memory_trace.h xtsc_tlm22xttlm_transactor.h xtsc_master.h xtsc_memory.h xtsc_memory_base.h xtsc_memory_tlm2.h
Classes
• class sc_unwind_exception
• class xtsc_initialize_parms
Configuration parameters for the call to xtsc_initialize().
• class xtsc_switch_registration
Class for registering TurboXim simulation mode switching interfaces.
• class xtsc_signal_sc_bv_base
Pin-level signal for connecting to a TIE export state, TIE import wire, or system-level I/O of
xtsc_core.
• class xtsc_signal_sc_bv_base_floating
Floating signal for a capped (unused) TIE export state or import wire.
• class xtsc_signal_sc_uint_base
Pin-level signal for connecting certain pin-level memory ports.
• class xtsc_script_file
Utility class for handling a script-style file.
• class xtsc_command_handler_interface
Interface to be called by xtsc_dispatch_command().
• class xtsc_filter
The xtsc_filter class, in conjunction with the xtsc_filter_XXX() and xtsc_event_XXX() meth-
ods and the XTSC command facility, help support the system control and debug framework
in XTSC.
• class xtsc_resettable
Interface for objects which can be reset.
• class xtsc_connection_interface
This is the generic connection interface used to support plugin modules and the --connect
command in xtsc-run as well as the xtsc_connect() method in the XTSC core library.
• class xtsc_module
This composite interface combines the xtsc_connection_interface and xtsc_resettable in-
terfaces.
• class xtsc_plugin_interface
This interface is used to add plugin modules to an XTSC simulation.
• class XTSC_VERSION_INFO_STRING
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Defines
• #define SCP
• #define XTSC_REALQUOTE(a1) #a1
• #define XTSC_QUOTE(a1) XTSC_REALQUOTE(a1)
• #define XTSC_TOKEN_PASTER3_(a1, a2, a3) a1 ## a2 ## a3
• #define XTSC_TOKEN_PASTER_3(a1, a2, a3) XTSC_TOKEN_PASTER3_(a1, a2,
a3)
• #define XTSC_TOKEN_PASTER5_(a1, a2, a3, a4, a5) a1 ## a2 ## a3 ## a4 ## a5
Typedefs
Enumerations
• enum xtsc_port_type {
USER_DEFINED_PORT = 0,
DEBUG_PORT = 1,
REQUEST_PORT = 2,
RESPOND_PORT = 3,
LOOKUP_PORT = 4,
QUEUE_PUSH_PORT = 5,
QUEUE_POP_PORT = 6,
WIRE_WRITE_PORT = 7,
WIRE_READ_PORT = 8,
TX_XFER_PORT = 9,
USER_DEFINED_OUTPUT = 16,
BOOL_OUTPUT = 17,
UINT_OUTPUT = 18,
WIDE_OUTPUT = 19,
USER_DEFINED_INITIATOR = 32,
INITIATOR_SOCKET_4 = 33,
INITIATOR_SOCKET_8 = 34,
INITIATOR_SOCKET_16 = 35,
INITIATOR_SOCKET_32 = 36,
INITIATOR_SOCKET_64 = 37,
conjugate_delta = 128,
USER_DEFINED_EXPORT = 128,
DEBUG_EXPORT = 129,
REQUEST_EXPORT = 130,
RESPOND_EXPORT = 131,
LOOKUP_EXPORT = 132,
QUEUE_PUSH_EXPORT = 133,
QUEUE_POP_EXPORT = 134,
WIRE_WRITE_EXPORT = 135,
WIRE_READ_EXPORT = 136,
TX_XFER_EXPORT = 137,
USER_DEFINED_INPUT = 144,
BOOL_INPUT = 145,
UINT_INPUT = 146,
WIDE_INPUT = 147,
USER_DEFINED_TARGET = 160,
TARGET_SOCKET_4 = 161,
TARGET_SOCKET_8 = 162,
TARGET_SOCKET_16 = 163,
TARGET_SOCKET_32 = 164,
TARGET_SOCKET_64 = 165,
PORT_TABLE = 255 }
This enum specifies the conjugate port pairs that are supported by the generic connection
API (xtsc_connection_interface) and the generic connection method, xtsc_connect().
Functions
Set number of digits after decimal point used when logging simulation time.
• XTSC_API void xtsc_strtou32vector (const std::string &str, std::vector< u32 > &vec)
Variables
• Readme xtsc_text_logging_macros
Summary of macros to disable or to do text logging.
• Readme sc_command_handler_commands
The following commands are supported by the global XTSC command handler called sc.
• Readme xtsc_command_handler_commands
The following commands are supported by the global XTSC command handler called xtsc.
Value:
std::setprecision(xtsc::xtsc_get_text_logging_time_precision()) \
<< std::fixed \
<< std::setw(xtsc::xtsc_get_text_logging_time_width())
\
<< (sc_core::sc_time_stamp() /
xtsc::xtsc_get_system_clock_period()) \
<< xtsc::xtsc_log_delta_cycle(buf) \
<< ": "
Macro to ensure a standard prefix to all XTSC log messages. Note: This macro was
changed with the RD-2011.1 release to require the user to provide a non-const string buffer.
See xtsc_log_delta_cycle().
See also:
xtsc_set_text_logging_time_precision()
xtsc_set_text_logging_time_width()
xtsc_set_system_clock_factor()
xtsc_set_text_logging_delta_cycle_digits()
Value:
do { \
std::string buf; \
if (xtsc::xtsc_is_logging_configured())
{ \
LOG4XTENSA_FATAL (logger,
XTSC_LOG_PREFIX(buf) << msg); \
} \
else { \
std::cerr << "FATAL: " <<
XTSC_LOG_PREFIX(buf) << msg << std::endl; \
} \
} while (false)
Macro for logging at the FATAL_LOG_LEVEL. Note: calling this macro does not cause your
program to terminate.
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { \
std::string buf; \
if (xtsc::xtsc_is_logging_configured())
{ \
LOG4XTENSA_ERROR (logger,
XTSC_LOG_PREFIX(buf) << msg); \
} \
else { \
std::cerr << "ERROR: " <<
XTSC_LOG_PREFIX(buf) << msg << std::endl; \
} \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { \
std::string buf; \
if (xtsc::xtsc_is_logging_configured())
{ \
LOG4XTENSA_WARN (logger,
XTSC_LOG_PREFIX(buf) << msg); \
} \
else { \
std::cerr << "WARN: " <<
XTSC_LOG_PREFIX(buf) << msg << std::endl; \
} \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { \
std::string buf; \
if (xtsc::xtsc_is_logging_configured())
{ \
LOG4XTENSA_NOTE (logger,
XTSC_LOG_PREFIX(buf) << msg); \
} \
else { \
std::cout << "NOTE: " <<
XTSC_LOG_PREFIX(buf) << msg << std::endl; \
} \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { if (xtsc::xtsc_is_text_logging_enabled()) \
{ std::string buf; LOG4XTENSA_INFO (log
ger, XTSC_LOG_PREFIX(buf) << msg); } \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { if (xtsc::xtsc_is_text_logging_enabled()) \
{ std::string buf; LOG4XTENSA_VERBOSE(log
ger, XTSC_LOG_PREFIX(buf) << msg); } \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { if (xtsc::xtsc_is_text_logging_enabled()) \
{ std::string buf; LOG4XTENSA_DEBUG (log
ger, XTSC_LOG_PREFIX(buf) << msg); } \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { if (xtsc::xtsc_is_text_logging_enabled()) \
{ std::string buf; LOG4XTENSA_TRACE (log
ger, XTSC_LOG_PREFIX(buf) << msg); } \
} while (false)
Parameters:
logger A reference to a TextLogger object.
msg The message to log. msg can be any text acceptable to the ostringstream left-
shift operator.
Value:
do { \
if ((xtsc::xtsc_is_text_logging_enabled() || (level >= log4xtensa::NOTE_LOG_LEV
EL)) && logger.isEnabledFor(level)) { \
std::string buf; \
log4xtensa::tostringstream _xtsc_buf; \
_xtsc_buf << XTSC_LOG_PREFIX(buf) << msg; \
logger.forcedLog(level, _xtsc_buf.str(), __FILE__, __LINE__); \
} \
else if (level == log4xtensa::NOTE_LOG_LEVEL) { \
std::string buf; \
std::cout << "NOTE: " << XTSC_LOG_PREFIX(buf) << msg << std::endl; \
} \
else if (level > log4xtensa::NOTE_LOG_LEVEL) { \
std::string buf; \
std::cerr << ((level >= log4xtensa::FATAL_LOG_LEVEL) ? "FATAL: " : (level >=
log4xtensa::ERROR_LOG_LEVEL) ? "ERROR: " : "WARN: ");\
std::cerr << XTSC_LOG_PREFIX(buf) << msg << std::endl; \
} \
} while (false)
Value:
XTSC_TOKEN_PASTER_8(xtsc_version_info__, \
XTSC_VERSION_INFO_XTENSATOOL
S, \
XTSC_VERSION_INFO_COMPILER,
\
XTSC_VERSION_INFO_TARGET,
\
XTSC_VERSION_INFO_ARCH,
\
XTSC_VERSION_INFO_VENDOR,
\
XTSC_VERSION_INFO_SYSTEMC_VE
RSION, \
__end)
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_address_range_entry.h:
xtsc_address_range_entry.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_address_range_entry.h
Classes
• class xtsc_address_range_entry
Address-range to port-number association (for example, a routing table entry).
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Functions
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_fast_access.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_address_range_entry.h>
#include <vector>
#include <deque>
Include dependency graph for xtsc_arbiter.h:
xtsc_arbiter.h
xtsc/xtsc_response.h deque
systemc
Classes
• class xtsc_arbiter_parms
Constructor parameters for a xtsc_arbiter object.
• class xtsc_arbiter
A memory interface arbiter and/or address translator.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• class request_info
Information about each request.
• class response_info
Information about each response.
• class req_rsp_info
Information for PIF width converter (PWC) mode.
• class port_policy_info
Information from "arbitration_policy" for arbitrate_policy().
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_memory.h>
Include dependency graph for xtsc_cache.h:
xtsc_cache.h
xtsc/xtsc_memory.h
xtsc/xtsc_memory_b.h xtsc/xtsc_response.h
xtsc/xtsc_request_if.h xtsc/xtsc.h
systemc
Classes
• class xtsc_cache_parms
Constructor parameters for an xtsc_cache object.
• class xtsc_cache
This class implements an XTSC model of a typical cache module.
• struct line_info
Cache line data structure.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_tx_xfer_if.h>
#include <xtsc/xtsc_queue_push_if.h>
#include <xtsc/xtsc_queue_pop_if.h>
#include <xtsc/xtsc_wire_write_if.h>
#include <xtsc/xtsc_wire_read_if.h>
#include <xtsc/xtsc_lookup_if.h>
#include <string>
#include <set>
#include <vector>
#include <cstring>
Include dependency graph for xtsc_core.h:
xtsc_core.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_core.h
Classes
• class xtsc_core_parms
Constructor parameters for a xtsc_core object.
• class xtsc_core
A Tensilica core Instruction Set Simulator (ISS).
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Functions
• XTSC_API xtsc_core::memory_port & operator++ (xtsc_core::memory_port &port)
Prefix operator++ used to iterate memory_port.
#include <xtsc/xtsc_memory.h>
#include "xtsc/xtsc_dma_request.h"
#include <deque>
Include dependency graph for xtsc_dma_engine.h:
xtsc_dma_engine.h
xtsc/xtsc_memory_b.h xtsc/xtsc_response.h
xtsc/xtsc_request_if.h xtsc/xtsc.h
systemc
Classes
• class xtsc_dma_engine_parms
Constructor parameters for a xtsc_dma_engine object.
• class xtsc_dma_engine
An example DMA engine implementation.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
Structures for defining DMA Programming Registers. This graph shows which files directly
or indirectly include this file:
xtsc_dma_request.h
xtsc_dma_engine.h
Classes
• struct xtsc_dma_request
This struct is plain old data (POD) used to define a DMA request.
• struct xtsc_dma_descriptor
This struct is plain old data (POD) used to define each descriptor of a DMA request.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
Typedefs
• typedef struct xtsc_dma_request xtsc_dma_request
• typedef struct xtsc_dma_descriptor xtsc_dma_descriptor
Structures for defining DMA Programming Registers. This file is suitable for including in
both host simulator code (XTSC) and Xtensa target code.
Definition in file xtsc_dma_request.h.
#include <stdexcept>
#include <iostream>
#include "xtsc/xtsc_types.h"
Include dependency graph for xtsc_exception.h:
xtsc_exception.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_exception.h
xtsc.h
xtsc_request.h xtsc_lookup.h xtsc_lookup_driver.h xtsc_master_tlm2.h xtsc_mode_switch_if.h xtsc_queue.h xtsc_queue_consumer.h xtsc_queue_producer.h xtsc_wire.h xtsc_wire_source.h xtsc_lookup_pin.h xtsc_pin2tlm_lookup_transactor.h xtsc_queue_pin.h xtsc_tx_loader.h xtsc_wire_logic.h
xtsc_module_pin_base.h xtsc_xttlm2tlm2_transactor.h xtsc_udma.h xtsc_router.h xtsc_slave.h xtsc_arbiter.h xtsc_memory_trace.h xtsc_tlm22xttlm_transactor.h xtsc_master.h xtsc_memory.h xtsc_memory_base.h xtsc_memory_tlm2.h
Classes
• class xtsc_exception
Base class for all XTSC exceptions.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
Include dependency graph for xtsc_fast_access.h:
xtsc_fast_access.h
xtsc/xtsc.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_fast_access.h
Classes
• class xtsc_fast_access_if
Interface for fast access (turbo mode).
• class xtsc_fast_access_block
Value class for a block that surrounds a request address.
• class xtsc_fast_access_revocation_if
Interface to be implemented by memory-interface masters that wish to support revocation
of previously-granted fast access requests.
• class xtsc_fast_access_request
Class to hold request and response information to set up fast access data transfers.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_lookup_if.h>
#include <string>
#include <vector>
#include <map>
#include <deque>
Include dependency graph for xtsc_lookup.h:
xtsc_lookup.h
systemc
Classes
• class xtsc_lookup_parms
Constructor parameters for a xtsc_lookup object.
• class xtsc_lookup
An TIE lookup implementation that connects using TLM-level ports.
• class xtsc_lookup_if_impl
Implementation of xtsc_lookup_if.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_lookup_if.h>
#include <string>
#include <vector>
#include <fstream>
Include dependency graph for xtsc_lookup_driver.h:
xtsc_lookup_driver.h
systemc
Classes
• class xtsc_lookup_driver_parms
Constructor parameters for a xtsc_lookup_driver object.
• class xtsc_lookup_driver
A scripted driver for a lookup.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_lookup_if.h:
xtsc_lookup_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_lookup_if.h
Classes
• class xtsc_lookup_if
Interface for connecting a TIE lookup client to an implementation.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <string>
#include <vector>
#include <map>
Include dependency graph for xtsc_lookup_pin.h:
xtsc_lookup_pin.h
xtsc/xtsc.h
systemc
Classes
• class xtsc_lookup_pin_parms
Constructor parameters for a xtsc_lookup_pin object.
• class xtsc_lookup_pin
A TIE lookup implementation using the pin-level interface.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_wire_write_if.h>
#include <string>
#include <vector>
#include <fstream>
#include <deque>
Include dependency graph for xtsc_master.h:
xtsc_master.h
xtsc/xtsc.h xtsc/xtsc_request_if.h
systemc
Classes
• class xtsc_master_parms
Constructor parameters for a xtsc_master object.
• class xtsc_master
A scripted memory interface master.
• class xtsc_wire_write_if_impl
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <tlm.h>
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <string>
#include <vector>
#include <map>
#include <fstream>
Include dependency graph for xtsc_master_tlm2.h:
xtsc_master_tlm2.h
systemc
Classes
• class xtsc_master_tlm2_parms
Constructor parameters for a xtsc_master_tlm2 object.
• class xtsc_master_tlm2
A scripted OSCI TLM2 memory interface master.
• class tlm_bw_transport_if_impl
Implementation of tlm_bw_transport_if.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_memory_b.h>
#include <cstring>
#include <vector>
Include dependency graph for xtsc_memory.h:
xtsc_memory.h
xtsc/xtsc_memory_b.h xtsc/xtsc_response.h
xtsc/xtsc_request_if.h xtsc/xtsc.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_memory.h
xtsc_cache.h xtsc_dma_engine.h
Classes
• class xtsc_memory_parms
Constructor parameters for a xtsc_memory object.
• class xtsc_memory
• class address_info
POD class to help keep track of information related to a special address or address range.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class request_info
Information about each request.
• class watchfilter_info
Information about each watchfilter.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
Functions
• XTSC_COMP_API std::ostream & operator<< (std::ostream &os, const xtsc_-
memory::address_info &info)
#include <xtsc/xtsc.h>
#include <cstring>
Include dependency graph for xtsc_memory_b.h:
xtsc_memory_b.h
xtsc/xtsc.h cstring
systemc
This graph shows which files directly or indirectly include this file:
xtsc_memory_b.h
xtsc_cache.h xtsc_dma_engine.h
Classes
• class xtsc_memory_b
Class for a memory model.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <map>
#include <vector>
#include <deque>
#include <string>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_module_pin_base.h>
#include <xtsc/xtsc_memory_b.h>
#include <xtsc/xtsc_request_if.h>
Include dependency graph for xtsc_memory_pin.h:
xtsc_memory_pin.h
deque xtsc/xtsc_module_pin_base.h
xtsc/xtsc_response.h
systemc
Classes
• class xtsc_memory_pin_parms
Constructor parameters for a xtsc_memory_pin object.
• class xtsc_memory_pin
This device implements a pin-level memory model.
• class xtsc_debug_if_impl
Implementation of xtsc_debug_if.
• class pif_req_info
Information about each request.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <tlm.h>
#include <tlm_utils/peq_with_get.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_memory_b.h>
#include <cstring>
#include <vector>
Include dependency graph for xtsc_memory_tlm2.h:
xtsc_memory_tlm2.h
xtsc/xtsc.h cstring
systemc
Classes
• class xtsc_memory_tlm2_parms
Constructor parameters for a xtsc_memory_tlm2 object.
• class xtsc_memory_tlm2
A PIF, XLMI, or local memory which uses OSCI TLM2.
• class tlm_fw_transport_if_impl
Implementation of tlm_fw_transport_if<>.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_address_range_entry.h>
#include <xtsc/xtsc_fast_access.h>
#include <vector>
#include <map>
#include <cstring>
Include dependency graph for xtsc_memory_trace.h:
xtsc_memory_trace.h
xtsc/xtsc_response.h xtsc/xtsc_fast_access.h
systemc
Classes
• class xtsc_memory_trace_parms
Constructor parameters for a xtsc_memory_trace object.
• class xtsc_memory_trace
Example XTSC model which generates a value-change dump (VCD) file of the data mem-
bers of each xtsc::xtsc_request and xtsc::xtsc_response that passes through it ("allow_-
tracing" true) and/or which tracks the lifetime, latency, and counters of each transaction by
request type and by port number ("track_latency" true).
• class transaction_info
This class is used to keep track of 4 key times during each transaction’s lifecycle in order
to compute transaciton lifetime and latency.
• class statistic_info
This class is used to keep track of transaction statistics.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <map>
#include <set>
#include <vector>
#include <string>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_wire_write_if.h>
Include dependency graph for xtsc_mmio.h:
xtsc_mmio.h
xtsc/xtsc_request.h xtsc/xtsc_respond_if.h
xtsc/xtsc.h xtsc/xtsc_request_if.h
systemc
Classes
• class xtsc_mmio_parms
Constructor parameters for a xtsc_mmio object.
• class xtsc_mmio
A general-purpose memory-mapped input/output (MMIO) register device.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class register_definition
Register definition and value.
• class output_definition
• class input_definition
Input definition and sc_export.
• class xtsc_wire_write_if_impl
Implementation of xtsc_wire_write_if.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
Functions
• std::ostream & operator<< (std::ostream &os, const xtsc_mmio::register_definition
®)
• std::ostream & operator<< (std::ostream &os, const xtsc_mmio::output_definition
&output)
• std::ostream & operator<< (std::ostream &os, const xtsc_mmio::input_definition
&input)
#include <xtsc/xtsc.h>
Include dependency graph for xtsc_mode_switch_if.h:
xtsc_mode_switch_if.h
xtsc/xtsc.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_mode_switch_if.h
xtsc.h
xtsc_request.h xtsc_lookup.h xtsc_lookup_driver.h xtsc_master_tlm2.h xtsc_queue.h xtsc_queue_consumer.h xtsc_queue_producer.h xtsc_wire.h xtsc_wire_source.h xtsc_lookup_pin.h xtsc_pin2tlm_lookup_transactor.h xtsc_queue_pin.h xtsc_tx_loader.h xtsc_wire_logic.h
xtsc_memory_base.h xtsc_memory_tlm2.h xtsc_module_pin_base.h xtsc_memory.h xtsc_udma.h xtsc_xttlm2tlm2_transactor.h xtsc_master.h xtsc_arbiter.h xtsc_slave.h xtsc_router.h xtsc_memory_trace.h xtsc_tlm22xttlm_transactor.h
Classes
• class xtsc_mode_switch_if
Interface for dynamic simulation mode switching between fast-functional and cycle-accurate
modes.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Typedefs
• typedef enum xtsc::xtsc_sim_mode xtsc_sim_mode
Enumerations
• enum xtsc_sim_mode {
XTSC_CYCLE_ACCURATE = 0,
XTSC_FUNCTIONAL }
Type used to identify simulation modes.
#include <map>
#include <set>
#include <vector>
#include <string>
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_core.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
Include dependency graph for xtsc_module_pin_base.h:
xtsc_module_pin_base.h
xtsc/xtsc_response.h
xtsc/xtsc_request.h xtsc/xtsc_core.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_module_pin_base.h
Classes
• class xtsc_module_pin_base
This is a base class for modules implementing pin-level interfaces, especially pin-level
memory interfaces.
• class req_cntl
Class to manage the bits of POReqCntl/PIReqCntl.
• class resp_cntl
Class to manage the bits of PORespCntl/PIRespCntl/SnoopRespCntl.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_types.h>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <iostream>
Include dependency graph for xtsc_parms.h:
xtsc_parms.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_parms.h
xtsc.h
xtsc_lookup.h xtsc_lookup_driver.h xtsc_master_tlm2.h xtsc_queue.h xtsc_queue_consumer.h xtsc_queue_producer.h xtsc_mode_switch_if.h xtsc_request.h xtsc_wire.h xtsc_wire_source.h xtsc_lookup_pin.h xtsc_pin2tlm_lookup_transactor.h xtsc_queue_pin.h xtsc_tx_loader.h xtsc_wire_logic.h xtsc_memory_b.h
xtsc_tlm22xttlm_transactor.h xtsc_router.h xtsc_slave.h xtsc_arbiter.h xtsc_memory_trace.h xtsc_udma.h xtsc_master.h xtsc_xttlm2tlm2_transactor.h xtsc_memory.h xtsc_module_pin_base.h
Classes
• class xtsc_parms
Base class for core and component module construction parameters.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_lookup_if.h>
#include <string>
#include <vector>
#include <fstream>
Include dependency graph for xtsc_pin2tlm_lookup_transactor.h:
xtsc_pin2tlm_lookup_transactor.h
systemc
Classes
• class xtsc_pin2tlm_lookup_transactor_parms
Constructor parameters for a xtsc_pin2tlm_lookup_transactor object.
• class xtsc_pin2tlm_lookup_transactor
A transactor to convert a pin-level TIE lookup interface to Xtensa TLM.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <deque>
#include <vector>
#include <string>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_module_pin_base.h>
Include dependency graph for xtsc_pin2tlm_memory_transactor.h:
xtsc_pin2tlm_memory_transactor.h
deque xtsc/xtsc_module_pin_base.h
xtsc/xtsc_response.h
xtsc/xtsc_core.h xtsc/xtsc_request.h
systemc
Classes
• class xtsc_pin2tlm_memory_transactor_parms
Constructor parameters for a xtsc_pin2tlm_memory_transactor transactor object.
• class xtsc_pin2tlm_memory_transactor
This device converts memory transactions from pin level to transaction level.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• class xtsc_debug_if_impl
Implementation of xtsc_debug_if.
• class request_info
Information about each request.
• class subbank_activity
Keep track of subbank activity to a given given bank to ensure all responses are consistent
(all RSP_OK or all RSP_NACC).
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_queue_push_if.h>
#include <xtsc/xtsc_queue_pop_if.h>
#include <vector>
Include dependency graph for xtsc_queue.h:
xtsc_queue.h
systemc
Classes
• class xtsc_queue_parms
Constructor parameters for an xtsc_queue object.
• class xtsc_queue
A queue implementation that connects using TLM-level ports.
• class xtsc_queue_push_if_impl
Implementation of xtsc_queue_push_if for single producer.
• class xtsc_queue_pop_if_impl
Implementation of xtsc_queue_pop_if for single consumer.
• class xtsc_queue_push_if_multi_impl
Implementation of xtsc_queue_push_if for multi-client queue (either m_num_producers or
m_num_consumers > 1).
• class xtsc_queue_pop_if_multi_impl
Implementation of xtsc_queue_pop_if for multi-client queue (either m_num_producers or
m_num_consumers > 1).
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_queue_pop_if.h>
#include <string>
#include <vector>
#include <fstream>
Include dependency graph for xtsc_queue_consumer.h:
xtsc_queue_consumer.h
systemc
Classes
• class xtsc_queue_consumer_parms
Constructor parameters for a xtsc_queue_consumer object.
• class xtsc_queue_consumer
A scripted consumer to drain a queue.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <vector>
#include <fstream>
Include dependency graph for xtsc_queue_pin.h:
xtsc_queue_pin.h
xtsc/xtsc.h fstream
systemc
Classes
• class xtsc_queue_pin_parms
Constructor parameters for a xtsc_queue_pin object.
• class xtsc_queue_pin
A TIE queue implementation using the pin-level interface.
Namespaces
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_queue_pop_if.h:
xtsc_queue_pop_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_queue_pop_if.h
Classes
• class xtsc_queue_pop_if
This interface is for connecting between a consumer and a queue.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_queue_push_if.h>
#include <string>
#include <vector>
#include <fstream>
Include dependency graph for xtsc_queue_producer.h:
xtsc_queue_producer.h
systemc
Classes
• class xtsc_queue_producer_parms
Constructor parameters for a xtsc_queue_producer object.
• class xtsc_queue_producer
A scripted producer to supply a queue.
• class xtsc_wire_write_if_impl
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_queue_push_if.h:
xtsc_queue_push_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_queue_push_if.h
Classes
• class xtsc_queue_push_if
Interface for connecting between a producer and a queue.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
Include dependency graph for xtsc_request.h:
xtsc_request.h
xtsc/xtsc.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_request.h
xtsc_response.h xtsc_mmio.h
xtsc_arbiter.h xtsc_master.h xtsc_memory.h xtsc_router.h xtsc_slave.h xtsc_memory_trace.h xtsc_module_pin_base.h xtsc_tlm22xttlm_transactor.h xtsc_udma.h xtsc_xttlm2tlm2_transactor.h
Classes
• class xtsc_request
Class representing a PIF, XLMI, local memory, snoop, or inbound PIF request transfer.
• class stream_dumper
Helper class to make it easy to dump xtsc_request to an ostream with or without data
values.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Functions
• XTSC_API std::ostream & operator<< (std::ostream &os, const xtsc_request &re-
quest)
Dump an xtsc_request object.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_request_if.h:
xtsc_request_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_request_if.h
Classes
• class xtsc_debug_if
Interface for non-hardware communication from a memory interface master to a memory
interface slave.
• class xtsc_request_if
Interface for sending requests from a memory interface master to a memory interface slave.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_respond_if.h:
xtsc_respond_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_respond_if.h
Classes
• class xtsc_respond_if
Interface for sending responses from a memory interface slave back to the requesting mem-
ory interface master.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_request.h>
#include <cstring>
Include dependency graph for xtsc_response.h:
xtsc_response.h
xtsc/xtsc_request.h cstring
xtsc/xtsc.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_response.h
xtsc_arbiter.h xtsc_master.h xtsc_memory.h xtsc_router.h xtsc_slave.h xtsc_memory_trace.h xtsc_module_pin_base.h xtsc_tlm22xttlm_transactor.h xtsc_udma.h xtsc_xttlm2tlm2_transactor.h
Classes
• class xtsc_response
Class representing a PIF, XLMI, local memory, or inbound PIF response transfer.
• class stream_dumper
Helper class to make it easy to dump xtsc_response to an ostream with or without data
values.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Functions
• XTSC_API std::ostream & operator<< (std::ostream &os, const xtsc_response &re-
sponse)
Dump an xtsc_response object.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_address_range_entry.h>
#include <xtsc/xtsc_fast_access.h>
#include <vector>
#include <cstring>
#include <map>
Include dependency graph for xtsc_router.h:
xtsc_router.h
xtsc/xtsc_response.h xtsc/xtsc_fast_access.h
systemc
Classes
• class xtsc_router_parms
Constructor parameters for a xtsc_router object.
• class xtsc_router
Example XTSC module implementing a router on a PIF network or local memory intercon-
nect.
• struct bit_field_info
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• class request_info
Information about each request.
• class response_info
Information about each response.
• class req_rsp_info
Information for PIF width converter (PWC) mode.
• class watchfilter_info
Information about each watchfilter.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_fast_access.h>
#include <string>
#include <vector>
#include <deque>
#include <fstream>
Include dependency graph for xtsc_slave.h:
xtsc_slave.h
xtsc/xtsc.h xtsc/xtsc_request_if.h
systemc
Classes
• class xtsc_slave_parms
Constructor parameters for a xtsc_slave object.
• class xtsc_slave
A scripted memory interface slave.
• class response_info
This class helps keep track of a response and when it is due.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <tlm.h>
#include <tlm_utils/peq_with_get.h>
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_fast_access.h>
#include <deque>
#include <vector>
#include <list>
#include <cstring>
Include dependency graph for xtsc_tlm22xttlm_transactor.h:
xtsc_tlm22xttlm_transactor.h
xtsc/xtsc_request_if.h xtsc/xtsc.h
systemc
Classes
• class xtsc_tlm22xttlm_transactor_parms
Constructor parameters for a xtsc_tlm22xttlm_transactor object.
• class xtsc_tlm22xttlm_transactor
Example module implementing an OSCI TLM2 to Xtensa TLM (xttlm) transactor.
• class transaction_info
• class xtsc_respond_if_impl
Implementation of xtsc_respond_if.
• class tlm_fw_transport_if_impl
Implementation of tlm_fw_transport_if<>.
• class address_range
Class to keep track of address ranges and what DMI access has been granted/invalidated.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <deque>
#include <map>
#include <vector>
#include <string>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_module_pin_base.h>
#include <xtsc/xtsc_memory_b.h>
#include <xtsc/xtsc_core.h>
Include dependency graph for xtsc_tlm2pin_memory_transactor.h:
xtsc_tlm2pin_memory_transactor.h
deque xtsc/xtsc_module_pin_base.h
xtsc/xtsc_response.h
systemc
Classes
• class xtsc_tlm2pin_memory_transactor_parms
Constructor parameters for a xtsc_tlm2pin_memory_transactor transactor object.
• class xtsc_tlm2pin_memory_transactor
This transactor converts memory transactions from transaction level (TLM) to pin level.
• class response_info
Information about each response.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class xtsc_debug_if_cap
To cap an unconnected m_debug_ports port when the user can’t bind anything to it.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_tx_xfer_if.h>
#include <xtsc/xtsc_tx_xfer.h>
#include <xtsc/xtsc_queue_push_if.h>
#include <xtsc/xtsc_queue_pop_if.h>
#include <vector>
#include <cstring>
#include <fstream>
Include dependency graph for xtsc_tx_loader.h:
xtsc_tx_loader.h
systemc
Classes
• class xtsc_tx_loader_parms
Constructor parameters for a xtsc_tx_loader object.
• class xtsc_tx_loader
XTSC module to model a boot loader for a TX Xtensa chain.
• class xtsc_tx_xfer_if_impl
Implementation of xtsc_tx_xfer_if.
• class xtsc_queue_push_if_impl
Implementation of xtsc_queue_push_if.
• class xtsc_queue_pop_if_impl
Implementation of xtsc_queue_pop_if.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_tx_xfer.h:
xtsc_tx_xfer.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_tx_xfer.h
xtsc_tx_loader.h
Classes
• class xtsc_tx_xfer
This class carries the information of a TLM transaction on the TX Xtensa XFER (boot
loader) interface.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Functions
• XTSC_API std::ostream & operator<< (std::ostream &os, const xtsc_tx_xfer &xfer)
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_tx_xfer_if.h:
xtsc_tx_xfer_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_tx_xfer_if.h
xtsc_core.h xtsc_tx_loader.h
Classes
• class xtsc_tx_xfer_if
Interface for sending TLM TX XFER interface transactions.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include "systemc"
Include dependency graph for xtsc_types.h:
xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_types.h
xtsc_memory_b.h xtsc_master_tlm2.h xtsc_lookup_pin.h xtsc_mode_switch_if.h xtsc_request.h xtsc_respond_if.h xtsc_request_if.h xtsc_queue_pin.h xtsc_wire_logic.h xtsc_wire_source.h xtsc_pin2tlm_lookup_transactor.h xtsc_queue_producer.h xtsc_lookup.h xtsc_lookup_driver.h xtsc_queue_consumer.h xtsc_wire.h xtsc_queue.h xtsc_tx_loader.h
xtsc_memory.h xtsc_memory_trace.h xtsc_router.h xtsc_tlm22xttlm_transactor.h xtsc_arbiter.h xtsc_xttlm2tlm2_transactor.h xtsc_slave.h xtsc_module_pin_base.h xtsc_udma.h xtsc_master.h
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
Defines
• #define XTSC_PRAGMA_WARNING(arg)
• #define declare_thread_process(handle, name, host_tag, func) SC_THREAD(func)
Typedefs
• typedef unsigned long long u64
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_core.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_lookup_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_wire_write_if.h>
#include <xtsc/xtsc_fast_access.h>
Include dependency graph for xtsc_udma.h:
xtsc_udma.h
xtsc/xtsc_fast_access.h xtsc/xtsc_response.h
xtsc/xtsc_request.h xtsc/xtsc_core.h
systemc
Classes
• class xtsc_udma_parms
Constructor parameters for an xtsc_udma object.
• class xtsc_udma
The xtsc_udma class provides an XTSC model of Cadence/Tensilica’s micro-DMA engine
(uDMA).
• struct udma_descriptor
Data structure used to store a uDMA descriptor.
• class xtsc_rer_lookup_if_impl
Implementation of xtsc_lookup_if for RER port.
• class xtsc_wer_lookup_if_impl
• class xtsc_ram_respond_if_impl
Implementation of xtsc_respond_if for local RAM port.
• class xtsc_pif_respond_if_impl
Implementation of xtsc_respond_if for system RAM port.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_wire_write_if.h>
#include <xtsc/xtsc_wire_read_if.h>
#include <vector>
Include dependency graph for xtsc_wire.h:
xtsc_wire.h
xtsc/xtsc_wire_read_if.h xtsc/xtsc.h
systemc
Classes
• class xtsc_wire_parms
Constructor parameters for a xtsc_wire object.
• class xtsc_wire
A wire implementation that connects using TLM-level ports.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <deque>
#include <map>
#include <set>
#include <string>
#include <vector>
Include dependency graph for xtsc_wire_logic.h:
xtsc_wire_logic.h
xtsc/xtsc.h deque
systemc
Classes
• class xtsc_wire_logic_parms
Constructor parameters for a xtsc_wire_logic object.
• class xtsc_wire_logic
A general-purpose glue logic device for the xtsc::xtsc_wire_write_if.
• class output_info
Information about a delayed output value.
• class output_definition
Output definition and sc_port.
• class input_definition
Input definition and sc_export.
• class xtsc_wire_write_if_impl
Implementation of xtsc_wire_write_if.
• class iterator_definition
Iterator definition.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
Functions
• std::ostream & operator<< (std::ostream &os, const xtsc_wire_logic::output_-
definition &output)
• std::ostream & operator<< (std::ostream &os, const xtsc_wire_logic::input_-
definition &input)
• std::ostream & operator<< (std::ostream &os, const xtsc_wire_logic::iterator_-
definition &iterator)
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_wire_read_if.h:
xtsc_wire_read_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_wire_read_if.h
xtsc_core.h xtsc_wire.h
Classes
• class xtsc_wire_read_if
Interface for reading (sinking) a wire.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_wire_write_if.h>
#include <string>
#include <vector>
#include <fstream>
Include dependency graph for xtsc_wire_source.h:
xtsc_wire_source.h
xtsc/xtsc.h fstream
systemc
Classes
• class xtsc_wire_source_parms
Constructor parameters for a xtsc_wire_source object.
• class xtsc_wire_source
A scripted xtsc::xtsc_wire_write_if or pin-level source.
• class output_definition
Output definition and sc_port.
• class xtsc_wire_write_if_impl
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
#include <xtsc/xtsc_types.h>
Include dependency graph for xtsc_wire_write_if.h:
xtsc_wire_write_if.h
xtsc/xtsc_types.h
systemc
This graph shows which files directly or indirectly include this file:
xtsc_wire_write_if.h
xtsc.h
xtsc_request.h xtsc_lookup.h xtsc_lookup_driver.h xtsc_master_tlm2.h xtsc_mode_switch_if.h xtsc_queue.h xtsc_queue_consumer.h xtsc_queue_producer.h xtsc_lookup_pin.h xtsc_pin2tlm_lookup_transactor.h xtsc_queue_pin.h xtsc_tx_loader.h xtsc_wire_logic.h xtsc_wire.h xtsc_wire_source.h
xtsc_master.h xtsc_module_pin_base.h xtsc_router.h xtsc_memory_trace.h xtsc_arbiter.h xtsc_slave.h xtsc_tlm22xttlm_transactor.h xtsc_xttlm2tlm2_transactor.h xtsc_memory.h xtsc_udma.h xtsc_memory_base.h xtsc_memory_tlm2.h
Classes
• class xtsc_wire_write_if
Interface for writing (driving/sourcing) a wire.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
#include <tlm.h>
#include <tlm_utils/peq_with_get.h>
#include <xtsc/xtsc.h>
#include <xtsc/xtsc_parms.h>
#include <xtsc/xtsc_request_if.h>
#include <xtsc/xtsc_respond_if.h>
#include <xtsc/xtsc_request.h>
#include <xtsc/xtsc_response.h>
#include <xtsc/xtsc_fast_access.h>
#include <xtsc/xtsc_core.h>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <cstring>
Include dependency graph for xtsc_xttlm2tlm2_transactor.h:
xtsc_xttlm2tlm2_transactor.h
systemc
Classes
• class xtsc_xttlm2tlm2_transactor_parms
Constructor parameters for a xtsc_xttlm2tlm2_transactor object.
• class xtsc_xttlm2tlm2_transactor
Example module implementing an Xtensa TLM (xttlm) to OSCI TLM2 transactor.
• class xtsc_request_if_impl
Implementation of xtsc_request_if.
• class tlm_bw_transport_if_impl
Implementation of tlm_bw_transport_if.
• class address_range
Class to keep track of address ranges and what DMI access has been granted/invalidated.
• class nb_mm
Class for tlm_mm_interface for nb_transport.
• class transaction_info
Class to keep track of xtsc_request, tlm_generic_payload, and xtsc_response when using
nb_transport.
Namespaces
• namespace xtsc
All xtsc library objects (non-member functions, non-member data, and classes including
xtsc_core) and their associated typedef and enum types are in the xtsc namespace.
• namespace xtsc_component
All XTSC component library objects are in the xtsc_component namespace.
Index
add xtsc, 56
xtsc::xtsc_parms, 746–752, 754, 755 BOOL_OUTPUT
add_bool_input xtsc, 56
xtsc_component::xtsc_module_pin_- breakpoint_interrupt
base, 729 xtsc::xtsc_core, 315
add_bool_output BURST_READ
xtsc_component::xtsc_module_pin_- xtsc::xtsc_request, 900
base, 730 BURST_WRITE
add_uint_input xtsc::xtsc_request, 900
xtsc_component::xtsc_module_pin_- byte_dump
base, 729 xtsc::xtsc_memory_b, 594
add_uint_output xtsc_component::xtsc_memory, 580
xtsc_component::xtsc_module_pin_- xtsc_component::xtsc_memory_pin,
base, 730 635
add_wide_input xtsc_component::xtsc_memory_tlm2,
xtsc_component::xtsc_module_pin_- 656
base, 729
add_wide_output change_clock_period
xtsc_component::xtsc_module_pin_-
xtsc::xtsc_core, 292
base, 731
xtsc::xtsc_udma, 1180
adjust_block_write
xtsc_component::xtsc_arbiter, 201
xtsc::xtsc_request, 906
xtsc_component::xtsc_lookup, 477
allow_callbacks_access
xtsc_component::xtsc_memory, 581
xtsc::xtsc_fast_access_request, 444
xtsc_component::xtsc_memory_tlm2,
allow_custom_callbacks_access
659
xtsc::xtsc_fast_access_request, 444
xtsc_component::xtsc_mmio, 704
allow_interface_access
xtsc_component::xtsc_router, 1019
xtsc::xtsc_fast_access_request, 443
allow_raw_access xtsc_component::xtsc_tlm22xttlm_-
xtsc::xtsc_fast_access_request, 443 transactor, 1091
arbitrate xtsc_component::xtsc_wire_logic, 1211
xtsc_component::xtsc_arbiter, 200 xtsc_component::xtsc_xttlm2tlm2_-
arbitrate_policy transactor, 1272
xtsc_component::xtsc_arbiter, 200 check_for_too_few_parameters
xtsc_component::xtsc_master, 535
BAD_DESCRIPTOR_ERROR xtsc_component::xtsc_master_tlm2,
xtsc::xtsc_udma, 1179 554
BLOCK_READ check_for_too_many_parameters
xtsc::xtsc_request, 900 xtsc_component::xtsc_master, 535
BLOCK_WRITE xtsc_component::xtsc_master_tlm2,
xtsc::xtsc_request, 900 554
BOOL_INPUT cntr_latency
xtsc_component::xtsc_memory_trace, xtsc_component::xtsc_memory_tlm2,
676 658, 659
cntr_lifetime xtsc_component::xtsc_memory_trace,
xtsc_component::xtsc_memory_trace, 681–683
676 xtsc_component::xtsc_mmio, 700–703
cntr_req_beats xtsc_component::xtsc_pin2tlm_-
xtsc_component::xtsc_memory_trace, memory_transactor, 786
676 xtsc_component::xtsc_queue, 816, 817
cntr_req_busys xtsc_component::xtsc_queue_-
xtsc_component::xtsc_memory_trace, consumer, 824
676 xtsc_component::xtsc_queue_-
cntr_rsp_beats producer, 867
xtsc_component::xtsc_memory_trace, xtsc_component::xtsc_router, 1020–
676 1022
cntr_rsp_busys xtsc_component::xtsc_slave, 1074–
xtsc_component::xtsc_memory_trace, 1076
676 xtsc_component::xtsc_tlm22xttlm_-
cntr_transactions transactor, 1091, 1092
xtsc_component::xtsc_memory_trace, xtsc_component::xtsc_tlm2pin_-
676 memory_transactor, 1117–1119
cntr_type xtsc_component::xtsc_wire, 1197,
xtsc_component::xtsc_memory_trace, 1198
676 xtsc_component::xtsc_wire_logic,
coherence_t 1209–1211
xtsc::xtsc_request, 900 xtsc_component::xtsc_wire_source,
xtsc::xtsc_response, 993 1234, 1235
compute_special_response xtsc_component::xtsc_xttlm2tlm2_-
xtsc_component::xtsc_memory, 586 transactor, 1273, 1274
CONFIG connect_user_defined_port_type
xtsc::xtsc_udma, 1178 xtsc::xtsc_connection_interface, 248
conjugate_delta convert_response
xtsc, 56 xtsc_component::xtsc_arbiter, 205
connect copy_void_pointer
xtsc::xtsc_core, 301, 302 xtsc::xtsc_parms, 757
xtsc::xtsc_tx_loader, 1149 create_module
xtsc_component::xtsc_arbiter, 202– xtsc::xtsc_plugin_interface, 802
204 create_parms
xtsc_component::xtsc_lookup, 478, xtsc::xtsc_plugin_interface, 801
479 CROSS_RAM_BOUNDARY_ERROR
xtsc_component::xtsc_master, 534, xtsc::xtsc_udma, 1179
535
xtsc_component::xtsc_memory, 582– DEBUG_EXPORT
585 xtsc, 56
xtsc_component::xtsc_memory_pin, DEBUG_PORT
636 xtsc, 55
get_default_port_name get_local_block
xtsc::xtsc_connection_interface, 246 xtsc::xtsc_fast_access_request, 446
get_done get_local_memory_byte_size
xtsc::xtsc_tx_xfer, 1156 xtsc::xtsc_core, 320
get_dram_attribute get_local_memory_starting_byte_address
xtsc::xtsc_request, 908 xtsc::xtsc_core, 319
get_exclusive get_lookup
xtsc::xtsc_request, 919 xtsc::xtsc_core, 289
get_exclusive_ok get_lookup_address_bit_width
xtsc::xtsc_response, 1002 xtsc::xtsc_core, 337
get_exclusive_req get_lookup_data_bit_width
xtsc::xtsc_response, 1001 xtsc::xtsc_core, 338
get_export_state get_lookup_latency
xtsc::xtsc_core, 290 xtsc::xtsc_core, 338
get_fast_access_if get_memory_port
xtsc::xtsc_fast_access_request, 448 xtsc::xtsc_core, 294
get_hardware_address get_memory_port_name
xtsc::xtsc_request, 906 xtsc::xtsc_core, 294
get_id get_multi_port_count
xtsc::xtsc_request, 912 xtsc::xtsc_core, 317
xtsc::xtsc_response, 998 get_multi_port_zero
get_import_wire xtsc::xtsc_core, 317
xtsc::xtsc_core, 290 get_non_empty_c_str
get_input xtsc::xtsc_parms, 753
xtsc_component::xtsc_mmio, 699 get_non_zero_u32
xtsc_component::xtsc_wire_logic, 1209 xtsc::xtsc_parms, 749
get_input_pin get_nth_multi_port
xtsc::xtsc_core, 291 xtsc::xtsc_core, 318
get_input_pin_set get_num_transfers
xtsc::xtsc_core, 329 xtsc::xtsc_request, 911
get_input_queue xtsc_component::xtsc_module_pin_-
xtsc::xtsc_core, 289 base::req_cntl, 136
get_instantiation_number get_object
xtsc::xtsc_core, 307 xtsc::xtsc_connection_interface, 245
get_instr_width get_orig_raw_data
xtsc::xtsc_core, 341 xtsc::xtsc_fast_access_request, 447
get_instruction_fetch get_output
xtsc::xtsc_request, 914 xtsc_component::xtsc_mmio, 699
get_interrupt_number xtsc_component::xtsc_wire_logic, 1209
xtsc::xtsc_core, 345 get_output_pin
get_last_stage xtsc::xtsc_core, 290
xtsc::xtsc_core, 341 xtsc_component::xtsc_wire_source,
get_last_transfer 1234
xtsc::xtsc_request, 914 get_output_pin_set
xtsc::xtsc_response, 995 xtsc::xtsc_core, 329
xtsc_component::xtsc_tlm2pin_- is_subbanked_dram0
memory_transactor, 1120 xtsc::xtsc_core, 294
is_subbanked_dram1
Information_on_memory_interface_- xtsc::xtsc_core, 295
protocols is_tracing_enabled
xtsc::xtsc_core, 371 xtsc_component::xtsc_memory_trace,
initialize 676
xtsc::xtsc_request, 904 is_writable
INITIATOR_SOCKET_16 xtsc::xtsc_fast_access_request, 445
xtsc, 56
INITIATOR_SOCKET_32 kind
xtsc, 56 xtsc::xtsc_parms, 744
INITIATOR_SOCKET_4
load_client
xtsc, 56
xtsc::xtsc_core, 347
INITIATOR_SOCKET_64
load_client_file
xtsc, 56
xtsc::xtsc_core, 348
INITIATOR_SOCKET_8
load_file
xtsc, 56
xtsc::xtsc_core, 345
INVALID
load_initial_values
xtsc::xtsc_response, 993
xtsc::xtsc_memory_b, 595
INVALIDATE
xtsc_component::xtsc_memory, 588
xtsc::xtsc_request, 900 xtsc_component::xtsc_memory_tlm2,
is_clock_enabled 659
xtsc::xtsc_core, 327 load_program
is_dual_ported xtsc::xtsc_core, 346
xtsc::xtsc_core, 316 lock
is_fast_functional_mode xtsc::xtsc_memory_b, 595
xtsc::xtsc_core, 326 log_disassembly
is_latency_tracking_enabled xtsc::xtsc_core, 326
xtsc_component::xtsc_memory_trace, LOOKUP_EXPORT
677 xtsc, 56
is_ls_dual_port LOOKUP_PORT
xtsc::xtsc_core, 295 xtsc, 55
is_mode_switch_pending
xtsc::xtsc_mode_switch_if, 712 m_banked
is_multi_port_zero xtsc_component::xtsc_module_pin_-
xtsc::xtsc_core, 316 base, 732
is_readable m_coherence
xtsc::xtsc_fast_access_request, 446 xtsc_component::xtsc_memory_-
is_register_tracing_enabled trace::xtsc_request_if_impl, 958
xtsc::xtsc_core, 324 xtsc_component::xtsc_memory_-
is_snoop trace::xtsc_respond_if_impl, 977
xtsc::xtsc_response, 996 m_done_descriptor_deque
is_subbanked_dram xtsc_component::xtsc_dma_engine,
xtsc::xtsc_core, 295 422
xtsc_component::xtsc_queue_- xtsc::xtsc_tlm2pin_wire_transactor_-
producer, 867 base, 1136
nb_fast_access xtsc::xtsc_tx_loader::xtsc_queue_-
xtsc::xtsc_debug_if, 396 pop_if_impl, 851
xtsc_component::xtsc_arbiter::xtsc_- xtsc::xtsc_tx_loader::xtsc_queue_-
request_if_impl, 951 push_if_impl, 880
xtsc_component::xtsc_memory::xtsc_- xtsc::xtsc_wire_read_if, 1225
request_if_impl, 934 xtsc::xtsc_wire_write_if, 1243
xtsc_component::xtsc_memory_- xtsc_component::xtsc_master::xtsc_-
pin::xtsc_debug_if_impl, 404 wire_write_if_impl, 1257
xtsc_component::xtsc_memory_- xtsc_component::xtsc_mmio::input_-
trace::xtsc_request_if_impl, 957 definition::xtsc_wire_write_if_impl,
xtsc_component::xtsc_mmio::xtsc_- 1254
request_if_impl, 938 xtsc_component::xtsc_queue::xtsc_-
xtsc_component::xtsc_pin2tlm_- queue_pop_if_impl, 854
memory_transactor::xtsc_debug_- xtsc_component::xtsc_queue::xtsc_-
if_impl, 408 queue_pop_if_multi_impl, 858
xtsc_component::xtsc_router::xtsc_- xtsc_component::xtsc_queue::xtsc_-
request_if_impl, 946 queue_push_if_impl, 883
xtsc_component::xtsc_tlm2pin_- xtsc_component::xtsc_queue::xtsc_-
memory_transactor::xtsc_debug_- queue_push_if_multi_impl, 887
if_cap, 401 xtsc_component::xtsc_queue_-
xtsc_component::xtsc_tlm2pin_- consumer, 825
memory_transactor::xtsc_- xtsc_component::xtsc_queue_-
request_if_impl, 929 producer, 869
xtsc_component::xtsc_xttlm2tlm2_- xtsc_component::xtsc_queue_-
transactor::xtsc_request_if_impl, producer::xtsc_wire_write_if_impl,
942 1246
nb_fast_access_read xtsc_component::xtsc_wire, 1199
xtsc::xtsc_fast_access_if, 435 xtsc_component::xtsc_wire_-
nb_fast_access_write logic::input_definition::xtsc_-
xtsc::xtsc_fast_access_if, 436 wire_write_if_impl, 1249
nb_get_address_bit_width xtsc_component::xtsc_wire_source,
xtsc::xtsc_lookup_if, 497 1236
xtsc::xtsc_udma::xtsc_rer_lookup_if_- xtsc_component::xtsc_wire_-
impl, 961 source::xtsc_wire_write_if_impl,
xtsc::xtsc_udma::xtsc_wer_lookup_if_- 1251
impl, 1190 nb_get_data
xtsc_component::xtsc_lookup::xtsc_- xtsc::xtsc_lookup_if, 497
lookup_if_impl, 501 xtsc::xtsc_udma::xtsc_rer_lookup_if_-
xtsc_component::xtsc_lookup_driver, impl, 961
489 xtsc::xtsc_udma::xtsc_wer_lookup_if_-
nb_get_bit_width impl, 1190
xtsc::xtsc_queue_pop_if, 849 xtsc_component::xtsc_lookup::xtsc_-
xtsc::xtsc_queue_push_if, 877 lookup_if_impl, 500
xtsc_component::xtsc_lookup_driver, xtsc_component::xtsc_tlm2pin_-
488 memory_transactor::xtsc_-
nb_get_data_bit_width request_if_impl, 930
xtsc::xtsc_lookup_if, 498 xtsc_component::xtsc_xttlm2tlm2_-
xtsc::xtsc_udma::xtsc_rer_lookup_if_- transactor::xtsc_request_if_impl,
impl, 961 942
xtsc::xtsc_udma::xtsc_wer_lookup_if_- nb_peek
impl, 1190 xtsc::xtsc_debug_if, 395
xtsc_component::xtsc_lookup::xtsc_- xtsc_component::xtsc_arbiter::xtsc_-
lookup_if_impl, 501 request_if_impl, 950
xtsc_component::xtsc_lookup_driver, xtsc_component::xtsc_memory::xtsc_-
489 request_if_impl, 934
nb_is_ready xtsc_component::xtsc_memory_-
xtsc::xtsc_lookup_if, 496 pin::xtsc_debug_if_impl, 403
xtsc::xtsc_udma::xtsc_rer_lookup_if_- xtsc_component::xtsc_memory_-
impl, 960 trace::xtsc_request_if_impl, 956
xtsc::xtsc_udma::xtsc_wer_lookup_if_- xtsc_component::xtsc_mmio::xtsc_-
impl, 1189 request_if_impl, 938
xtsc_component::xtsc_lookup::xtsc_- xtsc_component::xtsc_pin2tlm_-
lookup_if_impl, 500 memory_transactor::xtsc_debug_-
xtsc_component::xtsc_lookup_driver, if_impl, 407
488 xtsc_component::xtsc_router::xtsc_-
nb_load_retired request_if_impl, 945
xtsc::xtsc_request_if, 925 xtsc_component::xtsc_tlm2pin_-
xtsc_component::xtsc_arbiter::xtsc_- memory_transactor::xtsc_debug_-
request_if_impl, 951 if_cap, 400
xtsc_component::xtsc_memory::xtsc_- xtsc_component::xtsc_tlm2pin_-
request_if_impl, 935 memory_transactor::xtsc_-
xtsc_component::xtsc_memory_- request_if_impl, 929
trace::xtsc_request_if_impl, 957 xtsc_component::xtsc_xttlm2tlm2_-
xtsc_component::xtsc_router::xtsc_- transactor::xtsc_request_if_impl,
request_if_impl, 947 942
xtsc_component::xtsc_tlm2pin_- nb_peek_coherent
memory_transactor::xtsc_- xtsc::xtsc_debug_if, 397
request_if_impl, 930 xtsc_component::xtsc_arbiter::xtsc_-
nb_lock request_if_impl, 950
xtsc::xtsc_request_if, 925 xtsc_component::xtsc_memory_-
xtsc_component::xtsc_arbiter::xtsc_- trace::xtsc_request_if_impl, 957
request_if_impl, 951 xtsc_component::xtsc_pin2tlm_-
xtsc_component::xtsc_memory::xtsc_- memory_transactor::xtsc_debug_-
request_if_impl, 935 if_impl, 407
xtsc_component::xtsc_memory_- xtsc_component::xtsc_router::xtsc_-
trace::xtsc_request_if_impl, 958 request_if_impl, 946
xtsc_component::xtsc_router::xtsc_- nb_poke
request_if_impl, 947 xtsc::xtsc_debug_if, 396
xtsc_component::xtsc_arbiter::xtsc_- nb_push
request_if_impl, 950 xtsc::xtsc_queue_push_if, 876
xtsc_component::xtsc_memory::xtsc_- xtsc::xtsc_tx_loader::xtsc_queue_-
request_if_impl, 934 push_if_impl, 880
xtsc_component::xtsc_memory_- xtsc_component::xtsc_queue::xtsc_-
pin::xtsc_debug_if_impl, 404 queue_push_if_impl, 883
xtsc_component::xtsc_memory_- xtsc_component::xtsc_queue::xtsc_-
trace::xtsc_request_if_impl, 956 queue_push_if_multi_impl, 886
xtsc_component::xtsc_mmio::xtsc_- xtsc_component::xtsc_queue_-
request_if_impl, 938 producer, 868
xtsc_component::xtsc_pin2tlm_- nb_read
memory_transactor::xtsc_debug_- xtsc::xtsc_wire_read_if, 1225
if_impl, 407 xtsc_component::xtsc_wire, 1199
xtsc_component::xtsc_router::xtsc_- nb_request
request_if_impl, 946 xtsc::xtsc_request_if, 924
xtsc_component::xtsc_tlm2pin_- xtsc_component::xtsc_arbiter::xtsc_-
memory_transactor::xtsc_debug_- request_if_impl, 950
if_cap, 400 xtsc_component::xtsc_memory::xtsc_-
xtsc_component::xtsc_tlm2pin_- request_if_impl, 934
memory_transactor::xtsc_- xtsc_component::xtsc_memory_-
request_if_impl, 929 trace::xtsc_request_if_impl, 957
xtsc_component::xtsc_xttlm2tlm2_- xtsc_component::xtsc_mmio::xtsc_-
transactor::xtsc_request_if_impl, request_if_impl, 938
942 xtsc_component::xtsc_router::xtsc_-
nb_poke_coherent request_if_impl, 946
xtsc::xtsc_debug_if, 397 xtsc_component::xtsc_tlm2pin_-
xtsc_component::xtsc_arbiter::xtsc_- memory_transactor::xtsc_-
request_if_impl, 951 request_if_impl, 930
xtsc_component::xtsc_memory_- xtsc_component::xtsc_xttlm2tlm2_-
trace::xtsc_request_if_impl, 957 transactor::xtsc_request_if_impl,
xtsc_component::xtsc_pin2tlm_- 942
memory_transactor::xtsc_debug_- nb_respond
if_impl, 407 xtsc::xtsc_respond_if, 967
xtsc_component::xtsc_router::xtsc_- xtsc::xtsc_udma::xtsc_pif_respond_if_-
request_if_impl, 946 impl, 760
nb_pop xtsc::xtsc_udma::xtsc_ram_respond_-
xtsc::xtsc_queue_pop_if, 848 if_impl, 889
xtsc::xtsc_tx_loader::xtsc_queue_- xtsc_component::xtsc_arbiter::xtsc_-
pop_if_impl, 851 respond_if_impl, 979
xtsc_component::xtsc_queue::xtsc_- xtsc_component::xtsc_cache::xtsc_-
queue_pop_if_impl, 854 respond_if_impl, 984
xtsc_component::xtsc_queue::xtsc_- xtsc_component::xtsc_dma_-
queue_pop_if_multi_impl, 857 engine::xtsc_respond_if_impl,
xtsc_component::xtsc_queue_- 986
consumer, 825 xtsc_component::xtsc_memory_-
xtsc, 95 set_exclusive_ok
sc_core::sc_unwind_exception, 159 xtsc::xtsc_response, 1002
send_client_command set_id
xtsc::xtsc_core, 348 xtsc::xtsc_request, 912
set xtsc::xtsc_response, 998
xtsc::xtsc_parms, 746, 747, 749, 750, set_instruction_fetch
752–755 xtsc::xtsc_request, 914
set_alt_reset_vec set_interrupt
xtsc::xtsc_core, 345 xtsc::xtsc_core, 328
set_breakpoint_callback set_last_transfer
xtsc::xtsc_core, 314 xtsc::xtsc_request, 913
set_buffer xtsc::xtsc_response, 995
xtsc::xtsc_request, 917 set_multiple_registers
xtsc::xtsc_response, 999 xtsc::xtsc_core, 343
set_byte_address set_num_transfers
xtsc::xtsc_request, 905 xtsc::xtsc_request, 910
set_byte_enables set_pc
xtsc::xtsc_request, 912 xtsc::xtsc_core, 341
set_byte_size xtsc::xtsc_request, 916
xtsc::xtsc_request, 907 xtsc::xtsc_response, 997
set_clock_phase_delta_factors set_pif_attribute
xtsc::xtsc_core, 351 xtsc::xtsc_request, 907
set_coherence set_pif_req_domain
xtsc::xtsc_request, 915 xtsc::xtsc_request, 908
xtsc::xtsc_response, 996 set_priority
set_config_xfer xtsc::xtsc_request, 913
xtsc::xtsc_tx_xfer, 1158 xtsc::xtsc_response, 998
set_data set_read_data
xtsc::xtsc_tx_xfer, 1158 xtsc::xtsc_tx_xfer, 1158
set_debug_poll_interval set_ready_enable
xtsc::xtsc_core, 312 xtsc_component::xtsc_lookup, 477
set_debugger_connect_callback set_register_value
xtsc::xtsc_core, 313 xtsc::xtsc_core, 343
set_debugger_disconnect_callback set_response_history_depth
xtsc::xtsc_core, 313 xtsc_component::xtsc_master, 533
set_debugger_resume_callback set_route_id
xtsc::xtsc_core, 314 xtsc::xtsc_request, 909
set_done xtsc::xtsc_response, 997
xtsc::xtsc_tx_xfer, 1157 set_sim_mode_switch_callback
set_dram_attribute xtsc::xtsc_core, 308
xtsc::xtsc_request, 908 set_simcall_callback
set_dumpable xtsc::xtsc_core, 307
xtsc::xtsc_parms, 758 set_simcall_return_value
set_exclusive xtsc::xtsc_core, 306
xtsc::xtsc_request, 919 set_snoop_data
type_t xtsc, 56
xtsc::xtsc_request, 900 WIRE_WRITE_PORT
xtsc, 56
UDMA_OK writable
xtsc::xtsc_udma, 1179 xtsc::xtsc_parms, 746
UINT_INPUT WRITE
xtsc, 56 xtsc::xtsc_request, 900
UINT_OUTPUT write_outputs
xtsc, 56 xtsc_component::xtsc_-
unlock mmio::register_definition, 133
xtsc::xtsc_memory_b, 595
USER_DEFINED_EXPORT xfer_reset
xtsc, 56 xtsc::xtsc_core, 328
USER_DEFINED_INITIATOR xtsc, 35
xtsc, 56 BOOL_INPUT, 56
USER_DEFINED_INPUT BOOL_OUTPUT, 56
xtsc, 56 conjugate_delta, 56
USER_DEFINED_OUTPUT DEBUG_EXPORT, 56
xtsc, 56 DEBUG_PORT, 55
USER_DEFINED_PORT INITIATOR_SOCKET_16, 56
xtsc, 55 INITIATOR_SOCKET_32, 56
USER_DEFINED_TARGET INITIATOR_SOCKET_4, 56
xtsc, 56 INITIATOR_SOCKET_64, 56
INITIATOR_SOCKET_8, 56
watchfilter_add LOOKUP_EXPORT, 56
xtsc::xtsc_core, 303 LOOKUP_PORT, 55
xtsc_component::xtsc_memory, 585 operator<<, 93, 94
xtsc_component::xtsc_router, 1023 operator++, 93
watchfilter_dump PORT_TABLE, 57
xtsc::xtsc_core, 303 QUEUE_POP_EXPORT, 56
xtsc_component::xtsc_memory, 585 QUEUE_POP_PORT, 56
xtsc_component::xtsc_router, 1023 QUEUE_PUSH_EXPORT, 56
watchfilter_remove QUEUE_PUSH_PORT, 56
xtsc::xtsc_core, 304 REQUEST_EXPORT, 56
xtsc_component::xtsc_memory, 586 REQUEST_PORT, 55
xtsc_component::xtsc_router, 1024 RESPOND_EXPORT, 56
WIDE_INPUT RESPOND_PORT, 55
xtsc, 56 sc_command_handler_commands, 95
WIDE_OUTPUT TARGET_SOCKET_16, 57
xtsc, 56 TARGET_SOCKET_32, 57
WIRE_READ_EXPORT TARGET_SOCKET_4, 56
xtsc, 56 TARGET_SOCKET_64, 57
WIRE_READ_PORT TARGET_SOCKET_8, 56
xtsc, 56 TX_XFER_EXPORT, 56
WIRE_WRITE_EXPORT TX_XFER_PORT, 56
UINT_INPUT, 56 xtsc_filter_apply_xtsc_request, 90
UINT_OUTPUT, 56 xtsc_filter_apply_xtsc_response, 90
USER_DEFINED_EXPORT, 56 xtsc_filter_create, 87
USER_DEFINED_INITIATOR, 56 xtsc_filter_dump, 88
USER_DEFINED_INPUT, 56 xtsc_filter_exists, 87
USER_DEFINED_OUTPUT, 56 xtsc_filter_get, 88
USER_DEFINED_PORT, 55 xtsc_filter_kind_dump, 86
USER_DEFINED_TARGET, 56 xtsc_filter_kind_register, 86
WIDE_INPUT, 56 xtsc_finalize, 59
WIDE_OUTPUT, 56 xtsc_fire_turboxim_event_id, 61
WIRE_READ_EXPORT, 56 xtsc_get_absolute_directory, 72
WIRE_READ_PORT, 56 xtsc_get_absolute_path, 72
WIRE_WRITE_EXPORT, 56 xtsc_get_absolute_path_and_name,
WIRE_WRITE_PORT, 56 73
xtsc_add_lua_script_file, 69 xtsc_get_hex_dump_left_to_right, 67
xtsc_basename, 72 xtsc_get_next_watchfilter_number, 86
xtsc_byte_array_to_sc_unsigned, 70 xtsc_get_plugin_interface_t, 54
xtsc_command_argtobool, 78 xtsc_get_port_type_name, 91
xtsc_command_argtod, 80 xtsc_get_relaxed_simulation_barrier,
xtsc_command_argtoi32, 79 62
xtsc_command_argtou32, 79 xtsc_get_relaxed_simulation_interval,
xtsc_command_argtou64, 80 63
xtsc_command_handler_commands, xtsc_get_remaining_relaxed_-
96 simulation_time, 63
xtsc_command_remainder, 81 xtsc_get_shared_memory, 69
xtsc_command_throw, 81 xtsc_get_system_clock_factor, 58
xtsc_compute_fast_access_swizzle, 71 xtsc_get_system_clock_period, 60
xtsc_confirm_conjugate_user_- xtsc_get_system_clock_posedge_-
defined_port_types, 92 offset, 60
xtsc_connect, 93 xtsc_get_user_name, 69
xtsc_copy_c_str, 75 xtsc_hex_dump, 67
xtsc_copy_c_str_array, 75 xtsc_host_milliseconds, 85
xtsc_create_queue_ticket, 61 xtsc_host_mutex_close, 85
xtsc_delete_c_str, 75 xtsc_host_mutex_lock, 83
xtsc_delete_c_str_array, 76 xtsc_host_mutex_open, 83
xtsc_dirname, 72 xtsc_host_mutex_try_lock, 84
xtsc_dispatch_command, 77 xtsc_host_mutex_unlock, 84
xtsc_dump_systemc_objects, 76 xtsc_host_sleep, 85
xtsc_enable_text_logging, 66 xtsc_initialize, 58, 59
xtsc_event_dump, 83 xtsc_is_pin_level_port_type, 92
xtsc_event_exists, 82 xtsc_is_tlm2_port_type, 92
xtsc_event_get, 82 xtsc_is_user_defined_port_type, 91
xtsc_event_register, 81 xtsc_is_valid_identifier, 74
xtsc_filter_apply_xtsc_peek, 89 xtsc_is_xttlm_port_type, 91
xtsc_filter_apply_xtsc_poke, 89 xtsc_load_library, 73
xtsc_component::xtsc_xttlm2tlm2_- xtsc_delete_c_str_array
transactor::address_range, 110 xtsc, 76
xtsc_component::xtsc_xttlm2tlm2_- xtsc_dirname
transactor::nb_mm, 120 xtsc, 72
xtsc_component::xtsc_xttlm2tlm2_- xtsc_dispatch_command
transactor::tlm_bw_transport_- xtsc, 77
if_impl, 167 xtsc_dma_engine
xtsc_component::xtsc_xttlm2tlm2_- xtsc_component::xtsc_dma_engine,
transactor::transaction_info, 177 421
xtsc_component::xtsc_xttlm2tlm2_- xtsc_dma_engine.h, 1315
transactor::xtsc_request_if_impl, xtsc_dma_request.h, 1317
940 xtsc_dump_systemc_objects
nb_fast_access, 942 xtsc, 76
nb_lock, 942 xtsc_enable_text_logging
nb_peek, 942 xtsc, 66
nb_poke, 942 XTSC_ERROR
nb_request, 942 xtsc.h, 1302
xtsc_component::xtsc_xttlm2tlm2_- xtsc_event_dump
transactor_parms, 1276 xtsc, 83
xtsc_xttlm2tlm2_transactor_parms, xtsc_event_exists
1280 xtsc, 82
xtsc_compute_fast_access_swizzle xtsc_event_get
xtsc, 71 xtsc, 82
xtsc_confirm_conjugate_user_defined_- xtsc_event_register
port_types xtsc, 81
xtsc, 92 xtsc_exception.h, 1318
xtsc_connect xtsc_fast_access.h, 1319
xtsc, 93 xtsc_fast_access_block
xtsc_connection_interface xtsc::xtsc_fast_access_block, 432
xtsc::xtsc_connection_interface, 244 xtsc_fast_access_request
xtsc_copy_c_str xtsc::xtsc_fast_access_request, 442
xtsc, 75 XTSC_FATAL
xtsc_copy_c_str_array xtsc.h, 1301
xtsc, 75 xtsc_filter_apply_xtsc_peek
xtsc_core xtsc, 89
xtsc::xtsc_core, 286 xtsc_filter_apply_xtsc_poke
xtsc_core.h, 1313 xtsc, 89
xtsc_core_parms xtsc_filter_apply_xtsc_request
xtsc::xtsc_core_parms, 393 xtsc, 90
xtsc_create_queue_ticket xtsc_filter_apply_xtsc_response
xtsc, 61 xtsc, 90
XTSC_DEBUG xtsc_filter_create
xtsc.h, 1304 xtsc, 87
xtsc_delete_c_str xtsc::xtsc_filter, 456
xtsc, 75 xtsc_filter_dump
xtsc, 88 xtsc, 67
xtsc_filter_exists xtsc_host_milliseconds
xtsc, 87 xtsc, 85
xtsc_filter_get xtsc_host_mutex_close
xtsc, 88 xtsc, 85
xtsc_filter_kind_dump xtsc_host_mutex_lock
xtsc, 86 xtsc, 83
xtsc_filter_kind_register xtsc_host_mutex_open
xtsc, 86 xtsc, 83
xtsc_finalize xtsc_host_mutex_try_lock
xtsc, 59 xtsc, 84
xtsc_fire_turboxim_event_id xtsc_host_mutex_unlock
xtsc, 61 xtsc, 84
xtsc_get_absolute_directory xtsc_host_sleep
xtsc, 72 xtsc, 85
xtsc_get_absolute_path XTSC_INFO
xtsc, 72 xtsc.h, 1304
xtsc_get_absolute_path_and_name xtsc_initialize
xtsc, 73 xtsc, 58, 59
xtsc_get_hex_dump_left_to_right xtsc_initialize_parms
xtsc, 67 xtsc::xtsc_initialize_parms, 467
xtsc_get_next_watchfilter_number xtsc_is_pin_level_port_type
xtsc, 86 xtsc, 92
xtsc_get_plugin_interface_t xtsc_is_tlm2_port_type
xtsc, 54 xtsc, 92
xtsc_get_port_type_name xtsc_is_user_defined_port_type
xtsc, 91 xtsc, 91
xtsc_get_relaxed_simulation_barrier xtsc_is_valid_identifier
xtsc, 62 xtsc, 74
xtsc_get_relaxed_simulation_interval xtsc_is_xttlm_port_type
xtsc, 63 xtsc, 91
xtsc_get_remaining_relaxed_simulation_- xtsc_load_library
time xtsc, 73
xtsc, 63 XTSC_LOG
xtsc_get_shared_memory xtsc.h, 1305
xtsc, 69 xtsc_log_delta_cycle
xtsc_get_system_clock_factor xtsc, 66
xtsc, 58 xtsc_log_multiline
xtsc_get_system_clock_period xtsc, 74
xtsc, 60 XTSC_LOG_PREFIX
xtsc_get_system_clock_posedge_offset xtsc.h, 1301
xtsc, 60 xtsc_lookup
xtsc_get_user_name xtsc_component::xtsc_lookup, 477
xtsc, 69 xtsc_lookup.h, 1321
xtsc_hex_dump xtsc_lookup_driver
xtsc_component::xtsc_lookup_driver, xtsc_memory_tlm2
487 xtsc_component::xtsc_memory_tlm2,
xtsc_lookup_driver.h, 1323 656
xtsc_lookup_driver_parms xtsc_memory_tlm2.h, 1338
xtsc_component::xtsc_lookup_driver_- xtsc_memory_tlm2_parms
parms, 494 xtsc_component::xtsc_memory_tlm2_-
xtsc_lookup_if.h, 1325 parms, 666
xtsc_lookup_parms xtsc_memory_trace
xtsc_component::xtsc_lookup_parms, xtsc_component::xtsc_memory_trace,
509 676
xtsc_lookup_pin xtsc_memory_trace.h, 1340
xtsc_component::xtsc_lookup_pin, 517 xtsc_memory_trace_parms
xtsc_lookup_pin.h, 1327 xtsc_component::xtsc_memory_-
xtsc_lookup_pin_parms trace_parms, 688, 689
xtsc_component::xtsc_lookup_pin_- xtsc_mmio
parms, 521 xtsc_component::xtsc_mmio, 699
xtsc_master xtsc_mmio.h, 1342
xtsc_component::xtsc_master, 532 xtsc_mmio_parms
xtsc_master.h, 1328 xtsc_component::xtsc_mmio_parms,
xtsc_master_parms 709
xtsc_component::xtsc_master_parms, xtsc_mode_switch_if.h, 1344
544
xtsc_module
xtsc_master_tlm2
xtsc::xtsc_module, 716
xtsc_component::xtsc_master_tlm2,
xtsc_module_pin_base
553
xtsc_component::xtsc_module_pin_-
xtsc_master_tlm2.h, 1330
base, 727
xtsc_master_tlm2_parms
xtsc_module_pin_base.h, 1346
xtsc_component::xtsc_master_tlm2_-
parms, 558 XTSC_NOTE
xtsc_memory xtsc.h, 1303
xtsc_component::xtsc_memory, 579 xtsc_parameter_type
xtsc_memory.h, 1332 xtsc::xtsc_parms, 743
xtsc_memory_b xtsc_parms.h, 1348
xtsc::xtsc_memory_b, 593 xtsc_parse_port_name
xtsc_memory_b.h, 1334 xtsc, 74
xtsc_memory_parms xtsc_pattern_match
xtsc_component::xtsc_memory_- xtsc, 57
parms, 614 xtsc_pin2tlm_lookup_transactor
xtsc_memory_pin xtsc_component::xtsc_pin2tlm_-
xtsc_component::xtsc_memory_pin, lookup_transactor, 765
634 xtsc_pin2tlm_lookup_transactor.h, 1350
xtsc_memory_pin.h, 1336 xtsc_pin2tlm_lookup_transactor_parms
xtsc_memory_pin_parms xtsc_component::xtsc_pin2tlm_-
xtsc_component::xtsc_memory_pin_- lookup_transactor_parms, 768
parms, 645, 646 xtsc_pin2tlm_memory_transactor
xtsc_component::xtsc_xttlm2tlm2_-
transactor_parms, 1280
xtsc_zero_extend_array_indices
xtsc, 68