Simulator
BansheeSimulator
Bases: Simulator
Banshee simulator
A simulator, identified by the name banshee
, tailored to the
creation of Banshee simulations.
Source code in util/sim/Simulator.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
__init__(cfg)
Constructor for the BansheeSimulator class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cfg |
A Banshee config file. |
required |
Source code in util/sim/Simulator.py
158 159 160 161 162 163 164 165 |
|
supports(test)
See base class.
The Banshee simulator does not support tests carrying a custom command.
Source code in util/sim/Simulator.py
167 168 169 170 171 172 173 174 175 176 177 |
|
QuestaSimulator
Bases: RTLSimulator
QuestaSim simulator
An RTL simulator, identified by the name
vsim
, tailored to the creation of
QuestaSim simulations.
Source code in util/sim/Simulator.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
__init__(binary)
Constructor for the QuestaSimulator class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
binary |
The QuestaSim simulation binary. |
required |
Source code in util/sim/Simulator.py
125 126 127 128 129 130 131 |
|
RTLSimulator
Bases: Simulator
Base class for RTL simulators.
An RTL simulator requires a simulation binary built from an RTL design to launch a simulation.
A test may need to be run with a custom command, itself invoking
the simulation binary behind the scenes, e.g. for verification
purposes. Such a test carries the custom command (a list of args)
under the cmd
key.
Source code in util/sim/Simulator.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
__init__(binary, **kwargs)
Constructor for the RTLSimulator class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
binary |
The simulation binary. |
required | |
kwargs |
Arguments passed to the base class constructor. |
{}
|
Source code in util/sim/Simulator.py
78 79 80 81 82 83 84 85 86 |
|
Simulator
Bases: object
An object capable of constructing Simulation objects.
A simulator constructs a Simulation object from a test object, as defined e.g. in a test suite specification file.
At minimum, a test is defined by a binary (elf
) which is to be
simulated and a set of simulators it can be run on. A test could be
defined by a class of its own, but at the moment we assume a test
to be represented by a dictionary with the elf
and simulators
keys at minimum.
Source code in util/sim/Simulator.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
__init__(name, simulation_cls)
Constructor for the Simulator class.
A simulator must be identifiable by a unique identifier string and construct at least one type of Simulation object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
The unique identifier of the simulator. |
required | |
simulation_cls |
One type of Simulation object the simulator can construct. |
required |
Source code in util/sim/Simulator.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
get_simulation(test, simulation_cls=None, **kwargs)
Construct a Simulation object from the specified test.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test |
The test for which a Simulation object must be constructed. |
required | |
simulation_cls |
Create a simulation instance of this
Simulation subclass. Use |
None
|
Source code in util/sim/Simulator.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
supports(test)
Check whether a certain test is supported by the simulator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test |
The test to check. |
required |
Source code in util/sim/Simulator.py
40 41 42 43 44 45 46 |
|
VCSSimulator
Bases: RTLSimulator
VCS simulator
An RTL simulator, identified by the name
vcs
, tailored to the creation of
VCS simulations.
Source code in util/sim/Simulator.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
__init__(binary)
Constructor for the VCSSimulator class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
binary |
The VCS simulation binary. |
required |
Source code in util/sim/Simulator.py
108 109 110 111 112 113 114 |
|
VerilatorSimulator
Bases: RTLSimulator
Verilator simulator
An RTL simulator, identified by the name
verilator
, tailored to the creation of
Verilator simulations.
Source code in util/sim/Simulator.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
__init__(binary)
Constructor for the VerilatorSimulator class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
binary |
The Verilator simulation binary. |
required |
Source code in util/sim/Simulator.py
142 143 144 145 146 147 148 |
|