gem5  v20.1.0.0
simple_target_socket.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 #ifndef __SYSTEMC_EXT_TLM_UTILS_SIMPLE_TARGET_SOCKET_H__
21 #define __SYSTEMC_EXT_TLM_UTILS_SIMPLE_TARGET_SOCKET_H__
22 
23 #include "../core/sc_event.hh"
24 #include "../core/sc_module.hh"
25 #include "../core/sc_port.hh"
26 #include "../core/sc_spawn.hh"
27 #include "../tlm_core/2/generic_payload/gp.hh"
28 #include "../tlm_core/2/interfaces/fw_bw_ifs.hh"
29 #include "../tlm_core/2/sockets/initiator_socket.hh"
30 #include "../tlm_core/2/sockets/target_socket.hh"
31 #include "../utils/sc_report_handler.hh"
33 #include "peq_with_get.h"
34 
35 namespace tlm_utils
36 {
37 
38 template <typename MODULE, unsigned int BUSWIDTH, typename TYPES,
40 class simple_target_socket_b :
41  public tlm::tlm_target_socket<BUSWIDTH, TYPES, 1, POL>,
42  protected simple_socket_base
43 {
44  friend class fw_process;
45  friend class bw_process;
46  public:
47  typedef typename TYPES::tlm_payload_type transaction_type;
48  typedef typename TYPES::tlm_phase_type phase_type;
53 
54  public:
55  static const char *
56  default_name()
57  {
58  return sc_core::sc_gen_unique_name("simple_target_socket");
59  }
60 
61  explicit simple_target_socket_b(const char *n=default_name()) :
62  base_type(n), m_fw_process(this), m_bw_process(this)
63  {
65  }
66 
67  using base_type::bind;
68 
69  // bw transport must come through us.
71 
72  // REGISTER_XXX
73  void
75  sync_enum_type (MODULE::*cb)(
77  {
78  elaboration_check("register_nb_transport_fw");
80  }
81 
82  void
84  void (MODULE::*cb)(transaction_type &, sc_core::sc_time &))
85  {
86  elaboration_check("register_b_transport");
88  }
89 
90  void
92  unsigned int (MODULE::*cb)(transaction_type &))
93  {
94  elaboration_check("register_transport_dbg");
96  }
97 
98  void
100  bool (MODULE::*cb)(transaction_type &, tlm::tlm_dmi &))
101  {
102  elaboration_check("register_get_direct_mem_ptr");
104  }
105 
106  protected:
107  void
109  {
110  base_type::start_of_simulation();
112  }
113 
114  private:
115  // Make call on bw path.
119  {
120  return base_type::operator -> ()->nb_transport_bw(trans, phase, t);
121  }
122 
123  void
125  {
127  }
128 
129  // Helper class to handle bw path calls Needed to detect transaction end
130  // when called from b_transport.
131  class bw_process : public tlm::tlm_bw_transport_if<TYPES>
132  {
133  public:
134  bw_process(simple_target_socket_b *p_own) : m_owner(p_own) {}
135 
139  {
140  typename std::map<transaction_type *,
141  sc_core::sc_event *>::iterator it =
142  m_owner->m_pending_trans.find(&trans);
143 
144  if (it == m_owner->m_pending_trans.end()) {
145  // Not a blocking call, forward.
146  return m_owner->bw_nb_transport(trans, phase, t);
147 
148  }
149 
150  if (phase == tlm::END_REQ) {
152  return tlm::TLM_ACCEPTED;
153  }
154  if (phase == tlm::BEGIN_RESP) {
155  if (m_owner->m_current_transaction == &trans) {
157  }
158  it->second->notify(t);
159  m_owner->m_pending_trans.erase(it);
160  return tlm::TLM_COMPLETED;
161  }
162  m_owner->display_error("invalid phase received");
163  return tlm::TLM_COMPLETED;
164  }
165 
166  void
168  {
170  }
171 
172  private:
174  };
175 
176  class fw_process : public tlm::tlm_fw_transport_if<TYPES>,
177  public tlm::tlm_mm_interface
178  {
179  public:
180  typedef sync_enum_type (MODULE::*NBTransportPtr)(
182  typedef void (MODULE::*BTransportPtr)(
184  typedef unsigned int (MODULE::*TransportDbgPtr)(transaction_type &);
185  typedef bool (MODULE::*GetDirectMemPtr)(
187 
189  m_owner(p_own), m_mod(0), m_nb_transport_ptr(0),
194  {}
195 
196  void
198  {
199  // Only spawn b2nb_thread, if needed.
203  opts.dont_initialize();
205  sc_core::sc_gen_unique_name("b2nb_thread"), &opts);
206  }
207  }
208 
209  void
211  {
212  if (m_nb_transport_ptr) {
214  "non-blocking callback already registered");
215  return;
216  }
217  sc_assert(!m_mod || m_mod == mod);
220  }
221 
222  void
224  {
225  if (m_b_transport_ptr) {
227  "blocking callback already registered");
228  return;
229  }
230  sc_assert(!m_mod || m_mod == mod);
233  }
234 
235  void
237  {
238  if (m_transport_dbg_ptr) {
239  m_owner->display_warning("debug callback already registered");
240  return;
241  }
242  sc_assert(!m_mod || m_mod == mod);
243  m_mod = mod;
245  }
246 
247  void
249  {
250  if (m_get_direct_mem_ptr) {
252  "get DMI pointer callback already registered");
253  return;
254  }
255  sc_assert(!m_mod || m_mod == mod);
256  m_mod = mod;
258  }
259 
260  // Interface implementation.
264  {
265  if (m_nb_transport_ptr) {
266  // Forward call.
267  sc_assert(m_mod);
268  return (m_mod->*m_nb_transport_ptr)(trans, phase, t);
269  }
270 
271  // nb->b conversion
272  if (m_b_transport_ptr) {
273  if (phase == tlm::BEGIN_REQ) {
274  // Prepare thread to do blocking call.
277 
278  if (!ph) { // Create new dynamic process.
279  ph = new process_handle_class(&trans);
281 
283  opts.dont_initialize();
284  opts.set_sensitivity(&ph->m_e);
285 
287  sc_bind(&fw_process::nb2b_thread, this, ph),
288  sc_core::sc_gen_unique_name("nb2b_thread"),
289  &opts);
290  }
291 
292  ph->m_e.notify(t);
293  return tlm::TLM_ACCEPTED;
294  }
295  if (phase == tlm::END_RESP) {
298  return tlm::TLM_COMPLETED;
299  }
300  m_owner->display_error("invalid phase received");
301  return tlm::TLM_COMPLETED;
302  }
304  "no non-blocking transport callback registered");
305  return tlm::TLM_COMPLETED;
306  }
307 
308  void
310  {
311  if (m_b_transport_ptr) {
312  // Forward call.
313  sc_assert(m_mod);
314  (m_mod->*m_b_transport_ptr)(trans, t);
315  return;
316  }
317 
318  // b->nb conversion
319  if (m_nb_transport_ptr) {
320  m_peq.notify(trans, t);
322 
323  mm_end_event_ext mm_ext;
324  const bool mm_added = !trans.has_mm();
325 
326  if (mm_added) {
327  trans.set_mm(this);
328  trans.set_auto_extension(&mm_ext);
329  trans.acquire();
330  }
331 
332  // Wait until transaction is finished.
333  sc_core::sc_event end_event;
334  m_owner->m_pending_trans[&trans] = &end_event;
335  sc_core::wait(end_event);
336 
337  if (mm_added) {
338  // Release will not delete the transaction, it will
339  // notify mm_ext.done.
340  trans.release();
341  if (trans.get_ref_count()) {
342  sc_core::wait(mm_ext.done);
343  }
344  trans.set_mm(0);
345  }
346  return;
347  }
348 
349  // Should not be reached.
351  "no blocking transport callback registered");
352  }
353 
354  unsigned int
356  {
357  if (m_transport_dbg_ptr) {
358  // Forward call.
359  sc_assert(m_mod);
360  return (m_mod->*m_transport_dbg_ptr)(trans);
361  }
362  // No debug support.
363  return 0;
364  }
365 
366  bool
368  {
369  if (m_get_direct_mem_ptr) {
370  // Forward call.
371  sc_assert(m_mod);
372  return (m_mod->*m_get_direct_mem_ptr)(trans, dmi_data);
373  }
374  // No DMI support.
375  dmi_data.allow_read_write();
376  dmi_data.set_start_address(0x0);
377  dmi_data.set_end_address((sc_dt::uint64)-1);
378  return false;
379  }
380 
381  private:
382 
383  // Dynamic process handler for nb2b conversion.
384 
385  class process_handle_class
386  {
387  public:
388  explicit process_handle_class(transaction_type *trans) :
389  m_trans(trans), m_suspend(false)
390  {}
391 
394  bool m_suspend;
395  };
396 
397  class process_handle_list
398  {
399  public:
401 
403  {
404  for (typename std::vector<
405  process_handle_class *>::iterator it = v.begin(),
406  end = v.end(); it != end; ++it) {
407  delete *it;
408  }
409  }
410 
411  process_handle_class *
413  {
415 
416  for (it = v.begin(); it != v.end(); it++) {
417  if ((*it)->m_suspend) {
418  // Found suspended dynamic process, re-use it.
419  (*it)->m_trans = trans; // Replace to new one.
420  (*it)->m_suspend = false;
421  return *it;
422  }
423  }
424  return NULL; // No suspended process.
425  }
426 
427  void
429  {
430  v.push_back(ph);
431  }
432 
433  private:
435  };
436 
438 
439  void
441  {
442  while (1) {
443  transaction_type *trans = h->m_trans;
445 
446  // Forward call.
447  sc_assert(m_mod);
448  (m_mod->*m_b_transport_ptr)(*trans, t);
449 
450  sc_core::wait(t);
451 
452  // Return path.
453  while (m_response_in_progress) {
455  }
457  phase_type phase = tlm::BEGIN_RESP;
458  sync_enum_type sync =
459  m_owner->bw_nb_transport(*trans, phase, t);
460  if (!(sync == tlm::TLM_COMPLETED ||
461  (sync == tlm::TLM_UPDATED &&
462  phase == tlm::END_RESP))) {
463  m_response_in_progress = true;
464  }
465 
466  // Suspend until next transaction.
467  h->m_suspend = true;
469  }
470  }
471 
472  void
473  b2nb_thread()
474  {
475  while (true) {
476  transaction_type *trans;
477  while ((trans = m_peq.get_next_transaction()) != 0) {
478  sc_assert(m_mod);
480  phase_type phase = tlm::BEGIN_REQ;
482 
483  switch ((m_mod->*m_nb_transport_ptr)(*trans, phase, t)) {
484  case tlm::TLM_COMPLETED:
485  {
486  // Notify transaction is finished.
487  typename std::map<transaction_type *,
488  sc_core::sc_event *>::iterator it =
489  m_owner->m_pending_trans.find(trans);
490  sc_assert(it != m_owner->m_pending_trans.end());
491  it->second->notify(t);
492  m_owner->m_pending_trans.erase(it);
493  break;
494  }
495 
496  case tlm::TLM_ACCEPTED:
497  case tlm::TLM_UPDATED:
498  switch (phase) {
499  case tlm::BEGIN_REQ:
503  break;
504 
505  case tlm::END_REQ:
506  sc_core::wait(t);
507  break;
508 
509  case tlm::BEGIN_RESP:
510  {
511  phase = tlm::END_RESP;
512  // This line is a bug fix added in TLM-2.0.2
513  sc_core::wait(t);
516  *trans, phase, t);
517 
518  // Notify transaction is finished.
519  typename std::map<transaction_type *,
520  sc_core::sc_event *>::iterator it =
521  m_owner->m_pending_trans.find(
522  trans);
523  sc_assert(it !=
524  m_owner->m_pending_trans.end());
525  it->second->notify(t);
526  m_owner->m_pending_trans.erase(it);
527  break;
528  }
529 
530  default:
531  m_owner->display_error("invalid phase received");
532  }
533  break;
534 
535  default:
536  m_owner->display_error("invalid sync value received");
537  }
538  }
539  sc_core::wait();
540  }
541  }
542 
543  void
545  {
546  mm_end_event_ext *ext =
547  trans->template get_extension<mm_end_event_ext>();
548  sc_assert(ext);
549  // Notify event first before freeing extensions (reset).
550  ext->done.notify();
551  trans->reset();
552  }
553 
554  private:
555  struct mm_end_event_ext : public tlm::tlm_extension<mm_end_event_ext>
556  {
557  tlm::tlm_extension_base *clone() const { return NULL; }
558  void free() {}
559  void copy_from(tlm::tlm_extension_base const &) {}
561  };
562 
563  private:
565  MODULE *m_mod;
570  peq_with_get<transaction_type> m_peq;
573  };
574 
575  private:
576  const sc_core::sc_object *get_socket() const { return this; }
577 
578  private:
581  std::map<transaction_type *, sc_core::sc_event *> m_pending_trans;
584 };
585 
586 template <typename MODULE, unsigned int BUSWIDTH=32,
587  typename TYPES=tlm::tlm_base_protocol_types>
588 class simple_target_socket :
589  public simple_target_socket_b<MODULE, BUSWIDTH, TYPES>
590 {
592  public:
594  explicit simple_target_socket(const char *name) : socket_b(name) {}
595 };
596 
597 template <typename MODULE, unsigned int BUSWIDTH=32,
600  public simple_target_socket_b<MODULE, BUSWIDTH, TYPES,
601  sc_core::SC_ZERO_OR_MORE_BOUND>
602 {
603  typedef simple_target_socket_b<MODULE, BUSWIDTH, TYPES,
605  public:
607  explicit simple_target_socket_optional(const char *name) :
609  {}
610 };
611 
612 // ID Tagged version.
613 template <typename MODULE, unsigned int BUSWIDTH, typename TYPES,
616  public tlm::tlm_target_socket<BUSWIDTH, TYPES, 1, POL>,
618 {
619  friend class fw_process;
620  friend class bw_process;
621  public:
622  typedef typename TYPES::tlm_payload_type transaction_type;
623  typedef typename TYPES::tlm_phase_type phase_type;
628 
629  public:
630  static const char *
631  default_name()
632  {
633  return sc_core::sc_gen_unique_name("simple_target_socket_tagged");
634  }
635 
636  explicit simple_target_socket_tagged_b(const char *n=default_name()) :
638  {
640  }
641 
643 
644  // bw transport must come through us.
646 
647  // REGISTER_XXX
648  void
650  sync_enum_type (MODULE::*cb)(int id, transaction_type &,
652  int id)
653  {
654  elaboration_check("register_nb_transport_fw");
657  }
658 
659  void
660  register_b_transport(MODULE *mod,
661  void (MODULE::*cb)(int id, transaction_type &,
663  int id)
664  {
665  elaboration_check("register_b_transport");
668  }
669 
670  void
671  register_transport_dbg(MODULE *mod,
672  unsigned int (MODULE::*cb)(int id, transaction_type &), int id)
673  {
674  elaboration_check("register_transport_dbg");
677  }
678 
679  void
681  bool (MODULE::*cb)(int id, transaction_type &, tlm::tlm_dmi &),
682  int id)
683  {
684  elaboration_check("register_get_direct_mem_ptr");
687  }
688 
689  protected:
690  void
692  {
693  base_type::start_of_simulation();
695  }
696 
697  private:
698  // Make call on bw path.
702  {
703  return base_type::operator -> ()->nb_transport_bw(trans, phase, t);
704  }
705 
706  void
708  {
710  }
711 
712  // Helper class to handle bw path calls Needed to detect transaction
713  // end when called from b_transport.
714  class bw_process : public tlm::tlm_bw_transport_if<TYPES>
715  {
716  public:
718 
722  {
723  typename std::map<transaction_type *,
724  sc_core::sc_event *>::iterator it =
725  m_owner->m_pending_trans.find(&trans);
726 
727  if (it == m_owner->m_pending_trans.end()) {
728  // Not a blocking call, forward.
729  return m_owner->bw_nb_transport(trans, phase, t);
730  }
731  if (phase == tlm::END_REQ) {
733  return tlm::TLM_ACCEPTED;
734  }
735  if (phase == tlm::BEGIN_RESP) {
736  if (m_owner->m_current_transaction == &trans) {
738  }
739  it->second->notify(t);
740  m_owner->m_pending_trans.erase(it);
741  return tlm::TLM_COMPLETED;
742  }
743  m_owner->display_error("invalid phase received");
744  return tlm::TLM_COMPLETED;
745  }
746 
747  void
749  {
751  }
752 
753  private:
755  };
756 
757  class fw_process : public tlm::tlm_fw_transport_if<TYPES>,
758  public tlm::tlm_mm_interface
759  {
760  public:
761  typedef sync_enum_type (MODULE::*NBTransportPtr)(
762  int id, transaction_type &, phase_type &,
763  sc_core::sc_time &);
764  typedef void (MODULE::*BTransportPtr)(
766  typedef unsigned int (MODULE::*TransportDbgPtr)(
767  int id, transaction_type &);
768  typedef bool (MODULE::*GetDirectMemPtr)(
769  int id, transaction_type &, tlm::tlm_dmi &);
770 
772  m_owner(p_own), m_mod(0), m_nb_transport_ptr(0),
777  m_peq(sc_core::sc_gen_unique_name("m_peq")),
779  {}
780 
781  void
783  {
785  // Only spawn b2nb_thread if needed.
790  sc_core::sc_gen_unique_name("b2nb_thread"), &opts);
791  }
792  }
793 
796  void
798  {
800  }
801  void set_get_dmi_user_id(int id) { m_get_dmi_user_id = id; }
802 
803  void
805  {
806  if (m_nb_transport_ptr) {
808  "non-blocking callback already registered");
809  return;
810  }
814  }
815 
816  void
818  {
819  if (m_b_transport_ptr) {
821  "blocking callback already registered");
822  return;
823  }
824  sc_assert(!m_mod || m_mod == mod);
825  m_mod = mod;
827  }
828 
829  void
831  {
832  if (m_transport_dbg_ptr) {
834  "debug callback already registered");
835  return;
836  }
837  sc_assert(!m_mod || m_mod == mod);
838  m_mod = mod;
840  }
841 
842  void
844  {
845  if (m_get_direct_mem_ptr) {
847  "get DMI pointer callback already registered");
848  }
849  sc_assert(!m_mod || m_mod == mod);
850  m_mod = mod;
852  }
853 
854  // Interface implementation.
858  {
859  if (m_nb_transport_ptr) {
860  // Forward call.
861  sc_assert(m_mod);
862  return (m_mod->*m_nb_transport_ptr)(
863  m_nb_transport_user_id, trans, phase, t);
864  }
865 
866  // nb->b conversion
867  if (m_b_transport_ptr) {
868  if (phase == tlm::BEGIN_REQ) {
869 
870  // Prepare thread to do blocking call.
871  process_handle_class *ph =
873 
874  if (!ph) { // Create new dynamic process.
875  ph = new process_handle_class(&trans);
877 
879  opts.dont_initialize();
880  opts.set_sensitivity(&ph->m_e);
881 
883  sc_bind(&fw_process::nb2b_thread, this, ph),
884  sc_core::sc_gen_unique_name("nb2b_thread"),
885  &opts);
886  }
887 
888  ph->m_e.notify(t);
889  return tlm::TLM_ACCEPTED;
890  }
891  if (phase == tlm::END_RESP) {
892  m_response_in_progress = false;
894  return tlm::TLM_COMPLETED;
895  }
896  m_owner->display_error("invalid phase");
897  return tlm::TLM_COMPLETED;
898  }
899 
901  "no non-blocking transport callback registered");
902  return tlm::TLM_COMPLETED;
903  }
904 
905  void
907  {
908  if (m_b_transport_ptr) {
909  // Forward call.
910  sc_assert(m_mod);
912  return;
913  }
914 
915  // b->nb conversion
916  if (m_nb_transport_ptr) {
917  m_peq.notify(trans, t);
919 
920  mm_end_event_ext mm_ext;
921  const bool mm_added = !trans.has_mm();
922 
923  if (mm_added) {
924  trans.set_mm(this);
925  trans.set_auto_extension(&mm_ext);
926  trans.acquire();
927  }
928 
929  // Wait until transaction is finished.
930  sc_core::sc_event end_event;
931  m_owner->m_pending_trans[&trans] = &end_event;
932  sc_core::wait(end_event);
933 
934  if (mm_added) {
935  // Release will not delete the transaction, it will
936  // notify mm_ext.done.
937  trans.release();
938  if (trans.get_ref_count()) {
939  sc_core::wait(mm_ext.done);
940  }
941  trans.set_mm(0);
942  }
943  return;
944  }
945 
946  m_owner->display_error("no transport callback registered");
947  }
948 
949  unsigned int
951  {
952  if (m_transport_dbg_ptr) {
953  // Forward call.
954  sc_assert(m_mod);
955  return (m_mod->*m_transport_dbg_ptr)(
956  m_transport_dbg_user_id, trans);
957  }
958  // No debug support.
959  return 0;
960  }
961 
962  bool
964  {
965  if (m_get_direct_mem_ptr) {
966  // Forward call.
968  return (m_mod->*m_get_direct_mem_ptr)(
969  m_get_dmi_user_id, trans, dmi_data);
970  }
971  // No DMI support.
972  dmi_data.allow_read_write();
973  dmi_data.set_start_address(0x0);
974  dmi_data.set_end_address((sc_dt::uint64)-1);
975  return false;
976  }
977 
978  private:
979 
980  // Dynamic process handler for nb2b conversion.
982  {
983  public:
984  explicit process_handle_class(transaction_type *trans) :
985  m_trans(trans), m_suspend(false)
986  {}
987 
990  bool m_suspend;
991  };
992 
993  class process_handle_list
994  {
995  public:
997 
999  {
1000  for (typename std::vector<
1001  process_handle_class *>::iterator it = v.begin(),
1002  end = v.end(); it != end; ++it) {
1003  delete *it;
1004  }
1005  }
1009  {
1011 
1012  for (it = v.begin(); it != v.end(); it++) {
1013  if ((*it)->m_suspend) {
1014  // Found suspended dynamic process, re-use it.
1015  (*it)->m_trans = trans; // Replace to new one.
1016  (*it)->m_suspend = false;
1017  return *it;
1018  }
1019  }
1020  return NULL; // No suspended process.
1021  }
1022 
1023  void put_handle(process_handle_class *ph) { v.push_back(ph); }
1024 
1025  private:
1027  };
1028 
1030 
1031  void
1033  {
1034 
1035  while (1) {
1036  transaction_type *trans = h->m_trans;
1038 
1039  // Forward call.
1042  m_b_transport_user_id, *trans, t);
1044  sc_core::wait(t);
1045 
1046  // Return path.
1047  while (m_response_in_progress) {
1049  }
1051  phase_type phase = tlm::BEGIN_RESP;
1052  sync_enum_type sync =
1053  m_owner->bw_nb_transport(*trans, phase, t);
1054  if (!(sync == tlm::TLM_COMPLETED ||
1055  (sync == tlm::TLM_UPDATED &&
1056  phase == tlm::END_RESP))) {
1057  m_response_in_progress = true;
1058  }
1059 
1060  // Suspend until next transaction.
1061  h->m_suspend = true;
1062  sc_core::wait();
1063  }
1064  }
1065 
1066  void
1067  b2nb_thread()
1068  {
1069  while (true) {
1070  transaction_type *trans;
1071  while ((trans = m_peq.get_next_transaction()) != 0) {
1072  sc_assert(m_mod);
1074  phase_type phase = tlm::BEGIN_REQ;
1076 
1077  switch ((m_mod->*m_nb_transport_ptr)(
1078  m_nb_transport_user_id, *trans, phase, t)) {
1079  case tlm::TLM_COMPLETED:
1080  {
1081  // Notify transaction is finished.
1082  typename std::map<transaction_type *,
1083  sc_core::sc_event *>::iterator it =
1084  m_owner->m_pending_trans.find(trans);
1085  sc_assert(it != m_owner->m_pending_trans.end());
1086  it->second->notify(t);
1087  m_owner->m_pending_trans.erase(it);
1088  break;
1089  }
1090 
1091  case tlm::TLM_ACCEPTED:
1092  case tlm::TLM_UPDATED:
1093  switch (phase) {
1094  case tlm::BEGIN_REQ:
1095  m_owner->m_current_transaction = trans;
1098  break;
1099 
1100  case tlm::END_REQ:
1101  sc_core::wait(t);
1102  break;
1103 
1104  case tlm::BEGIN_RESP:
1105  {
1106  phase = tlm::END_RESP;
1107  // This line is a bug fix added in TLM-2.0.2.
1108  sc_core::wait(t);
1112  *trans, phase, t);
1113 
1114  // Notify transaction is finished.
1115  typename std::map<transaction_type *,
1116  sc_core::sc_event *>::iterator it =
1117  m_owner->m_pending_trans.find(
1118  trans);
1119  sc_assert(it !=
1120  m_owner->m_pending_trans.end());
1121  it->second->notify(t);
1122  m_owner->m_pending_trans.erase(it);
1123  break;
1124  }
1125 
1126  default:
1127  m_owner->display_error("invalid phase received");
1128  };
1129  break;
1130 
1131  default:
1132  m_owner->display_error("invalid sync value received");
1133  }
1134  }
1135  sc_core::wait();
1136  }
1137  }
1138 
1139  void
1141  {
1142  mm_end_event_ext *ext =
1143  trans->template get_extension<mm_end_event_ext>();
1144  sc_assert(ext);
1145  // Notify event first before freeing extensions (reset).
1146  ext->done.notify();
1147  trans->reset();
1148  }
1149 
1150  private:
1151  struct mm_end_event_ext : public tlm::tlm_extension<mm_end_event_ext>
1152  {
1153  tlm::tlm_extension_base *clone() const { return NULL; }
1154  void free() {}
1155  void copy_from(tlm::tlm_extension_base const &) {}
1157  };
1158 
1159  private:
1161  MODULE *m_mod;
1169  int m_get_dmi_user_id;
1173  };
1174 
1175  private:
1176  const sc_core::sc_object *get_socket() const { return this; }
1178  private:
1181  std::map<transaction_type *, sc_core::sc_event *> m_pending_trans;
1184 };
1186 template <typename MODULE, unsigned int BUSWIDTH=32,
1189  public simple_target_socket_tagged_b<MODULE, BUSWIDTH, TYPES>
1190 {
1192  public:
1194  explicit simple_target_socket_tagged(const char *name) : socket_b(name) {}
1195 };
1197 template <typename MODULE, unsigned int BUSWIDTH=32,
1200  public simple_target_socket_tagged_b<MODULE, BUSWIDTH, TYPES,
1201  sc_core::SC_ZERO_OR_MORE_BOUND>
1202 {
1204  MODULE, BUSWIDTH, TYPES, sc_core::SC_ZERO_OR_MORE_BOUND> socket_b;
1205  public:
1207  explicit simple_target_socket_tagged_optional(const char *name) :
1209  {}
1210 };
1212 } // namespace tlm_utils
1213 
1214 #endif /* __SYSTEMC_EXT_TLM_UTILS_SIMPLE_TARGET_SOCKET_H__ */
tlm_utils::simple_target_socket_b::fw_process::set_get_direct_mem_ptr
void set_get_direct_mem_ptr(MODULE *mod, GetDirectMemPtr p)
Definition: simple_target_socket.h:282
tlm_utils::simple_target_socket_b::fw_process::m_response_in_progress
bool m_response_in_progress
Definition: simple_target_socket.h:605
tlm_utils::simple_target_socket_tagged_b::register_transport_dbg
void register_transport_dbg(MODULE *mod, unsigned int(MODULE::*cb)(int id, transaction_type &), int id)
Definition: simple_target_socket.h:688
tlm_utils::peq_with_get::get_next_transaction
transaction_type * get_next_transaction()
Definition: peq_with_get.h:98
tlm_utils::simple_target_socket_tagged_b::bw_process::m_owner
simple_target_socket_tagged_b * m_owner
Definition: simple_target_socket.h:771
tlm::tlm_bw_transport_if
Definition: fw_bw_ifs.hh:231
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_class
Definition: simple_target_socket.h:998
tlm_utils::simple_target_socket_b::fw_process::process_handle_class::m_e
sc_core::sc_event m_e
Definition: simple_target_socket.h:427
tlm_utils::simple_target_socket_b::fw_process::m_transport_dbg_ptr
TransportDbgPtr m_transport_dbg_ptr
Definition: simple_target_socket.h:602
sc_core::SC_ONE_OR_MORE_BOUND
@ SC_ONE_OR_MORE_BOUND
Definition: sc_port.hh:69
tlm_utils::simple_target_socket_tagged_b::fw_process::m_nb_transport_user_id
int m_nb_transport_user_id
Definition: simple_target_socket.h:1183
tlm_utils::simple_target_socket_tagged_b::fw_process
Definition: simple_target_socket.h:774
tlm_utils::simple_target_socket_b::fw_process::process_handle_list
Definition: simple_target_socket.h:431
tlm_utils::simple_target_socket_b::fw_process
Definition: simple_target_socket.h:210
tlm_utils::simple_target_socket_b::bw_process
friend class bw_process
Definition: simple_target_socket.h:79
tlm_utils::simple_target_socket_b::fw_process::get_direct_mem_ptr
bool get_direct_mem_ptr(transaction_type &trans, tlm::tlm_dmi &dmi_data)
Definition: simple_target_socket.h:401
tlm_utils::simple_target_socket_tagged_b::fw_process::set_transport_dbg_ptr
void set_transport_dbg_ptr(MODULE *mod, TransportDbgPtr p)
Definition: simple_target_socket.h:847
tlm_utils::simple_target_socket_b::fw_process::GetDirectMemPtr
bool(MODULE::* GetDirectMemPtr)(transaction_type &, tlm::tlm_dmi &)
Definition: simple_target_socket.h:219
tlm_utils::simple_target_socket_b::bw_process::invalidate_direct_mem_ptr
void invalidate_direct_mem_ptr(sc_dt::uint64 s, sc_dt::uint64 e)
Definition: simple_target_socket.h:201
tlm_utils::simple_target_socket_tagged_b::fw_process::free
void free(tlm::tlm_generic_payload *trans)
Definition: simple_target_socket.h:1157
tlm_utils::simple_target_socket_tagged_b::fw_process::NBTransportPtr
sync_enum_type(MODULE::* NBTransportPtr)(int id, transaction_type &, phase_type &, sc_core::sc_time &)
Definition: simple_target_socket.h:778
tlm_utils::simple_target_socket_b::fw_process::m_get_direct_mem_ptr
GetDirectMemPtr m_get_direct_mem_ptr
Definition: simple_target_socket.h:603
tlm_utils::simple_target_socket_b::bw_nb_transport
sync_enum_type bw_nb_transport(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
Definition: simple_target_socket.h:151
tlm_utils::simple_target_socket_b::fw_process::mm_end_event_ext::copy_from
void copy_from(tlm::tlm_extension_base const &)
Definition: simple_target_socket.h:593
tlm_utils::simple_target_socket_tagged_b::fw_process::mm_end_event_ext::clone
tlm::tlm_extension_base * clone() const
Definition: simple_target_socket.h:1170
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_class::m_suspend
bool m_suspend
Definition: simple_target_socket.h:1007
tlm_utils::simple_target_socket_b::register_b_transport
void register_b_transport(MODULE *mod, void(MODULE::*cb)(transaction_type &, sc_core::sc_time &))
Definition: simple_target_socket.h:117
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_list::~process_handle_list
~process_handle_list()
Definition: simple_target_socket.h:1015
tlm::tlm_dmi::allow_read_write
void allow_read_write()
Definition: dmi.hh:124
sc_core::sc_spawn_options::set_sensitivity
void set_sensitivity(const sc_event *)
Definition: sc_spawn.cc:146
tlm::tlm_target_socket
Definition: target_socket.hh:213
tlm_utils::simple_target_socket_tagged_b::default_name
static const char * default_name()
Definition: simple_target_socket.h:648
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_list::process_handle_list
process_handle_list()
Definition: simple_target_socket.h:1013
tlm_utils::simple_target_socket_b::fw_process::process_handle_list::get_handle
process_handle_class * get_handle(transaction_type *trans)
Definition: simple_target_socket.h:446
tlm_utils::simple_target_socket_b::m_current_transaction
transaction_type * m_current_transaction
Definition: simple_target_socket.h:617
tlm_utils::simple_target_socket_b::fw_process::BTransportPtr
void(MODULE::* BTransportPtr)(transaction_type &, sc_core::sc_time &)
Definition: simple_target_socket.h:216
tlm::TLM_COMPLETED
@ TLM_COMPLETED
Definition: fw_bw_ifs.hh:65
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_list
Definition: simple_target_socket.h:1010
sc_core
Definition: messages.cc:31
tlm_utils::simple_target_socket_b::fw_process::nb2b_thread
void nb2b_thread(process_handle_class *h)
Definition: simple_target_socket.h:474
tlm_utils::simple_target_socket_tagged_b::fw_process::m_get_direct_mem_ptr
GetDirectMemPtr m_get_direct_mem_ptr
Definition: simple_target_socket.h:1182
tlm::tlm_dmi
Definition: dmi.hh:46
mod
int mod(int val, int mod)
Definition: RubySlicc_Util.hh:90
tlm_utils::simple_target_socket_tagged_b::bw_interface_type
tlm::tlm_bw_transport_if< TYPES > bw_interface_type
Definition: simple_target_socket.h:643
tlm::TLM_UPDATED
@ TLM_UPDATED
Definition: fw_bw_ifs.hh:65
tlm_utils::simple_target_socket_b::fw_process::mm_end_event_ext::clone
tlm::tlm_extension_base * clone() const
Definition: simple_target_socket.h:591
tlm_utils::simple_target_socket_b::m_pending_trans
std::map< transaction_type *, sc_core::sc_event * > m_pending_trans
Definition: simple_target_socket.h:615
tlm_utils::simple_target_socket_tagged_b::fw_process::m_end_response
sc_core::sc_event m_end_response
Definition: simple_target_socket.h:1189
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_class::process_handle_class
process_handle_class(transaction_type *trans)
Definition: simple_target_socket.h:1001
sc_core::sc_spawn_options::dont_initialize
void dont_initialize()
Definition: sc_spawn.cc:133
tlm_utils::simple_target_socket_tagged_b::sync_enum_type
tlm::tlm_sync_enum sync_enum_type
Definition: simple_target_socket.h:641
tlm::END_REQ
@ END_REQ
Definition: phase.hh:42
tlm_utils::simple_target_socket_b::fw_process::process_handle_class::m_suspend
bool m_suspend
Definition: simple_target_socket.h:428
tlm_utils::simple_target_socket_tagged_b::get_socket
const sc_core::sc_object * get_socket() const
Definition: simple_target_socket.h:1193
tlm_utils::simple_target_socket_tagged_b::transaction_type
TYPES::tlm_payload_type transaction_type
Definition: simple_target_socket.h:639
tlm_utils::simple_target_socket_tagged::socket_b
simple_target_socket_tagged_b< MODULE, BUSWIDTH, TYPES > socket_b
Definition: simple_target_socket.h:1208
tlm_utils::simple_target_socket_tagged_b::start_of_simulation
void start_of_simulation()
Definition: simple_target_socket.h:708
tlm_utils::simple_target_socket::simple_target_socket
simple_target_socket()
Definition: simple_target_socket.h:610
tlm_utils::simple_target_socket_b::fw_process::transport_dbg
unsigned int transport_dbg(transaction_type &trans)
Definition: simple_target_socket.h:389
tlm_utils::simple_target_socket_b::fw_process::set_nb_transport_ptr
void set_nb_transport_ptr(MODULE *mod, NBTransportPtr p)
Definition: simple_target_socket.h:244
sc_core::SC_ZERO_TIME
const sc_time SC_ZERO_TIME
Definition: sc_time.cc:290
tlm_utils::simple_target_socket_tagged_b::m_pending_trans
std::map< transaction_type *, sc_core::sc_event * > m_pending_trans
Definition: simple_target_socket.h:1198
tlm_utils::simple_target_socket_tagged_b::fw_process::m_nb_transport_ptr
NBTransportPtr m_nb_transport_ptr
Definition: simple_target_socket.h:1179
tlm_utils::simple_target_socket_b::default_name
static const char * default_name()
Definition: simple_target_socket.h:90
std::vector
STL vector class.
Definition: stl.hh:37
tlm_utils::peq_with_get::notify
void notify(transaction_type &trans, const sc_core::sc_time &t)
Definition: peq_with_get.h:82
tlm_utils::simple_target_socket_tagged_b::fw_process::m_response_in_progress
bool m_response_in_progress
Definition: simple_target_socket.h:1188
tlm_utils::convenience_socket_base::display_warning
void display_warning(const char *msg) const
Definition: convenience_socket_bases.cc:49
tlm_utils::simple_target_socket_tagged_optional::socket_b
simple_target_socket_tagged_b< MODULE, BUSWIDTH, TYPES, sc_core::SC_ZERO_OR_MORE_BOUND > socket_b
Definition: simple_target_socket.h:1221
tlm_utils::simple_target_socket_b::register_transport_dbg
void register_transport_dbg(MODULE *mod, unsigned int(MODULE::*cb)(transaction_type &))
Definition: simple_target_socket.h:125
tlm_utils::simple_target_socket_b::fw_process::b_transport
void b_transport(transaction_type &trans, sc_core::sc_time &t)
Definition: simple_target_socket.h:343
tlm_utils::simple_target_socket_tagged_b::m_fw_process
fw_process m_fw_process
Definition: simple_target_socket.h:1196
tlm_utils::simple_target_socket_b::fw_process::process_handle_class::process_handle_class
process_handle_class(transaction_type *trans)
Definition: simple_target_socket.h:422
tlm_utils::simple_target_socket_b::phase_type
TYPES::tlm_phase_type phase_type
Definition: simple_target_socket.h:82
sc_assert
#define sc_assert(expr)
Definition: sc_report_handler.hh:135
tlm_utils::simple_target_socket_tagged_b::fw_process::m_transport_dbg_ptr
TransportDbgPtr m_transport_dbg_ptr
Definition: simple_target_socket.h:1181
tlm_utils::simple_target_socket_b::fw_process::process_handle_class
Definition: simple_target_socket.h:419
tlm_utils::simple_target_socket_tagged_optional
Definition: simple_target_socket.h:1216
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_list::v
std::vector< process_handle_class * > v
Definition: simple_target_socket.h:1043
tlm_utils::simple_target_socket_b::fw_process::m_nb_transport_ptr
NBTransportPtr m_nb_transport_ptr
Definition: simple_target_socket.h:600
tlm_utils::simple_target_socket_b::fw_process::start_of_simulation
void start_of_simulation()
Definition: simple_target_socket.h:231
tlm_utils::simple_target_socket_b::fw_process::b2nb_thread
void b2nb_thread()
Definition: simple_target_socket.h:507
tlm_utils::simple_target_socket_b::simple_target_socket_b
simple_target_socket_b(const char *n=default_name())
Definition: simple_target_socket.h:95
ArmISA::n
Bitfield< 31 > n
Definition: miscregs_types.hh:450
tlm_utils::simple_target_socket_tagged_b::fw_process::set_nb_transport_user_id
void set_nb_transport_user_id(int id)
Definition: simple_target_socket.h:811
tlm::tlm_generic_payload::reset
void reset()
Definition: gp.cc:134
tlm_utils::simple_target_socket_tagged_b::fw_process::b_transport
void b_transport(transaction_type &trans, sc_core::sc_time &t)
Definition: simple_target_socket.h:923
tlm_utils::simple_target_socket_b::fw_process::mm_end_event_ext::free
void free()
Definition: simple_target_socket.h:592
tlm_utils::simple_target_socket_tagged_b::phase_type
TYPES::tlm_phase_type phase_type
Definition: simple_target_socket.h:640
tlm_utils::peq_with_get::get_event
sc_core::sc_event & get_event()
Definition: peq_with_get.h:116
tlm::tlm_fw_transport_if
Definition: fw_bw_ifs.hh:221
tlm_utils::peq_with_get< transaction_type >
tlm_utils::simple_socket_base::elaboration_check
void elaboration_check(const char *action) const
Definition: convenience_socket_bases.cc:85
tlm::tlm_dmi::set_end_address
void set_end_address(sc_dt::uint64 addr)
Definition: dmi.hh:117
tlm_utils::simple_target_socket_optional::socket_b
simple_target_socket_b< MODULE, BUSWIDTH, TYPES, sc_core::SC_ZERO_OR_MORE_BOUND > socket_b
Definition: simple_target_socket.h:621
tlm_utils::simple_target_socket_b::bw_process::bw_process
bw_process(simple_target_socket_b *p_own)
Definition: simple_target_socket.h:168
tlm_utils::simple_target_socket_b::bw_process
Definition: simple_target_socket.h:165
sc_core::SC_ZERO_OR_MORE_BOUND
@ SC_ZERO_OR_MORE_BOUND
Definition: sc_port.hh:70
tlm_utils::simple_target_socket_b::fw_process::process_handle_list::v
std::vector< process_handle_class * > v
Definition: simple_target_socket.h:468
tlm::tlm_extension_base
Definition: gp.hh:65
sc_dt::uint64
uint64_t uint64
Definition: sc_nbdefs.hh:206
tlm_utils::simple_target_socket_tagged_b::fw_process::fw_process
fw_process(simple_target_socket_tagged_b *p_own)
Definition: simple_target_socket.h:788
tlm_utils::simple_target_socket_tagged_b::fw_process::set_b_transport_user_id
void set_b_transport_user_id(int id)
Definition: simple_target_socket.h:812
sc_core::sc_event
Definition: sc_event.hh:169
tlm_utils::simple_target_socket_tagged_b::fw_process::m_b_transport_user_id
int m_b_transport_user_id
Definition: simple_target_socket.h:1184
tlm_utils::simple_target_socket_b::fw_process::m_process_handle
process_handle_list m_process_handle
Definition: simple_target_socket.h:471
ArmISA::ext
Bitfield< 12 > ext
Definition: miscregs_types.hh:422
sc_core::sc_time
Definition: sc_time.hh:49
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_class::m_trans
transaction_type * m_trans
Definition: simple_target_socket.h:1005
tlm_utils::convenience_socket_base::display_error
void display_error(const char *msg) const
Definition: convenience_socket_bases.cc:57
tlm_utils::simple_target_socket_tagged_b::fw_process::set_transport_dbg_user_id
void set_transport_dbg_user_id(int id)
Definition: simple_target_socket.h:814
tlm_utils::simple_target_socket_tagged_b::operator->
tlm::tlm_bw_transport_if< TYPES > * operator->()
Definition: simple_target_socket.h:662
tlm_utils::simple_target_socket_b::fw_process::process_handle_list::put_handle
void put_handle(process_handle_class *ph)
Definition: simple_target_socket.h:462
tlm_utils::simple_target_socket_b::fw_process::m_b_transport_ptr
BTransportPtr m_b_transport_ptr
Definition: simple_target_socket.h:601
tlm_utils::simple_target_socket_b::fw_process::m_owner
simple_target_socket_b * m_owner
Definition: simple_target_socket.h:598
tlm_utils::simple_target_socket_b::bw_process::m_owner
simple_target_socket_b * m_owner
Definition: simple_target_socket.h:207
tlm_utils::simple_target_socket_tagged_b::fw_process::nb2b_thread
void nb2b_thread(process_handle_class *h)
Definition: simple_target_socket.h:1049
tlm_utils::simple_target_socket_tagged_b::fw_process::set_b_transport_ptr
void set_b_transport_ptr(MODULE *mod, BTransportPtr p)
Definition: simple_target_socket.h:834
tlm_utils::simple_target_socket_tagged_b::bw_process::invalidate_direct_mem_ptr
void invalidate_direct_mem_ptr(sc_dt::uint64 s, sc_dt::uint64 e)
Definition: simple_target_socket.h:765
tlm_utils::simple_target_socket_b::operator->
tlm::tlm_bw_transport_if< TYPES > * operator->()
Definition: simple_target_socket.h:104
tlm_utils::simple_target_socket_b::fw_process::set_b_transport_ptr
void set_b_transport_ptr(MODULE *mod, BTransportPtr p)
Definition: simple_target_socket.h:257
tlm_utils::simple_target_socket_b::register_get_direct_mem_ptr
void register_get_direct_mem_ptr(MODULE *mod, bool(MODULE::*cb)(transaction_type &, tlm::tlm_dmi &))
Definition: simple_target_socket.h:133
tlm_utils::simple_target_socket_b::m_end_request
sc_core::sc_event m_end_request
Definition: simple_target_socket.h:616
tlm_utils::simple_target_socket_tagged_b::bw_process::nb_transport_bw
sync_enum_type nb_transport_bw(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
Definition: simple_target_socket.h:737
sc_core::sc_gen_unique_name
const char * sc_gen_unique_name(const char *seed)
Definition: sc_module.cc:820
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_list::put_handle
void put_handle(process_handle_class *ph)
Definition: simple_target_socket.h:1040
sc_core::sc_port_policy
sc_port_policy
Definition: sc_port.hh:67
tlm_utils::simple_target_socket_tagged::simple_target_socket_tagged
simple_target_socket_tagged()
Definition: simple_target_socket.h:1210
tlm_utils::simple_target_socket_b::transaction_type
TYPES::tlm_payload_type transaction_type
Definition: simple_target_socket.h:81
tlm_utils::simple_target_socket_tagged_b::fw_process::GetDirectMemPtr
bool(MODULE::* GetDirectMemPtr)(int id, transaction_type &, tlm::tlm_dmi &)
Definition: simple_target_socket.h:785
tlm::END_RESP
@ END_RESP
Definition: phase.hh:44
tlm::tlm_base_target_socket< 32, tlm_fw_transport_if< tlm_base_protocol_types >, tlm_bw_transport_if< tlm_base_protocol_types >, 1, sc_core::SC_ONE_OR_MORE_BOUND >::operator->
bw_interface_type * operator->()
Definition: target_socket.hh:162
tlm_utils::simple_target_socket_tagged_b::fw_process::m_transport_dbg_user_id
int m_transport_dbg_user_id
Definition: simple_target_socket.h:1185
tlm_utils::simple_target_socket_b::fw_process::m_mod
MODULE * m_mod
Definition: simple_target_socket.h:599
sc_core::sc_object
Definition: sc_object.hh:50
tlm_utils::simple_target_socket
Definition: simple_target_socket.h:605
tlm_utils::simple_target_socket_tagged_optional::simple_target_socket_tagged_optional
simple_target_socket_tagged_optional()
Definition: simple_target_socket.h:1223
name
const std::string & name()
Definition: trace.cc:50
tlm_utils::simple_target_socket_b::fw_interface_type
tlm::tlm_fw_transport_if< TYPES > fw_interface_type
Definition: simple_target_socket.h:84
tlm_utils::simple_target_socket_b::bw_process::nb_transport_bw
sync_enum_type nb_transport_bw(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
Definition: simple_target_socket.h:171
tlm_utils::simple_target_socket_tagged
Definition: simple_target_socket.h:1205
sc_core::sc_event::notify
void notify()
Definition: sc_event.cc:337
ArmISA::e
Bitfield< 9 > e
Definition: miscregs_types.hh:61
tlm_utils::simple_target_socket_b::fw_process::set_transport_dbg_ptr
void set_transport_dbg_ptr(MODULE *mod, TransportDbgPtr p)
Definition: simple_target_socket.h:270
tlm_utils::simple_target_socket_optional
Definition: simple_target_socket.h:616
tlm_utils
Definition: convenience_socket_bases.h:29
tlm_utils::simple_target_socket_tagged_b::bw_process
Definition: simple_target_socket.h:731
tlm::BEGIN_REQ
@ BEGIN_REQ
Definition: phase.hh:41
tlm_utils::simple_target_socket_b::get_socket
const sc_core::sc_object * get_socket() const
Definition: simple_target_socket.h:610
tlm::tlm_base_target_socket_b
Definition: initiator_socket.hh:65
tlm_utils::simple_target_socket_b::bw_interface_type
tlm::tlm_bw_transport_if< TYPES > bw_interface_type
Definition: simple_target_socket.h:85
tlm_utils::simple_target_socket_tagged_b::fw_process::get_direct_mem_ptr
bool get_direct_mem_ptr(transaction_type &trans, tlm::tlm_dmi &dmi_data)
Definition: simple_target_socket.h:980
tlm_utils::simple_target_socket_tagged_b::fw_process::b2nb_thread
void b2nb_thread()
Definition: simple_target_socket.h:1084
tlm::tlm_bw_nonblocking_transport_if::nb_transport_bw
virtual tlm_sync_enum nb_transport_bw(TRANS &trans, PHASE &phase, sc_core::sc_time &t)=0
tlm_utils::simple_target_socket_b::fw_process::nb_transport_fw
sync_enum_type nb_transport_fw(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
Definition: simple_target_socket.h:296
tlm_utils::simple_target_socket_tagged_b::fw_process::m_process_handle
process_handle_list m_process_handle
Definition: simple_target_socket.h:1046
tlm_utils::simple_target_socket_b::bw_invalidate_direct_mem_ptr
void bw_invalidate_direct_mem_ptr(sc_dt::uint64 s, sc_dt::uint64 e)
Definition: simple_target_socket.h:158
tlm_utils::simple_target_socket_tagged_b::fw_process::m_b_transport_ptr
BTransportPtr m_b_transport_ptr
Definition: simple_target_socket.h:1180
tlm_utils::simple_target_socket_b::fw_process::process_handle_list::~process_handle_list
~process_handle_list()
Definition: simple_target_socket.h:436
tlm::tlm_generic_payload
Definition: gp.hh:133
peq_with_get.h
tlm_utils::simple_target_socket_tagged_b::fw_process::start_of_simulation
void start_of_simulation()
Definition: simple_target_socket.h:799
tlm_utils::simple_target_socket_tagged_b::fw_process::mm_end_event_ext::done
sc_core::sc_event done
Definition: simple_target_socket.h:1173
tlm_utils::simple_target_socket_b::fw_process::process_handle_list::process_handle_list
process_handle_list()
Definition: simple_target_socket.h:434
tlm_utils::simple_target_socket_tagged_b::simple_target_socket_tagged_b
simple_target_socket_tagged_b(const char *n=default_name())
Definition: simple_target_socket.h:653
sc_core::wait
void wait()
Definition: sc_module.cc:653
tlm::tlm_extension
Definition: gp.hh:83
tlm_utils::simple_target_socket_tagged_b::fw_process::m_mod
MODULE * m_mod
Definition: simple_target_socket.h:1178
tlm_utils::simple_target_socket_tagged_b::register_b_transport
void register_b_transport(MODULE *mod, void(MODULE::*cb)(int id, transaction_type &, sc_core::sc_time &), int id)
Definition: simple_target_socket.h:677
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
tlm_utils::simple_target_socket_tagged_b
Definition: simple_target_socket.h:632
tlm_utils::simple_target_socket_tagged_b::fw_process::mm_end_event_ext::copy_from
void copy_from(tlm::tlm_extension_base const &)
Definition: simple_target_socket.h:1172
tlm_utils::simple_target_socket_b::m_fw_process
fw_process m_fw_process
Definition: simple_target_socket.h:613
tlm_utils::simple_target_socket_tagged_b::register_nb_transport_fw
void register_nb_transport_fw(MODULE *mod, sync_enum_type(MODULE::*cb)(int id, transaction_type &, phase_type &, sc_core::sc_time &), int id)
Definition: simple_target_socket.h:666
tlm_utils::simple_target_socket_tagged_b::m_bw_process
bw_process m_bw_process
Definition: simple_target_socket.h:1197
tlm::tlm_base_protocol_types
Definition: fw_bw_ifs.hh:213
tlm_utils::simple_target_socket_b::fw_process
friend class fw_process
Definition: simple_target_socket.h:78
tlm_utils::simple_target_socket_tagged_b::fw_process::set_nb_transport_ptr
void set_nb_transport_ptr(MODULE *mod, NBTransportPtr p)
Definition: simple_target_socket.h:821
tlm_utils::simple_target_socket_tagged_b::bw_process::bw_process
bw_process(simple_target_socket_tagged_b *p_own)
Definition: simple_target_socket.h:734
tlm_utils::simple_target_socket_tagged_b::fw_process::mm_end_event_ext::free
void free()
Definition: simple_target_socket.h:1171
tlm_utils::simple_target_socket_b::fw_process::fw_process
fw_process(simple_target_socket_b *p_own)
Definition: simple_target_socket.h:222
tlm_utils::simple_socket_base
Definition: convenience_socket_bases.h:48
tlm_utils::simple_target_socket::socket_b
simple_target_socket_b< MODULE, BUSWIDTH, TYPES > socket_b
Definition: simple_target_socket.h:608
tlm::tlm_sync_enum
tlm_sync_enum
Definition: fw_bw_ifs.hh:48
tlm_utils::simple_target_socket_optional::simple_target_socket_optional
simple_target_socket_optional()
Definition: simple_target_socket.h:623
tlm_utils::simple_target_socket_tagged_b::m_current_transaction
transaction_type * m_current_transaction
Definition: simple_target_socket.h:1200
sc_core::sc_spawn
sc_process_handle sc_spawn(T object, const char *name_p=nullptr, const sc_spawn_options *opt_p=nullptr)
Definition: sc_spawn.hh:154
tlm_utils::simple_target_socket_tagged_b::fw_process::nb_transport_fw
sync_enum_type nb_transport_fw(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
Definition: simple_target_socket.h:873
sc_core::sc_spawn_options
Definition: sc_spawn.hh:93
tlm_utils::simple_target_socket_b::sync_enum_type
tlm::tlm_sync_enum sync_enum_type
Definition: simple_target_socket.h:83
tlm_utils::simple_target_socket_b::fw_process::m_peq
peq_with_get< transaction_type > m_peq
Definition: simple_target_socket.h:604
tlm::tlm_bw_direct_mem_if::invalidate_direct_mem_ptr
virtual void invalidate_direct_mem_ptr(sc_dt::uint64 start_range, sc_dt::uint64 end_range)=0
tlm_utils::simple_target_socket_b::fw_process::NBTransportPtr
sync_enum_type(MODULE::* NBTransportPtr)(transaction_type &, phase_type &, sc_core::sc_time &)
Definition: simple_target_socket.h:214
tlm_utils::simple_target_socket_tagged_b::fw_process::BTransportPtr
void(MODULE::* BTransportPtr)(int id, transaction_type &, sc_core::sc_time &)
Definition: simple_target_socket.h:781
tlm_utils::simple_target_socket_tagged_b::fw_process
friend class fw_process
Definition: simple_target_socket.h:636
tlm_utils::simple_target_socket_tagged_b::bw_invalidate_direct_mem_ptr
void bw_invalidate_direct_mem_ptr(sc_dt::uint64 s, sc_dt::uint64 e)
Definition: simple_target_socket.h:724
tlm::tlm_dmi::set_start_address
void set_start_address(sc_dt::uint64 addr)
Definition: dmi.hh:116
tlm_utils::simple_target_socket_b::fw_process::m_end_response
sc_core::sc_event m_end_response
Definition: simple_target_socket.h:606
tlm_utils::simple_target_socket_tagged_b::bw_nb_transport
sync_enum_type bw_nb_transport(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
Definition: simple_target_socket.h:717
tlm_utils::simple_target_socket_tagged_b::fw_process::transport_dbg
unsigned int transport_dbg(transaction_type &trans)
Definition: simple_target_socket.h:967
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
tlm_utils::simple_target_socket_tagged_b::fw_process::TransportDbgPtr
unsigned int(MODULE::* TransportDbgPtr)(int id, transaction_type &)
Definition: simple_target_socket.h:783
tlm_utils::simple_target_socket_tagged_b::m_end_request
sc_core::sc_event m_end_request
Definition: simple_target_socket.h:1199
tlm_utils::simple_target_socket_tagged_b::fw_interface_type
tlm::tlm_fw_transport_if< TYPES > fw_interface_type
Definition: simple_target_socket.h:642
ArmISA::s
Bitfield< 4 > s
Definition: miscregs_types.hh:556
tlm_utils::simple_target_socket_tagged_b::fw_process::set_get_dmi_user_id
void set_get_dmi_user_id(int id)
Definition: simple_target_socket.h:818
tlm_utils::simple_target_socket_tagged_b::register_get_direct_mem_ptr
void register_get_direct_mem_ptr(MODULE *mod, bool(MODULE::*cb)(int id, transaction_type &, tlm::tlm_dmi &), int id)
Definition: simple_target_socket.h:697
tlm_utils::simple_target_socket_tagged_b::fw_process::set_get_direct_mem_ptr
void set_get_direct_mem_ptr(MODULE *mod, GetDirectMemPtr p)
Definition: simple_target_socket.h:860
tlm_utils::simple_target_socket_tagged_b::base_type
tlm::tlm_target_socket< BUSWIDTH, TYPES, 1, POL > base_type
Definition: simple_target_socket.h:644
tlm::tlm_base_target_socket< BUSWIDTH, tlm_fw_transport_if< TYPES >, tlm_bw_transport_if< TYPES >, N, POL >::bind
virtual void bind(base_initiator_socket_type &s)
Definition: target_socket.hh:112
tlm::tlm_mm_interface
Definition: gp.hh:50
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_list::get_handle
process_handle_class * get_handle(transaction_type *trans)
Definition: simple_target_socket.h:1025
tlm_utils::simple_target_socket_b::fw_process::mm_end_event_ext::done
sc_core::sc_event done
Definition: simple_target_socket.h:594
tlm_utils::simple_target_socket_b::fw_process::process_handle_class::m_trans
transaction_type * m_trans
Definition: simple_target_socket.h:426
sc_core::sc_bind
auto sc_bind(F &&f, Args &&...args) -> decltype(std::bind(std::forward< F >(f), std::forward< Args >(args)...))
Definition: sc_spawn.hh:198
tlm_utils::simple_target_socket_b
Definition: simple_target_socket.h:57
tlm_utils::simple_target_socket_tagged_b::bw_process
friend class bw_process
Definition: simple_target_socket.h:637
tlm::BEGIN_RESP
@ BEGIN_RESP
Definition: phase.hh:43
tlm_utils::simple_target_socket_b::start_of_simulation
void start_of_simulation()
Definition: simple_target_socket.h:142
tlm_utils::simple_target_socket_tagged_b::fw_process::m_get_dmi_user_id
int m_get_dmi_user_id
Definition: simple_target_socket.h:1186
convenience_socket_bases.h
tlm_utils::simple_target_socket_b::fw_process::free
void free(tlm::tlm_generic_payload *trans)
Definition: simple_target_socket.h:578
tlm_utils::simple_target_socket_b::m_bw_process
bw_process m_bw_process
Definition: simple_target_socket.h:614
tlm_utils::simple_target_socket_tagged_b::fw_process::process_handle_class::m_e
sc_core::sc_event m_e
Definition: simple_target_socket.h:1006
tlm_utils::simple_target_socket_tagged_b::fw_process::m_owner
simple_target_socket_tagged_b * m_owner
Definition: simple_target_socket.h:1177
tlm_utils::simple_target_socket_b::register_nb_transport_fw
void register_nb_transport_fw(MODULE *mod, sync_enum_type(MODULE::*cb)(transaction_type &, phase_type &, sc_core::sc_time &))
Definition: simple_target_socket.h:108
tlm_utils::simple_target_socket_b::base_type
tlm::tlm_target_socket< BUSWIDTH, TYPES, 1, POL > base_type
Definition: simple_target_socket.h:86
ArmISA::id
Bitfield< 33 > id
Definition: miscregs_types.hh:247
tlm_utils::simple_target_socket_tagged_b::fw_process::m_peq
peq_with_get< transaction_type > m_peq
Definition: simple_target_socket.h:1187
tlm_utils::simple_target_socket_b::fw_process::TransportDbgPtr
unsigned int(MODULE::* TransportDbgPtr)(transaction_type &)
Definition: simple_target_socket.h:218
tlm::TLM_ACCEPTED
@ TLM_ACCEPTED
Definition: fw_bw_ifs.hh:65

Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17