Changes between Version 3 and Version 4 of Writing Rules/General
- Timestamp:
- Apr 27, 2007, 12:18:38 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Rules/General
v3 v4 5 5 [[PageOutline]] 6 6 7 = A)Naming conventions =7 = Naming conventions = 8 8 9 '''namespaces''' 9 == Namespaces == 10 10 11 11 SystemC being build upon C++, we use the C++ namespace constructs, to create unambiguous names. … … 14 14 * `soclib::common` 15 15 * `soclib::caba` 16 * `soclib::tlmt`16 * `soclib::tlmt` 17 17 18 '''variables''' 18 == Variables == 19 19 20 20 The following conventions have been defined : … … 23 23 * All component member variable names should be prefixed with `m_` 24 24 25 = B)VCI initiators and targets indexation =25 = VCI initiators and targets indexation = 26 26 27 27 In a VCI-based architecture, all initiators and targets must be indexed. Initiators and targets have different address spaces. 28 * The target index is used by interconnect components : those components decode the VCI address MSB bits to get the target index and route the VCI command packets.29 * The initiator index is used by the interconnect components to route the VCI response packets : the initiator index is the VCI SRCID value.28 * The target index is used by interconnect components to route the VCI command packets : the target index is decoded from VCI ADDRESS MSBs. 29 * The initiator index is used by the interconnect components to route the VCI response packets : the initiator index is the VCI RSRCID. 30 30 31 31 Indexes can be : 32 32 * a simple scalar index, in case of a ''flat'' interconnect. 33 * a composite index, in case of a ''clusterised'' architecture, using a two level hierarchical interconnect. Each component is identified by two scalars: cluster_index, local_index.33 * a composite index, in case of a ''clusterised'' architecture, using a two-level (or more) hierarchical interconnect. 34 34 35 The `common/int_tab.h`file defines an utility class storing a list of indexes : All indexes must be declared as IntTabs.35 [source:trunk/soclib/systemc/include/common/int_tab.h "include/common/int_tab.h"] defines an utility class storing a list of indexes. 36 36 37 = C) Endianness = 37 All indexes must be declared as IntTabs. 38 38 39 All SoCLib targets components respect the little-endianness convention. 40 In case of write, the bytes transfers are fully controlled by the VCI BE bits : 41 * If the VCI word is larger than one byte, the LSB bits of the VCI ADDRESS are ignored, and the VCI ADDRESS is only used to address the selected VCI word. 42 * the selected bytes are specified the VCI BE field, and the BE0 bit is always associated to the Byte 0 of the VCI WDATA field. 43 39 = Endianness = 40 41 All SoCLib targets components are little-endian. 42 In case of write, the bytes positions are fully controlled by the VCI BE bits : 43 * LSBs of the VCI ADDRESS are ignored, and the VCI ADDRESS is only used to select a VCI cell (a word in memory). 44 * Bytes are selected by the VCI BE field, and the BE![0] bit is always associated to the Byte 0 of the VCI WDATA field (ie WDATA![7:0]).