Changes between Version 23 and Version 24 of Writing Rules/Caba
- Timestamp:
- Apr 8, 2009, 2:34:53 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/Caba
v23 v24 44 44 Any SoCLib hardware components having a VCI interface is called a ''VCI component'', and must include 45 45 at least one of the the two following files, defining the VCI advanced ports : 46 * [source:trunk/soclib/s ystemc/include/caba/interface/vci_target.h caba/interface/vci_target.h]47 * [source:trunk/soclib/s ystemc/include/caba/interface/vci_initiator.h caba/interface/vci_initiator.h]48 49 As VCI signals can have variable widths, all VCI components must be defined with templates. The [source:trunk/soclib/s ystemc/include/caba/interface/vci_param.h caba/interface/vci_param.h] file contains the definition of the VCI parameters object. This object must be passed as a template parameter to the component.46 * [source:trunk/soclib/soclib/communication/vci/caba/source/include/vci_target.h] 47 * [source:trunk/soclib/soclib/communication/vci/caba/source/include/vci_initiator.h] 48 49 As VCI signals can have variable widths, all VCI components must be defined with templates. The [source:trunk/soclib/soclib/communication/vci/caba/source/include/vci_param.h] file contains the definition of the VCI parameters object. This object must be passed as a template parameter to the component. 50 50 51 51 A typical VCI component declaration is: 52 52 {{{ 53 #include " caba/util/base_module.h"54 #include " caba/interface/vci_target.h"53 #include "base_module.h" 54 #include "vci_target.h" 55 55 56 56 namespace soclib { namespace caba { … … 62 62 63 63 }; 64 64 65 }} 65 66 }}} 66 67 67 68 The SystemC top cell defining the system architecture must include the following file, defining the advanced VCI signals : 68 * [source:trunk/soclib/s ystemc/include/caba/interface/vci_signals.h caba/interface/vci_signals.h].69 * [source:trunk/soclib/soclib/communication/vci/caba/source/include/vci_signals.h]. 69 70 70 71 A SoCLib hardware component that has no VCI interface should use a dedicated VCI wrapper in order to be connected to the VCI interconnect. … … 86 87 In order to simplify the memory map definition, and the hardware component configuration, a 87 88 generic object, called ''mapping table'' has been defined in 88 [source:trunk/soclib/s ystemc/include/common/mapping_table.h common/mapping_table.h].89 [source:trunk/soclib/soclib/lib/mapping_table/include/mapping_table.h mapping_table.h]. 89 90 This is an associative table of memory segments. Any segment must be allocated to one single 90 91 VCI target. The segment object is defined in 91 [source:trunk/soclib/s ystemc/include/common/segment.h common/segment.h],92 [source:trunk/soclib/soclib/lib/segment/include/segment.h segment.h], 92 93 and contains five attributes: 93 94 {{{ … … 136 137 137 138 All structural parameters should be be defined as member variables. The values are generally defined by a constructor argument. 138 Instance name is stored in [source:trunk/soclib/s ystemc/include/common/base_module.h soclib::common::BaseModule], inherited by139 [source:trunk/soclib/s ystemc/include/caba/util/base_module.h soclib::caba::BaseModule].139 Instance name is stored in [source:trunk/soclib/soclib/lib/base_module/include/base_module.h soclib::common::BaseModule], inherited by 140 [source:trunk/soclib/soclib/lib/base_module/include/caba/caba_base_module.h soclib::caba::BaseModule]. 140 141 For example, a VCI target will contain a reference to the the assigned segment, in order to check 141 142 possible segmentation errors during execution. … … 150 151 a VCI index. Moreover, generic simulation models can have structural parameters. The parameter 151 152 values must be defined as constructor arguments, and used by the constructor to configure the hardware ressources. A constructor argument frequently 152 used is a reference on the [source:trunk/soclib/s ystemc/include/common/mapping_table.h soclib::common::MappingTable], that defines the segmentation of the system address space.153 used is a reference on the [source:trunk/soclib/soclib/lib/mapping_table/include/mapping_table.h soclib::common::MappingTable], that defines the segmentation of the system address space. 153 154 A typical VCI component will have the following constructor arguments: 154 155 … … 201 202 == C1) Component definition == 202 203 203 Let's take the [source:trunk/soclib/s ystemc/include/caba/target/vci_locks.h soclib::caba::VciLocks]204 Let's take the [source:trunk/soclib/soclib/module/internal_component/vci_locks/caba/source/include/vci_locks.h soclib::caba::VciLocks] 204 205 component definition and comment it. 205 206 … … 274 275 == C2) Component implementation == 275 276 276 Here is the [source:trunk/soclib/s ystemc/src/caba/target/vci_locks.cc soclib::caba::VciLocks] component implementation:277 Here is the [source:trunk/soclib/soclib/module/internal_component/vci_locks/caba/source/src/vci_locks.cc soclib::caba::VciLocks] component implementation: 277 278 278 279 {{{