OpenASIP  2.0
DefaultDecoderGenerator.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2011 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file DefaultDecoderGenerator.hh
26  *
27  * Declaration of DefaultDecoderGenerator class.
28  *
29  * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30  * @author Pekka Jääskeläinen 2011
31  * @author Vinogradov Viacheslav(added Verilog generating) 2012
32  */
33 
34 #ifndef TTA_DEFAULT_DECODER_GENERATOR_HH
35 #define TTA_DEFAULT_DECODER_GENERATOR_HH
36 
37 #include <string>
38 #include <vector>
39 #include <set>
40 #include <map>
41 
42 #include "ProGeTypes.hh"
43 #include "TCEString.hh"
44 #include "Exception.hh"
45 
46 namespace TTAMachine {
47  class Machine;
48  class Unit;
49  class Bus;
50  class FunctionUnit;
51  class PortGuard;
52  class Guard;
53  class RegisterGuard;
54  class Socket;
55  class RegisterFile;
56  class RFPort;
57  class BaseFUPort;
58  class HWOperation;
59  class InstructionTemplate;
60  class BaseRegisterFile;
61  class ImmediateUnit;
62  class ControlUnit;
63 }
64 
65 namespace ProGe {
66  class Netlist;
67  class NetlistGenerator;
68  class NetlistPort;
69  class NetlistBlock;
70 }
71 
72 class BinaryEncoding;
73 class GuardEncoding;
74 class GPRGuardEncoding;
75 class FUGuardEncoding;
76 class SourceField;
77 class SocketEncoding;
78 class PortCode;
80 class SlotField;
81 
82 
83 /**
84  * Generates the default instruction decoder in VHDL.
85  */
87 public:
90  const BinaryEncoding& bem,
91  const CentralizedControlICGenerator& icGenerator);
92  virtual ~DefaultDecoderGenerator();
93 
94  void setGenerateDebugger(bool generate);
95  void setGenerateNoLoopbackGlock(bool generate);
96  void setSyncReset(bool value);
97  void setGenerateBusEnable(bool value);
98 
99  void SetHDL(ProGe::HDL language);
100 
102  const ProGe::NetlistGenerator& nlGenerator,
103  ProGe::NetlistBlock& coreBlock);
105  const ProGe::NetlistGenerator& nlGenerator,
106  const std::string& dstDirectory);
107  std::set<int> requiredRFLatencies(
108  const TTAMachine::ImmediateUnit& iu) const;
109  void verifyCompatibility() const;
110  int glockRequestWidth() const;
111  int glockPortWidth() const;
112 
113  void setGenerateLockTrace(bool generate);
114  void setLockTraceStartingCycle(unsigned int startCycle);
115 
116  static const std::string RISCV_SIMM_PORT_IN_NAME;
117  static const std::string GLOCK_PORT_NAME;
118 
119 private:
120  /// Set type for buses.
121  typedef std::set<TTAMachine::Bus*> BusSet;
122  /// Types for mapping global lock and global lock request signals
123  typedef int GlockBitType;
124  typedef int GlockReqBitType;
125  typedef std::map<GlockBitType, const TTAMachine::Unit*>
127  typedef std::map<const TTAMachine::Unit*, GlockReqBitType>
129 
131  void addGlockPortToDecoder();
132 
133  void writeComment(std::ostream& stream, int indent,
134  std::string comment) const;
135  void writeSignalDeclaration(std::ostream& stream, ProGe::DataType type,
136  std::string sigName, int width) const;
137 
138  void writeInstructionDecoder(std::ostream& stream);
139  ///void writeDecompressSignalsVHDL(std::ostream& stream) const; TBR
140  void writeLockDumpCode(std::ostream& stream) const;
141  void writeMoveFieldSignals(std::ostream& stream) const;
142  void writeImmediateSlotSignals(std::ostream& stream) const;
143  void writeLongImmediateTagSignal(std::ostream& stream) const;
144  void writeSquashSignals(std::ostream& stream) const;
145  void writeSocketCntrlSignals(std::ostream& stream);
146  void writeFUCntrlSignals(std::ostream& stream);
148  std::ostream& stream);
149  void writeRFCntrlSignals(std::ostream& stream);
150  void writeGlockHandlingSignals(std::ostream& stream) const;
151  void writePipelineFillSignals(std::ostream& stream) const;
152  void writeFullNOPConstant(std::ostream& stream) const;
153  std::string writeNOPEncodingVHDL() const;
154  //void writeDecompressTableVHDL(std::ostream& stream) const; TBR
155  void writeDismemberingAndITDecompression(std::ostream& stream) const;
156  void writeInstructionDismembering(std::ostream& stream) const;
157  void writeSquashSignalGenerationProcesses(std::ostream& stream) const;
159  const TTAMachine::Bus& bus,
160  std::ostream& stream) const;
161  void writeLongImmediateWriteProcess(std::ostream& stream) const;
162  void writeControlRegisterMappings(std::ostream& stream) const;
163  void writeRFSRAMDecodingProcess(std::ostream& stream) const;
164  void writeMainDecodingProcess(std::ostream& stream) const;
165  void writeGlockMapping(std::ostream& stream) const;
166  void writePipelineFillProcess(std::ostream& stream) const;
167  void writeResettingOfControlRegisters(std::ostream& stream) const;
168  void writeInstructionDecoding(std::ostream& stream) const;
169  void writeRulesForSourceControlSignals(std::ostream& stream) const;
170  void writeRulesForDestinationControlSignals(std::ostream& stream) const;
171 // void writeCUOpcodeSettings(
172 // std::ostream& stream, const TTAMachine::ControlUnit& cu) const;
173  void writeSimmDataSignal(
174  const TTAMachine::Bus& bus, std::ostream& stream) const;
176  const TTAMachine::Socket& socket,
177  std::ostream& stream) const;
179  const TTAMachine::Bus& bus,
180  std::ostream& stream) const;
182  const TTAMachine::RFPort& port,
183  std::ostream& stream) const;
185  const TTAMachine::BaseFUPort& port,
186  std::ostream& stream) const;
188  const TTAMachine::BaseFUPort& port,
189  std::ostream& stream) const;
191  const TTAMachine::RFPort& port,
192  std::ostream& stream) const;
194  const ProGe::HDL language,
195  const TTAMachine::InstructionTemplate& iTemp,
196  int indLevel,
197  std::ostream& stream) const;
199  const std::set<TTAMachine::Socket*> outputSockets,
200  std::ostream& stream) const;
201 
202  static void writeSquashSignalSubstitution(
203  const ProGe::HDL language,
204  const TTAMachine::Bus& bus,
205  const GuardEncoding& enc,
206  const TTAMachine::Guard& guard,
207  std::ostream& stream,
208  int indLevel);
209  static bool containsSimilarGuard(
210  const std::set<TTAMachine::PortGuard*>& guardSet,
211  const TTAMachine::PortGuard& guard);
212  static bool containsSimilarGuard(
213  const std::set<TTAMachine::RegisterGuard*>& guardSet,
214  const TTAMachine::RegisterGuard& guard);
215  static bool needsBusControl(const TTAMachine::Socket& socket);
216  static bool needsDataControl(const TTAMachine::Socket& socket);
217 
219  const GPRGuardEncoding& encoding) const;
220  TTAMachine::PortGuard& findGuard(const FUGuardEncoding& encoding) const;
221 
222  static std::string simmDataPort(const std::string& busName);
223  static std::string simmControlPort(const std::string& busName);
224  static int simmPortWidth(const TTAMachine::Bus& bus);
225  static std::string simmDataSignalName(const std::string& busName);
226  static std::string simmCntrlSignalName(const std::string& busName);
227  static std::string fuLoadCntrlPort(
228  const std::string& fuName,
229  const std::string& portName);
230  static std::string fuLoadSignalName(
231  const std::string& fuName,
232  const std::string& portName);
233  static std::string fuOpcodeCntrlPort(const std::string& fu);
234  static std::string fuOpcodeSignalName(const std::string& fu);
235  static std::string rfLoadCntrlPort(
236  const std::string& rfName,
237  const std::string& portName);
238  static std::string rfLoadSignalName(
239  const std::string& rfName,
240  const std::string& portName,
241  bool async = false);
242  static std::string rfOpcodeSignalName(
243  const std::string& rfName,
244  const std::string& portName,
245  bool async = false);
246  static std::string rfOpcodeCntrlPort(
247  const std::string& rfName,
248  const std::string& portName);
249  static std::string iuReadOpcodeCntrlPort(
250  const std::string& unitName,
251  const std::string& portName);
252  static std::string iuReadOpcodeCntrlSignal(
253  const std::string& unitName,
254  const std::string& portName);
255  static std::string iuReadLoadCntrlPort(
256  const std::string& unitName,
257  const std::string& portName);
258  static std::string iuReadLoadCntrlSignal(
259  const std::string& unitName,
260  const std::string& portName);
261  static std::string iuWritePort(const std::string& iuName);
262  static std::string iuWriteSignal(const std::string& iuName);
263  static std::string iuWriteOpcodeCntrlPort(
264  const std::string& unitName);
265  static std::string iuWriteOpcodeCntrlSignal(
266  const std::string& unitName);
267  static std::string iuWriteLoadCntrlPort(
268  const std::string& unitName);
269  static std::string iuWriteLoadCntrlSignal(
270  const std::string& unitName);
271  static std::string busMuxCntrlSignal(const TTAMachine::Bus& bus);
272  static std::string busMuxCntrlRegister(const TTAMachine::Bus& bus);
273  static std::string busMuxEnableSignal(const TTAMachine::Bus& bus);
274  static std::string busMuxEnableRegister(const TTAMachine::Bus& bus);
275 
276  static std::string socketBusControlPort(const std::string& name);
277  static std::string socketDataControlPort(const std::string& name);
278  static std::string moveFieldSignal(const std::string& busName);
279  static std::string guardPortName(const TTAMachine::Guard& guard);
280  static std::string srcFieldSignal(const std::string& busName);
281  static std::string dstFieldSignal(const std::string& busName);
282  static std::string guardFieldSignal(const std::string& busName);
283  static std::string immSlotSignal(const std::string& immSlot);
284  static std::string squashSignal(const std::string& busName);
285  static std::string socketBusCntrlSignalName(const std::string& name);
286  static std::string socketDataCntrlSignalName(const std::string& name);
287  static std::string gcuDataPort(const std::string& nameInADF);
288 
289  int opcodeWidth(const TTAMachine::FunctionUnit& fu) const;
290  static int busControlWidth(const TTAMachine::Socket& socket);
291  static int dataControlWidth(const TTAMachine::Socket& socket);
292  static int rfOpcodeWidth(const TTAMachine::BaseRegisterFile& rf);
293 
294  static BusSet connectedBuses(const TTAMachine::Socket& socket);
295  static std::string socketEncodingCondition(
296  const ProGe::HDL language,
297  const SlotField& srcField,
298  const std::string& socketName);
299  static std::string portCodeCondition(
300  const ProGe::HDL language,
301  const SocketEncoding& socketEnc,
302  const PortCode& code);
303  std::string instructionTemplateCondition(
304  const ProGe::HDL language,
305  const std::string& iTempName) const;
306  static std::string rfOpcodeFromSrcOrDstField(
307  const ProGe::HDL language,
308  const SocketEncoding& socketEnc,
309  const PortCode& code);
310 
311  std::string busCntrlSignalPinOfSocket(
312  const TTAMachine::Socket& socket,
313  const TTAMachine::Bus& bus) const;
314  int opcode(const TTAMachine::HWOperation& operation) const;
315  static std::string indentation(unsigned int level);
316  bool sacEnabled(const std::string& rfName) const;
317 
318  /// The machine.
320  /// The binary encoding map.
322  /// The IC generator.
324  /// The netlist generator.
326  /// The instruction decoder block in the netlist.
328  /// Tells whether to generate global lock tracing code.
332  /// Generate debugger signals?
334  /// Reset synchronously (otherwise asynchronous)
336  /// Bus enable signals for bustrace
338  /// The starting cycle for bus tracing.
340  /// The flag to generate global lock request handling in decoder.
341  /// False means delegating the lock request towards instruction fetch.
343  /// Maps connected glock port bits to associated TTA Units
345  /// Maps TTA Units to associated glock request port bits.
347 
348  /// Bookkeeping for reset-needing signals
349  std::vector<std::string> registerVectors;
350  std::vector<std::string> registerBits;
351 };
352 
353 #endif
354 
DefaultDecoderGenerator::requiredRFLatencies
std::set< int > requiredRFLatencies(const TTAMachine::ImmediateUnit &iu) const
Definition: DefaultDecoderGenerator.cc:692
TTAMachine::Guard
Definition: Guard.hh:55
DefaultDecoderGenerator::socketDataCntrlSignalName
static std::string socketDataCntrlSignalName(const std::string &name)
Definition: DefaultDecoderGenerator.cc:4617
DefaultDecoderGenerator::setGenerateLockTrace
void setGenerateLockTrace(bool generate)
Definition: DefaultDecoderGenerator.cc:759
DefaultDecoderGenerator::opcode
int opcode(const TTAMachine::HWOperation &operation) const
Definition: DefaultDecoderGenerator.cc:4906
DefaultDecoderGenerator::machine_
const TTAMachine::Machine & machine_
The machine.
Definition: DefaultDecoderGenerator.hh:319
DefaultDecoderGenerator::writeSquashSignalGenerationProcesses
void writeSquashSignalGenerationProcesses(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1548
DefaultDecoderGenerator::setLockTraceStartingCycle
void setLockTraceStartingCycle(unsigned int startCycle)
Definition: DefaultDecoderGenerator.cc:769
DefaultDecoderGenerator::writeRFCntrlSignals
void writeRFCntrlSignals(std::ostream &stream)
Definition: DefaultDecoderGenerator.cc:1307
DefaultDecoderGenerator::simmPortWidth
static int simmPortWidth(const TTAMachine::Bus &bus)
Definition: DefaultDecoderGenerator.cc:4142
DefaultDecoderGenerator::busCntrlSignalPinOfSocket
std::string busCntrlSignalPinOfSocket(const TTAMachine::Socket &socket, const TTAMachine::Bus &bus) const
Definition: DefaultDecoderGenerator.cc:4885
DefaultDecoderGenerator::socketDataControlPort
static std::string socketDataControlPort(const std::string &name)
Definition: DefaultDecoderGenerator.cc:4530
DefaultDecoderGenerator::icGenerator_
const CentralizedControlICGenerator & icGenerator_
The IC generator.
Definition: DefaultDecoderGenerator.hh:323
BinaryEncoding
Definition: BinaryEncoding.hh:61
DefaultDecoderGenerator::entityNameStr_
TCEString entityNameStr_
Definition: DefaultDecoderGenerator.hh:330
DefaultDecoderGenerator::rfLoadCntrlPort
static std::string rfLoadCntrlPort(const std::string &rfName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4243
DefaultDecoderGenerator::iuWriteOpcodeCntrlPort
static std::string iuWriteOpcodeCntrlPort(const std::string &unitName)
Definition: DefaultDecoderGenerator.cc:4413
DefaultDecoderGenerator::completeDecoderBlock
void completeDecoderBlock(const ProGe::NetlistGenerator &nlGenerator, ProGe::NetlistBlock &coreBlock)
Definition: DefaultDecoderGenerator.cc:223
ProGe::NetlistBlock
Definition: NetlistBlock.hh:61
DefaultDecoderGenerator::writeLongImmediateWriteProcess
void writeLongImmediateWriteProcess(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1801
DefaultDecoderGenerator::writeSocketCntrlSignals
void writeSocketCntrlSignals(std::ostream &stream)
Definition: DefaultDecoderGenerator.cc:1202
PortCode
Definition: PortCode.hh:45
DefaultDecoderGenerator::dstFieldSignal
static std::string dstFieldSignal(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4555
DefaultDecoderGenerator::writeImmediateSlotSignals
void writeImmediateSlotSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1135
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
DefaultDecoderGenerator::decoderBlock_
ProGe::NetlistBlock * decoderBlock_
The instruction decoder block in the netlist.
Definition: DefaultDecoderGenerator.hh:327
DefaultDecoderGenerator::srcFieldSignal
static std::string srcFieldSignal(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4542
TTAMachine::HWOperation
Definition: HWOperation.hh:52
DefaultDecoderGenerator::generateInstructionDecoder
void generateInstructionDecoder(const ProGe::NetlistGenerator &nlGenerator, const std::string &dstDirectory)
Definition: DefaultDecoderGenerator.cc:666
Exception.hh
DefaultDecoderGenerator::BusSet
std::set< TTAMachine::Bus * > BusSet
Set type for buses.
Definition: DefaultDecoderGenerator.hh:121
DefaultDecoderGenerator::unitGlockReqBitMap_
UnitGlockReqBitMapType unitGlockReqBitMap_
Maps TTA Units to associated glock request port bits.
Definition: DefaultDecoderGenerator.hh:346
DefaultDecoderGenerator::connectedBuses
static BusSet connectedBuses(const TTAMachine::Socket &socket)
Definition: DefaultDecoderGenerator.cc:4708
DefaultDecoderGenerator::busMuxEnableSignal
static std::string busMuxEnableSignal(const TTAMachine::Bus &bus)
Definition: DefaultDecoderGenerator.cc:4468
DefaultDecoderGenerator::addLockReqPortToDecoder
void addLockReqPortToDecoder()
Definition: DefaultDecoderGenerator.cc:468
DefaultDecoderGenerator::writeMoveFieldSignals
void writeMoveFieldSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1096
DefaultDecoderGenerator::UnitGlockBitMapType
std::map< GlockBitType, const TTAMachine::Unit * > UnitGlockBitMapType
Definition: DefaultDecoderGenerator.hh:126
TTAMachine::Bus
Definition: Bus.hh:53
TTAMachine::BaseFUPort
Definition: BaseFUPort.hh:44
DefaultDecoderGenerator::iuWriteLoadCntrlSignal
static std::string iuWriteLoadCntrlSignal(const std::string &unitName)
Definition: DefaultDecoderGenerator.cc:4453
DefaultDecoderGenerator::writeDismemberingAndITDecompression
void writeDismemberingAndITDecompression(std::ostream &stream) const
DefaultDecoderGenerator::iuWritePort
static std::string iuWritePort(const std::string &iuName)
Definition: DefaultDecoderGenerator.cc:4388
DefaultDecoderGenerator::gcuDataPort
static std::string gcuDataPort(const std::string &nameInADF)
Definition: DefaultDecoderGenerator.cc:4628
DefaultDecoderGenerator::lockTraceStartingCycle_
unsigned int lockTraceStartingCycle_
The starting cycle for bus tracing.
Definition: DefaultDecoderGenerator.hh:339
DefaultDecoderGenerator::writeInstructionTemplateProcedures
void writeInstructionTemplateProcedures(const ProGe::HDL language, const TTAMachine::InstructionTemplate &iTemp, int indLevel, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1955
DefaultDecoderGenerator::verifyCompatibility
void verifyCompatibility() const
Definition: DefaultDecoderGenerator.cc:704
FUGuardEncoding
Definition: FUGuardEncoding.hh:47
DefaultDecoderGenerator::addGlockPortToDecoder
void addGlockPortToDecoder()
Definition: DefaultDecoderGenerator.cc:508
DefaultDecoderGenerator::writeInstructionDecoder
void writeInstructionDecoder(std::ostream &stream)
Definition: DefaultDecoderGenerator.cc:807
DefaultDecoderGenerator::busMuxEnableRegister
static std::string busMuxEnableRegister(const TTAMachine::Bus &bus)
Definition: DefaultDecoderGenerator.cc:4473
DefaultDecoderGenerator::writeControlRulesOfFUOutputPort
void writeControlRulesOfFUOutputPort(const TTAMachine::BaseFUPort &port, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2876
TTAMachine::RFPort
Definition: RFPort.hh:45
DefaultDecoderGenerator::writeControlRulesOfFUInputPort
void writeControlRulesOfFUInputPort(const TTAMachine::BaseFUPort &port, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:3138
DefaultDecoderGenerator::indentation
static std::string indentation(unsigned int level)
Definition: DefaultDecoderGenerator.cc:4937
DefaultDecoderGenerator::iuWriteLoadCntrlPort
static std::string iuWriteLoadCntrlPort(const std::string &unitName)
Definition: DefaultDecoderGenerator.cc:4440
TCEString.hh
TTAMachine::InstructionTemplate
Definition: InstructionTemplate.hh:49
CentralizedControlICGenerator
Definition: CentralizedControlICGenerator.hh:52
DefaultDecoderGenerator::fuOpcodeCntrlPort
static std::string fuOpcodeCntrlPort(const std::string &fu)
Definition: DefaultDecoderGenerator.cc:4218
DefaultDecoderGenerator::socketBusControlPort
static std::string socketBusControlPort(const std::string &name)
Definition: DefaultDecoderGenerator.cc:4518
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
DefaultDecoderGenerator::writeSimmDataSignal
void writeSimmDataSignal(const TTAMachine::Bus &bus, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2780
DefaultDecoderGenerator::registerBits
std::vector< std::string > registerBits
Definition: DefaultDecoderGenerator.hh:350
DefaultDecoderGenerator::instructionTemplateCondition
std::string instructionTemplateCondition(const ProGe::HDL language, const std::string &iTempName) const
Definition: DefaultDecoderGenerator.cc:4822
DefaultDecoderGenerator::generateDebugger_
bool generateDebugger_
Generate debugger signals?
Definition: DefaultDecoderGenerator.hh:333
TTAMachine::BaseRegisterFile
Definition: BaseRegisterFile.hh:48
DefaultDecoderGenerator::writeBusControlRulesOfOutputSocket
void writeBusControlRulesOfOutputSocket(const TTAMachine::Socket &socket, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2731
GuardEncoding
Definition: GuardEncoding.hh:45
DefaultDecoderGenerator::rfOpcodeFromSrcOrDstField
static std::string rfOpcodeFromSrcOrDstField(const ProGe::HDL language, const SocketEncoding &socketEnc, const PortCode &code)
Definition: DefaultDecoderGenerator.cc:4847
DefaultDecoderGenerator::guardFieldSignal
static std::string guardFieldSignal(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4567
DefaultDecoderGenerator::unitGlockBitMap_
UnitGlockBitMapType unitGlockBitMap_
Maps connected glock port bits to associated TTA Units.
Definition: DefaultDecoderGenerator.hh:344
TTAMachine::RegisterGuard
Definition: Guard.hh:137
DefaultDecoderGenerator::findGuard
TTAMachine::RegisterGuard & findGuard(const GPRGuardEncoding &encoding) const
Definition: DefaultDecoderGenerator.cc:4056
DefaultDecoderGenerator::writeSquashSignalSubstitution
static void writeSquashSignalSubstitution(const ProGe::HDL language, const TTAMachine::Bus &bus, const GuardEncoding &enc, const TTAMachine::Guard &guard, std::ostream &stream, int indLevel)
Definition: DefaultDecoderGenerator.cc:3935
DefaultDecoderGenerator::simmControlPort
static std::string simmControlPort(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4130
DefaultDecoderGenerator::iuReadOpcodeCntrlSignal
static std::string iuReadOpcodeCntrlSignal(const std::string &unitName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4339
DefaultDecoderGenerator::writeNOPEncodingVHDL
std::string writeNOPEncodingVHDL() const
DefaultDecoderGenerator::busMuxCntrlSignal
static std::string busMuxCntrlSignal(const TTAMachine::Bus &bus)
Definition: DefaultDecoderGenerator.cc:4458
DefaultDecoderGenerator::rfOpcodeCntrlPort
static std::string rfOpcodeCntrlPort(const std::string &rfName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4305
DefaultDecoderGenerator::writeControlRulesOfRFWritePort
void writeControlRulesOfRFWritePort(const TTAMachine::RFPort &port, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:3417
DefaultDecoderGenerator::fuLoadCntrlPort
static std::string fuLoadCntrlPort(const std::string &fuName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4186
TTAMachine::Socket
Definition: Socket.hh:53
DefaultDecoderGenerator::GlockReqBitType
int GlockReqBitType
Definition: DefaultDecoderGenerator.hh:124
DefaultDecoderGenerator::writeInstructionDismembering
void writeInstructionDismembering(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1414
DefaultDecoderGenerator::guardPortName
static std::string guardPortName(const TTAMachine::Guard &guard)
Definition: DefaultDecoderGenerator.cc:4492
DefaultDecoderGenerator::writeRulesForSourceControlSignals
void writeRulesForSourceControlSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2599
DefaultDecoderGenerator::GLOCK_PORT_NAME
static const std::string GLOCK_PORT_NAME
Definition: DefaultDecoderGenerator.hh:117
DefaultDecoderGenerator::iuReadLoadCntrlPort
static std::string iuReadLoadCntrlPort(const std::string &unitName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4356
DefaultDecoderGenerator::~DefaultDecoderGenerator
virtual ~DefaultDecoderGenerator()
Definition: DefaultDecoderGenerator.cc:211
DefaultDecoderGenerator::writePipelineFillProcess
void writePipelineFillProcess(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2518
DefaultDecoderGenerator::needsDataControl
static bool needsDataControl(const TTAMachine::Socket &socket)
Definition: DefaultDecoderGenerator.cc:4039
DefaultDecoderGenerator::writeBusMuxControlLogic
void writeBusMuxControlLogic(const TTAMachine::Bus &bus, const std::set< TTAMachine::Socket * > outputSockets, std::ostream &stream) const
DefaultDecoderGenerator::iuWriteOpcodeCntrlSignal
static std::string iuWriteOpcodeCntrlSignal(const std::string &unitName)
Definition: DefaultDecoderGenerator.cc:4426
DefaultDecoderGenerator::iuReadOpcodeCntrlPort
static std::string iuReadOpcodeCntrlPort(const std::string &unitName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4322
DefaultDecoderGenerator::socketEncodingCondition
static std::string socketEncodingCondition(const ProGe::HDL language, const SlotField &srcField, const std::string &socketName)
Definition: DefaultDecoderGenerator.cc:4727
DefaultDecoderGenerator::writeBusControlRulesOfSImmSocketOfBus
void writeBusControlRulesOfSImmSocketOfBus(const TTAMachine::Bus &bus, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2806
ProGeTypes.hh
DefaultDecoderGenerator::busControlWidth
static int busControlWidth(const TTAMachine::Socket &socket)
Definition: DefaultDecoderGenerator.cc:4663
DefaultDecoderGenerator::fuLoadSignalName
static std::string fuLoadSignalName(const std::string &fuName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4203
DefaultDecoderGenerator::glockRequestWidth
int glockRequestWidth() const
Definition: DefaultDecoderGenerator.cc:585
DefaultDecoderGenerator::writeSquashSignals
void writeSquashSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1169
DefaultDecoderGenerator::nlGenerator_
const ProGe::NetlistGenerator * nlGenerator_
The netlist generator.
Definition: DefaultDecoderGenerator.hh:325
DefaultDecoderGenerator::writeFUCntrlSignals
void writeFUCntrlSignals(std::ostream &stream)
Definition: DefaultDecoderGenerator.cc:1256
DefaultDecoderGenerator::simmCntrlSignalName
static std::string simmCntrlSignalName(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4173
DefaultDecoderGenerator::writeFullNOPConstant
void writeFullNOPConstant(std::ostream &stream) const
DefaultDecoderGenerator::rfOpcodeWidth
static int rfOpcodeWidth(const TTAMachine::BaseRegisterFile &rf)
Definition: DefaultDecoderGenerator.cc:4696
DefaultDecoderGenerator::moveFieldSignal
static std::string moveFieldSignal(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4481
DefaultDecoderGenerator::writeMainDecodingProcess
void writeMainDecodingProcess(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2323
DefaultDecoderGenerator::rfOpcodeSignalName
static std::string rfOpcodeSignalName(const std::string &rfName, const std::string &portName, bool async=false)
Definition: DefaultDecoderGenerator.cc:4285
DefaultDecoderGenerator::SetHDL
void SetHDL(ProGe::HDL language)
Definition: DefaultDecoderGenerator.cc:177
DefaultDecoderGenerator::bem_
const BinaryEncoding & bem_
The binary encoding map.
Definition: DefaultDecoderGenerator.hh:321
DefaultDecoderGenerator::writeRulesForDestinationControlSignals
void writeRulesForDestinationControlSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2689
DefaultDecoderGenerator::writeSquashSignalGenerationProcess
void writeSquashSignalGenerationProcess(const TTAMachine::Bus &bus, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1566
DefaultDecoderGenerator::writeControlRegisterMappings
void writeControlRegisterMappings(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:3547
DefaultDecoderGenerator::writeComment
void writeComment(std::ostream &stream, int indent, std::string comment) const
Definition: DefaultDecoderGenerator.cc:795
ProGe::NetlistGenerator
Definition: NetlistGenerator.hh:84
DefaultDecoderGenerator::writeInstructionDecoding
void writeInstructionDecoding(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2583
ProGe
Definition: FUGen.hh:54
DefaultDecoderGenerator::setSyncReset
void setSyncReset(bool value)
Definition: DefaultDecoderGenerator.cc:187
DefaultDecoderGenerator::writeLongImmediateTagSignal
void writeLongImmediateTagSignal(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1152
SlotField
Definition: SlotField.hh:58
ProGe::DataType
DataType
Data types of hardware ports.
Definition: ProGeTypes.hh:46
DefaultDecoderGenerator::setGenerateBusEnable
void setGenerateBusEnable(bool value)
Definition: DefaultDecoderGenerator.cc:192
DefaultDecoderGenerator::RISCV_SIMM_PORT_IN_NAME
static const std::string RISCV_SIMM_PORT_IN_NAME
Definition: DefaultDecoderGenerator.hh:116
TCEString
Definition: TCEString.hh:53
DefaultDecoderGenerator::dataControlWidth
static int dataControlWidth(const TTAMachine::Socket &socket)
Definition: DefaultDecoderGenerator.cc:4680
DefaultDecoderGenerator::rfLoadSignalName
static std::string rfLoadSignalName(const std::string &rfName, const std::string &portName, bool async=false)
Definition: DefaultDecoderGenerator.cc:4261
DefaultDecoderGenerator::squashSignal
static std::string squashSignal(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4591
DefaultDecoderGenerator::fuOpcodeSignalName
static std::string fuOpcodeSignalName(const std::string &fu)
Definition: DefaultDecoderGenerator.cc:4230
DefaultDecoderGenerator::iuReadLoadCntrlSignal
static std::string iuReadLoadCntrlSignal(const std::string &unitName, const std::string &portName)
Definition: DefaultDecoderGenerator.cc:4373
DefaultDecoderGenerator::writeRFSRAMDecodingProcess
void writeRFSRAMDecodingProcess(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2139
DefaultDecoderGenerator::GlockBitType
int GlockBitType
Types for mapping global lock and global lock request signals.
Definition: DefaultDecoderGenerator.hh:123
DefaultDecoderGenerator::writePipelineFillSignals
void writePipelineFillSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1403
DefaultDecoderGenerator::busMuxCntrlRegister
static std::string busMuxCntrlRegister(const TTAMachine::Bus &bus)
Definition: DefaultDecoderGenerator.cc:4463
DefaultDecoderGenerator::socketBusCntrlSignalName
static std::string socketBusCntrlSignalName(const std::string &name)
Definition: DefaultDecoderGenerator.cc:4604
DefaultDecoderGenerator::immSlotSignal
static std::string immSlotSignal(const std::string &immSlot)
Definition: DefaultDecoderGenerator.cc:4579
DefaultDecoderGenerator
Definition: DefaultDecoderGenerator.hh:86
DefaultDecoderGenerator::writeResettingOfControlRegisters
void writeResettingOfControlRegisters(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2558
ProGe::HDL
HDL
HDLs supported by ProGe.
Definition: ProGeTypes.hh:40
DefaultDecoderGenerator::setGenerateDebugger
void setGenerateDebugger(bool generate)
Definition: DefaultDecoderGenerator.cc:182
DefaultDecoderGenerator::UnitGlockReqBitMapType
std::map< const TTAMachine::Unit *, GlockReqBitType > UnitGlockReqBitMapType
Definition: DefaultDecoderGenerator.hh:128
DefaultDecoderGenerator::needsBusControl
static bool needsBusControl(const TTAMachine::Socket &socket)
Definition: DefaultDecoderGenerator.cc:4020
DefaultDecoderGenerator::language_
ProGe::HDL language_
Definition: DefaultDecoderGenerator.hh:331
DefaultDecoderGenerator::sacEnabled
bool sacEnabled(const std::string &rfName) const
Definition: DefaultDecoderGenerator.cc:4953
TTAMachine::PortGuard
Definition: Guard.hh:99
DefaultDecoderGenerator::opcodeWidth
int opcodeWidth(const TTAMachine::FunctionUnit &fu) const
Definition: DefaultDecoderGenerator.cc:4640
DefaultDecoderGenerator::writeSignalDeclaration
void writeSignalDeclaration(std::ostream &stream, ProGe::DataType type, std::string sigName, int width) const
Definition: DefaultDecoderGenerator.cc:774
DefaultDecoderGenerator::writeGlockHandlingSignals
void writeGlockHandlingSignals(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:1386
TTAMachine
Definition: Assembler.hh:48
DefaultDecoderGenerator::DefaultDecoderGenerator
DefaultDecoderGenerator(const TTAMachine::Machine &machine, const BinaryEncoding &bem, const CentralizedControlICGenerator &icGenerator)
Definition: DefaultDecoderGenerator.cc:155
DefaultDecoderGenerator::portCodeCondition
static std::string portCodeCondition(const ProGe::HDL language, const SocketEncoding &socketEnc, const PortCode &code)
Definition: DefaultDecoderGenerator.cc:4772
SocketEncoding
Definition: SocketEncoding.hh:51
GPRGuardEncoding
Definition: GPRGuardEncoding.hh:47
DefaultDecoderGenerator::registerVectors
std::vector< std::string > registerVectors
Bookkeeping for reset-needing signals.
Definition: DefaultDecoderGenerator.hh:349
DefaultDecoderGenerator::writeLockDumpCode
void writeLockDumpCode(std::ostream &stream) const
void writeDecompressSignalsVHDL(std::ostream& stream) const; TBR
Definition: DefaultDecoderGenerator.cc:963
DefaultDecoderGenerator::simmDataSignalName
static std::string simmDataSignalName(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4161
DefaultDecoderGenerator::containsSimilarGuard
static bool containsSimilarGuard(const std::set< TTAMachine::PortGuard * > &guardSet, const TTAMachine::PortGuard &guard)
Definition: DefaultDecoderGenerator.cc:3970
DefaultDecoderGenerator::writeGlockMapping
void writeGlockMapping(std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2404
DefaultDecoderGenerator::generateLockTrace_
bool generateLockTrace_
Tells whether to generate global lock tracing code.
Definition: DefaultDecoderGenerator.hh:329
DefaultDecoderGenerator::generateBusEnable_
bool generateBusEnable_
Bus enable signals for bustrace.
Definition: DefaultDecoderGenerator.hh:337
DefaultDecoderGenerator::simmDataPort
static std::string simmDataPort(const std::string &busName)
Definition: DefaultDecoderGenerator.cc:4117
DefaultDecoderGenerator::generateAlternateGlockReqHandling_
bool generateAlternateGlockReqHandling_
The flag to generate global lock request handling in decoder. False means delegating the lock request...
Definition: DefaultDecoderGenerator.hh:342
DefaultDecoderGenerator::iuWriteSignal
static std::string iuWriteSignal(const std::string &iuName)
Definition: DefaultDecoderGenerator.cc:4400
DefaultDecoderGenerator::glockPortWidth
int glockPortWidth() const
Definition: DefaultDecoderGenerator.cc:613
TTAMachine::Machine
Definition: Machine.hh:73
DefaultDecoderGenerator::writeControlRulesOfRFReadPort
void writeControlRulesOfRFReadPort(const TTAMachine::RFPort &port, std::ostream &stream) const
Definition: DefaultDecoderGenerator.cc:2947
DefaultDecoderGenerator::setGenerateNoLoopbackGlock
void setGenerateNoLoopbackGlock(bool generate)
Definition: DefaultDecoderGenerator.cc:204
DefaultDecoderGenerator::syncReset_
bool syncReset_
Reset synchronously (otherwise asynchronous)
Definition: DefaultDecoderGenerator.hh:335
SourceField
Definition: SourceField.hh:48
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50