| 1 | | [wiki:Component SocLib Components General Index] |
| 2 | | |
| 3 | | '''UNDER DEVELOPMENT''' |
| 4 | | |
| 5 | | = ARM966 Processor Functional Description = |
| 6 | | |
| 7 | | This hardware component is a ARM966 processor core. This is only an ISS, which should be wrapped with an [wiki:Component/IssWrapper IssWrapper]. |
| 8 | | |
| 9 | | The simulation model is actually an instruction set simulator with an ARM966 pipeline. |
| 10 | | |
| 11 | | Currently it only exists in bigendian form. |
| 12 | | |
| 13 | | = IMPORTANT: steps to apply before using the ARM966 = |
| 14 | | |
| 15 | | Before compiling any SoClib simulator using the ARM966 you will need to download the UNISIM ([http://www.unisim.org]) library (well, just a piece of it, the unisim_lib). |
| 16 | | |
| 17 | | To do so just download it using svn from [https://unisim.org/svn/devel/unisim_lib] with the following command: |
| 18 | | * svn export https://unisim.org/svn/devel/unisim_lib |
| 19 | | |
| 20 | | You will have to enter a username and password. If you do not have access to the UNISIM development, you can simply use 'guest' for username (no password required). |
| 21 | | Once you have downloaded UNISIM you will need to create a link in trunk/soclib/lib/arm966/include/iss/ and trunk/soclib/lib/arm966/src/iss/ to <your_path_to_unisim_lib>/unisim. |
| 22 | | |
| 23 | | If you wish you can download the full UNISIM library by downloading unisim_tools and unisim_simulators: |
| 24 | | * svn export https://unisim.org/svn/devel/unisim_tools |
| 25 | | * svn export https://unisim.org/svn/devel/unisim_simulators |
| 26 | | |
| 27 | | Finally you will have to set your soclib.conf (source:trunk/soclib/utils/conf/soclib.conf) file to compile correctly the ARM966 component. Here you have an example of configuration that correctly sets the flags to compile ARM966: |
| 28 | | {{{ |
| 29 | | # -*- python -*- |
| 30 | | |
| 31 | | def _platform(): |
| 32 | | """ |
| 33 | | Retrieves platform information and make it look-like systemc's |
| 34 | | lib-xxx thing. |
| 35 | | |
| 36 | | Working so far with: |
| 37 | | * linux |
| 38 | | * darwin |
| 39 | | """ |
| 40 | | import sys |
| 41 | | pf = sys.platform |
| 42 | | # Strip numeric suffix from platform name |
| 43 | | while pf[-1] in "0123456789": |
| 44 | | pf = pf[:-1] |
| 45 | | |
| 46 | | remap_pf = {'darwin':'macosx'} |
| 47 | | if pf in remap_pf: |
| 48 | | pf = remap_pf[pf] |
| 49 | | return pf |
| 50 | | |
| 51 | | config.systemc = Config( |
| 52 | | base = config.systemc, |
| 53 | | dir = "${SYSTEMC}", |
| 54 | | os = _platform(), |
| 55 | | ) |
| 56 | | |
| 57 | | config.my_toolchain = Config( |
| 58 | | base = config.toolchain, |
| 59 | | cflags = ['-ggdb', '-DSOCLIB', '-D__STDC_CONSTANT_MACROS', '-Wall', '-Wno-pmf-conversions'], |
| 60 | | ) |
| 61 | | |
| 62 | | config.default = Config( |
| 63 | | base = config.build_env, |
| 64 | | systemc = config.systemc, |
| 65 | | toolchain = config.my_toolchain, |
| 66 | | repos = "/tmp/build/sc", |
| 67 | | ) |
| 68 | | }}} |
| 69 | | The flags you will need to compile the ARM966 component are: -DSOCLID and -D!__STDC_CONSTANT_MACROS. In the previous example you can see that the default toolchain has been augmented to define those flags. |
| 70 | | |
| 71 | | = Component definition = |
| 72 | | |
| 73 | | Available in source:trunk/soclib/soclib/lib/arm966/metadata/arm966.sd |
| 74 | | |
| 75 | | == Usage == |
| 76 | | |
| 77 | | ARM966 has no parameters. |
| 78 | | {{{ |
| 79 | | Uses('iss_wrapper', iss_t = 'common:arm966') |
| 80 | | }}} |
| 81 | | |
| 82 | | = ARM966 Processor ISS Implementation = |
| 83 | | |
| 84 | | The implementation is in |
| 85 | | * source:trunk/soclib/lib/arm966/include/iss/arm966.h |
| 86 | | * source:trunk/soclib/lib/arm966/src/iss/arm966.cpp |
| 87 | | |
| 88 | | The previous files use the ARM966 implementation provided in the UNISIM library. |
| 89 | | |
| 90 | | == Template parameters == |
| 91 | | |
| 92 | | This component has no template parameters. |
| 93 | | |
| 94 | | == Constructor parameters == |
| 95 | | |
| 96 | | {{{ |
| 97 | | ARM966Iss( |
| 98 | | sc_module_name name, // Instance Name |
| 99 | | int ident); // processor id |
| 100 | | }}} |
| 101 | | |
| 102 | | == Visible registers == |
| 103 | | |
| 104 | | '''UNDER DEVELOPMENT''' |
| 105 | | |
| 106 | | == Interrupts == |
| 107 | | |
| 108 | | '''UNDER DEVELOPMENT''' |
| 109 | | |
| 110 | | The handling and prioritization of the interrupts is deferred to software. |
| 111 | | |
| 112 | | == Ports == |
| 113 | | |
| 114 | | None, it is to the wrapper to provide them. |
| 115 | | |
| 116 | | = Compiling programs for ARM966 with !SoClib = |
| 117 | | |
| 118 | | Before compiling a program for the ARM966 with the !SoClib framework you will need to define some system variables (usually on the ~/.soclib/soft_compilers.conf) needed to find the ARM compiler. Below you have an example: |
| 119 | | {{{ |
| 120 | | arm966_CC_PREFIX = armv5b-softfloat-linux- |
| 121 | | arm966_CFLAGS = -nostdinc -gstabs+ |
| 122 | | arm966_LDFLAGS = -nostdlib |
| 123 | | }}} |
| | 1 | This component is deprecated and got removed at [1672]. |
| | 2 | If you want to try (without support), you can search through history of this page and SVN. |