| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Description File = |
| 4 | |
| 5 | A soclib description file is a python-parseable file, ending in ".sd". |
| 6 | |
| 7 | In fact, it is not so pythonic, using python syntax is just to avoid to write a new parser from scratch and yet having a human-readeable file. |
| 8 | |
| 9 | It's currently used by two tools: |
| 10 | * Soclib-CC, for compiling a platform with automatic template instanciation |
| 11 | * DSX, for complete netlist generation |
| 12 | |
| 13 | It contains: |
| 14 | * Source-file references |
| 15 | * C++ class template instanciation information |
| 16 | * C++ class instanciation information |
| 17 | * Netlist information |
| 18 | * DSX extensions (if needed) |
| 19 | |
| 20 | Later, when IP-Xact (Spirit) packaging will be ready, there will be a conversion tool from this format to IP-Xact. |
| 21 | |
| 22 | == Module == |
| 23 | |
| 24 | Arguments to those declarations are: |
| 25 | |
| 26 | name (mandatory):: |
| 27 | the reference name from anywhere else in SoclibCc. This name is preferably of the form `'type:name'` where type may be: |
| 28 | * caba |
| 29 | * common |
| 30 | * tlmt |
| 31 | classname (mandatory):: |
| 32 | the C++ class name to instanciate, with full namespace, but no template parameters |
| 33 | tmpl_parameters:: |
| 34 | the template parameters, if any. This must be a list of parameters (see below) |
| 35 | header_files:: |
| 36 | header files to include when using this component, paths relative to the sd |
| 37 | implementation_files:: |
| 38 | implementation files to compile, paths relative to the sd |
| 39 | ports:: |
| 40 | ports in the module |
| 41 | instance_parameters:: |
| 42 | needed parameters to instanciate the module. This must be a list of parameters (see below) |
| 43 | |
| 44 | == Signal == |
| 45 | |
| 46 | Arguments are: |
| 47 | name, classname, tmpl_parameters, header_files, implementation_files:: |
| 48 | as above |
| 49 | accepts:: |
| 50 | a dictionnary of port names associated to maximum connection count. |
| 51 | |
| 52 | sample: [source:trunk/soclib/soclib/communication/vci/caba/metadata/vci.sd@289 Vci signal description] |
| 53 | |
| 54 | == !PortDecl == |
| 55 | |
| 56 | Arguments are: |
| 57 | name, classname, tmpl_parameters, header_files, implementation_files:: |
| 58 | as above |
| 59 | signal:: |
| 60 | connectable signal name (in soclib-cc) |
| 61 | |
| 62 | sample: [source:trunk/soclib/soclib/communication/vci/caba/metadata/vci.sd@289 Vci ports description] |
| 63 | |
| 64 | = Parameters = |
| 65 | |
| 66 | == Instance Parameters == |
| 67 | |
| 68 | '''In any parameter, you may specify a default value using''' `default=` |
| 69 | |
| 70 | * `parameter.IntTab` |
| 71 | * arguments: name |
| 72 | * usage: an !IntTab for Vci indexes |
| 73 | * example: `parameter.IntTab('index')` |
| 74 | * sample: [source:trunk/soclib/soclib/module/internal_component/vci_ram/caba/metadata/vci_ram.sd@289#L23 vci_ram.sd, line 23] |
| 75 | * `parameter.Module` |
| 76 | * arguments: name, typename = module type (name declared to soclib-cc) |
| 77 | * usage: passing another module reference, like a mapping table or another component |
| 78 | * example: `parameter.Module('mt', typename = 'common:mapping_table')` |
| 79 | * sample: [source:trunk/soclib/soclib/module/network_component/vci_vgmn/caba/metadata/vci_vgmn.sd@289#L18 vci_vgmn.sd, line 18], |
| 80 | [source:trunk/soclib/soclib/module/internal_component/vci_ram/caba/metadata/vci_ram.sd@289#L25 vci_ram.sd, line 25] |
| 81 | * `parameter.String` |
| 82 | * arguments: name |
| 83 | * example: `parameter.String('input_file', default = 'input.txt')` |
| 84 | * sample: [source:trunk/soclib/soclib/module/internal_component/fifo_reader/caba/metadata/fifo_reader.sd@289#L20 fifo_reader.sd, line 20] |
| 85 | * `parameter.Int` |
| 86 | * arguments: name |
| 87 | * example: `parameter.Int('min_latency', default = 3)` |
| 88 | * sample: [source:trunk/soclib/soclib/module/network_component/vci_vgmn/caba/metadata/vci_vgmn.sd@289#L19 vci_vgmn.sd, line 19] |
| 89 | * `parameter.Bool` |
| 90 | * arguments: name |
| 91 | * example: `parameter.Bool('use_atomic_operations', default = False)` |
| 92 | * `parameter.StringArray` |
| 93 | * arguments: name |
| 94 | * example: `parameter.StringArray('tty_names')` |
| 95 | * sample: [source:trunk/soclib/soclib/module/connectivity_component/vci_multi_tty/caba/metadata/vci_multi_tty.sd@289#L28 vci_multi_tty.sd, line 28] |
| 96 | |
| 97 | == Template parameters == |
| 98 | * `parameter.Module` |
| 99 | * arguments: name |
| 100 | * example: `parameter.Module('iss_t')` |
| 101 | * sample: [source:trunk/soclib/soclib/module/processor_component/iss_wrapper/caba/metadata/iss_wrapper.sd@289#L11 iss_wrapper.sd, line 11] |
| 102 | * `parameter.Bool` |
| 103 | * arguments: name |
| 104 | * example: `parameter.Bool('use_atomic_operations', default = False)` |
| 105 | * sample: [source:trunk/soclib/soclib/lib/metadata/vci_target_fsm.sd@289#L11 vci_target_fsm.sd, line 11] |
| 106 | * `parameter.Type` |
| 107 | * arguments: name |
| 108 | * example: `parameter.Type('word_t')` |
| 109 | * sample: [source:trunk/soclib/soclib/module/internal_component/fifo_reader/caba/metadata/fifo_reader.sd@289#L24 fifo_reader.sd, line 24] |
| 110 | |
| 111 | = Common warnings = |
| 112 | |
| 113 | == !ModuleDeprecationWarning: Deprecation == |
| 114 | |
| 115 | Some modules may be marked as deprecated with a friendly warning until they are removed. You'll get this kind of message when using such a module: |
| 116 | |
| 117 | {{{ |
| 118 | ModuleDeprecationWarning at /Users/nipo/projects/soclib/soclib/lib/mips/metadata/mipsel.sd:10: |
| 119 | Module common:mips deprecated: "Please migrate to Mips32" |
| 120 | }}} |
| 121 | |
| 122 | The message enclosed in quotes at the end is the one specified in [source:/trunk/soclib/soclib/lib/mips/metadata/mips.sd@657#L18 the mips.sd file]. |
| 123 | |
| 124 | == !PartialNameWarning : Lazyness in declaration == |
| 125 | |
| 126 | {{{ |
| 127 | PartialNameWarning at /Users/nipo/projects/soclib/utils/lib/python/soclib_desc/specialization.py:74: |
| 128 | Short name vci_timer is deprecated, please use a full name with caba:, tlmt: or common: |
| 129 | }}} |
| 130 | |
| 131 | Modules have dependencies on other modules. Dependencies can be: |
| 132 | * Ports, example: |
| 133 | {{{ |
| 134 | Port('caba:vci_initiator', 'p_vci') |
| 135 | }}} |
| 136 | * Uses, i.e. uses of another module as sub-module. Example: |
| 137 | {{{ |
| 138 | Uses('caba:vci_target_fsm') |
| 139 | }}} |
| 140 | * Module parameters, example: |
| 141 | {{{ |
| 142 | tmpl_parameters = [ |
| 143 | parameter.Module('vci_param', default = 'caba:vci_param'), |
| 144 | ], |
| 145 | }}} |
| 146 | |
| 147 | When such construct are used, you should write the full name of the module. |
| 148 | Here, it is `caba:vci_initiator`, `caba:vci_target_fsm`, `caba:vci_param`. |
| 149 | |
| 150 | Previously, soclib-cc supported to implicitly use the abstraction level from the parent module, but this has limitations with multi-abstraction level simulations, therefore it is deprecated. |
| 151 | |
| 152 | |
| 153 | == !InvalidComponentWarning: Invalid Definition == |
| 154 | |
| 155 | {{{ |
| 156 | InvalidComponentWarning at /Users/nipo/projects/soclib/soclib/module/verification_component/avci/caba/metadata/avci_filter.sd:68: |
| 157 | Invalid component caba:avci_filter, it will be unavailable. Error: "NoSuchComponent('`vci_param::val_t`',)" |
| 158 | }}} |
| 159 | |
| 160 | This is most probably a syntax or usage error. As parsing of the `.sd` file cant be done, module is disabled. |