From 44f2a4a37c095e9cc7bfaa7919785c3d373c64e2 Mon Sep 17 00:00:00 2001 From: Maxime Chéramy Date: Fri, 22 May 2015 15:50:33 +0200 Subject: [PATCH] Update documentation and add a script example. --- docs/conf.py | 6 +++--- docs/doctrees/environment.pickle | Bin 40217 -> 0 bytes docs/doctrees/faq.doctree | Bin 6469 -> 0 bytes docs/doctrees/index.doctree | Bin 4737 -> 0 bytes docs/doctrees/introduction.doctree | Bin 25926 -> 0 bytes docs/doctrees/licenses.doctree | Bin 8108 -> 0 bytes docs/doctrees/modules.doctree | Bin 274774 -> 0 bytes docs/doctrees/text_mode.doctree | Bin 24794 -> 0 bytes docs/doctrees/write_scheduler.doctree | Bin 37734 -> 0 bytes docs/html/.buildinfo | 2 +- docs/html/_sources/text_mode.txt | 23 +++++++++++++++-------- docs/html/faq.html | 2 +- docs/html/genindex.html | 20 +++----------------- docs/html/index.html | 2 +- docs/html/introduction.html | 2 +- docs/html/licenses.html | 2 +- docs/html/modules.html | 31 ++----------------------------- docs/html/objects.inv | Bin 1231 -> 0 bytes docs/html/py-modindex.html | 2 +- docs/html/search.html | 2 +- docs/html/searchindex.js | 2 +- docs/html/text_mode.html | 24 +++++++++++++++--------- docs/html/write_scheduler.html | 2 +- docs/text_mode.rst | 23 +++++++++++++++-------- misc/script.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 25 files changed, 112 insertions(+), 83 deletions(-) create mode 100755 misc/script.py diff --git a/docs/conf.py b/docs/conf.py index 1134b43..4309cc7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -43,16 +43,16 @@ master_doc = 'index' # General information about the project. project = u'SimSo' -copyright = u'2013, Maxime Chéramy' +copyright = u'2013-2015, Maxime Chéramy' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.1' +version = '0.8' # The full version, including alpha/beta/rc tags. -release = '0.1' +release = '0.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/doctrees/environment.pickle b/docs/doctrees/environment.pickle index 67e4852..19f222c 100644 Binary files a/docs/doctrees/environment.pickle and b/docs/doctrees/environment.pickle differ diff --git a/docs/doctrees/faq.doctree b/docs/doctrees/faq.doctree index b4949ad..5e72d96 100644 Binary files a/docs/doctrees/faq.doctree and b/docs/doctrees/faq.doctree differ diff --git a/docs/doctrees/index.doctree b/docs/doctrees/index.doctree index 43287de..bee4c29 100644 Binary files a/docs/doctrees/index.doctree and b/docs/doctrees/index.doctree differ diff --git a/docs/doctrees/introduction.doctree b/docs/doctrees/introduction.doctree index 88e2aa1..39fc478 100644 Binary files a/docs/doctrees/introduction.doctree and b/docs/doctrees/introduction.doctree differ diff --git a/docs/doctrees/licenses.doctree b/docs/doctrees/licenses.doctree index 022bcf8..a6c580e 100644 Binary files a/docs/doctrees/licenses.doctree and b/docs/doctrees/licenses.doctree differ diff --git a/docs/doctrees/modules.doctree b/docs/doctrees/modules.doctree index 17633fb..f0d7215 100644 Binary files a/docs/doctrees/modules.doctree and b/docs/doctrees/modules.doctree differ diff --git a/docs/doctrees/text_mode.doctree b/docs/doctrees/text_mode.doctree index 465ff93..32512cd 100644 Binary files a/docs/doctrees/text_mode.doctree and b/docs/doctrees/text_mode.doctree differ diff --git a/docs/doctrees/write_scheduler.doctree b/docs/doctrees/write_scheduler.doctree index 6eacf5c..4049617 100644 Binary files a/docs/doctrees/write_scheduler.doctree and b/docs/doctrees/write_scheduler.doctree differ diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo index 0e9f691..217ec49 100644 --- a/docs/html/.buildinfo +++ b/docs/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 0f051803cb376160792863ce353e53c6 +config: 8d6238250f69b97f9d900e69d2ee510c tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/html/_sources/text_mode.txt b/docs/html/_sources/text_mode.txt index 1ff13cd..b0dff77 100644 --- a/docs/html/_sources/text_mode.txt +++ b/docs/html/_sources/text_mode.txt @@ -11,7 +11,7 @@ Loading a configuration using a simulation file A :class:`Configuration ` can be initialized with a file passed to its constructor:: - configuration = Configuration(argv[0]) + configuration = Configuration(argv[1]) The configuration could also be partial and completed by the script. Finally, the configuration can be checked for correctness using the :meth:`check_all ` method:: @@ -37,10 +37,14 @@ And of course processors:: configuration.add_processor(name="CPU 1", identifier=1) -Finally, a scheduler is also required:: +Finally, a scheduler is also required. For that, it's possible to use a custom scheduler:: + + configuration.scheduler_info.filename = "examples/RM.py" + +Or one of the schedulers embedded with SimSo:: + + configuration.scheduler_info.clas = "simso.schedulers.RM" - configuration.scheduler_info.set_name("examples/RM.py", - configuration.cur_dir) Creating the Model ------------------ @@ -67,10 +71,11 @@ The following script simulate a system loading from a simulation file or configu from simso.core import Model from simso.configuration import Configuration + def main(argv): - if len(argv) == 1: + if len(argv) == 2: # Configuration load from a file. - configuration = Configuration(argv[0]) + configuration = Configuration(argv[1]) else: # Manual configuration: configuration = Configuration() @@ -89,8 +94,8 @@ The following script simulate a system loading from a simulation file or configu configuration.add_processor(name="CPU 1", identifier=1) # Add a scheduler: - configuration.scheduler_info.set_name("examples/RM.py", - configuration.cur_dir) + #configuration.scheduler_info.filename = "examples/RM.py" + configuration.scheduler_info.clas = "simso.schedulers.RM" # Check the config before trying to run it. configuration.check_all() @@ -105,6 +110,8 @@ The following script simulate a system loading from a simulation file or configu for log in model.logs: print(log) + main(sys.argv) + More details ------------ diff --git a/docs/html/faq.html b/docs/html/faq.html index 10c61f0..5018a02 100644 --- a/docs/html/faq.html +++ b/docs/html/faq.html @@ -14,7 +14,7 @@