{ "info": { "author": "Virgil Dupras", "author_email": "hsoft@hardcoded.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Embedded Systems", "Topic :: System :: Emulators" ], "description": "# ICemu - Emulate Integrated Circuits\n\n`icemu` is a Python library that emulates integrated circuits at the logic level. For example,\nif you want to simulate a circuit with a decoder driving the clock pin of two shift registers,\nit would look like this:\n\n dec = SN74HC138()\n sr1 = CD74AC164()\n sr2 = CD74AC164()\n mcu_pin = OutputPin('PB4')\n\n sr1.pin_CP.wire_to(dec.pin_Y0)\n sr2.pin_CP.wire_to(dec.pin_Y1)\n sr1.pin_DS1.wire_to(mcu_pin)\n sr2.pin_DS1.wire_to(mcu_pin)\n\n print(dec.asciiart())\n _______\n A>|- +|>Y7\n B>|- +|>Y6\n C>|- +|>Y5\n G2A>|- +|>Y4\n G2B>|- +|>Y3\n G1>|+ +|>Y2\n Y0<|-___+|>Y1\n\nYou could then play with pins at your heart contents and have them \"propagate\" through wires and IC\nlogic automatically.\n\n## See it in action\n\nHere's a little video of the simulated `seg7` example (see `examples` folder):\n\n[![asciinema](https://asciinema.org/a/LCF3EGRiJFK1LzXwn2R6XUgGb.png)](https://asciinema.org/a/LCF3EGRiJFK1LzXwn2R6XUgGb)\n\nand here is the video of the **exact same code** running in real life!\n\n[![vimeo](https://i.vimeocdn.com/video/662736875_677x.jpg)](https://vimeo.com/239693641)\n\n## What is it for\n\nThe goal of this library is to facilitate the testing and debugging of embedded software. When we\nrun software on an embedded prototype, it's often hard to debug failures because we don't even\nknow if the problem comes from hardware (wiring, it's always the wiring!) or software. Moreover,\ntesting directly on a prototype often involves significant setup time.\n\nWith emulation, we have a quick setup time, introspection capabilities, all this stuff. We can then\nconfirm the soundness of our logic before sending it to our prototype.\n\n### Killer feature: direct integration with your code\n\nIf you have a circuit with a microcontroller in it, you can simulate the circuit by **directly\nplugging the code you're putting on the MCU** in it. See examples.\n\n### Comparison with Verilog/VHDL\n\nBeing new to the world of electronics, I don't know much about full blown simulation solutions.\nHowever, from what I read about Verilog and VHDL, these tools seem to be about helping to design\n**circuits**.\n\nICemu's goal is not that! Its goal is to help you debug the software you're going to flash on your\nMCU. Python being easily hooked to C, you can, with a little abstraction layer, directly run your\ncode on the simulator and debug it there.\n\nWhat I've read about simulations on Verilog/VHDL simulators is that you supply it with a series of\ninputs you want to send to your circuits. That's insufficient! What I want to do is run my whole,\ncomplex software and have **it** supply the inputs and react to the outputs of my simulated circuit.\n\nThere's a possibility that my newbie-ness made me create a tool that already exists, however, and\nif that happened, please tell me so I can stop working on useless tools.\n\n## Why Python\n\nBecause it's used for debugging purposes, speed is not essential. Also, Python is easy to glue\nwith C.\n\nI've tried writing quick `icemu` prototype in C and Rust, but they were needlessly complicated.\nWith Python, it's easy to write the software and add new chips. Because there's gonna be a *lot*\nof these chips to add, we might as well make this process as fast as possible.\n\n## How to use\n\nYou can install `icemu` with pip on python **3.4+**:\n\n $ pip install --user icemu\n\nThen, you need to recreate your prototype's logic in a small Python program that uses `icemu` and\nwrap that into easy to use functions. Those functions should be designed to receive pin state\nchange from the MCU and apply the logic change into your circuit. Make that program print relevant\ninformation so that you can assert your logic's soundness.\n\nThen, write yourself a small Hardware Abstraction Layer at the pin/register level, embed your\nPython program like a regular C application would do, make your `ifdef`ed functions call helper\nfunctions you've written in your Python program, compile and run!\n\n## Examples\n\nThere are examples in the `examples` folder. Follow instructions in the README file of each example.\n\n## License\n\nLGPLv3, Copyright 2017 Virgil Dupras\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hsoft/icemu", "keywords": "", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "icemu", "package_url": "https://pypi.org/project/icemu/", "platform": "", "project_url": "https://pypi.org/project/icemu/", "project_urls": { "Homepage": "https://github.com/hsoft/icemu" }, "release_url": "https://pypi.org/project/icemu/0.4.0/", "requires_dist": null, "requires_python": "", "summary": "Emulate Integrated Circuits", "version": "0.4.0" }, "last_serial": 3294956, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1701e51fa1be965371c7cdeffa8265ba", "sha256": "8e9a7fdbbefe39d9c1643ba80955dd975dfe4265902fe83f3383cf6ed7beebee" }, "downloads": -1, "filename": "icemu-0.1.0-py3-none-any.whl", "has_sig": true, "md5_digest": "1701e51fa1be965371c7cdeffa8265ba", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 7686, "upload_time": "2017-09-07T17:06:00", "url": "https://files.pythonhosted.org/packages/29/7d/06a7b867ed3c0ea5a6d8b086e97ec164b1b907b4bb1fbe79f50d8bd7cd67/icemu-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "93c2b49fe9506eae4a5ecd4ee94b0652", "sha256": "24c6bd6a022c18d37fd233c7e02065d653ff345002a41f36b3fc64ad5bbffc9d" }, "downloads": -1, "filename": "icemu-0.1.0.tar.gz", "has_sig": true, "md5_digest": "93c2b49fe9506eae4a5ecd4ee94b0652", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4238, "upload_time": "2017-09-07T17:05:55", "url": "https://files.pythonhosted.org/packages/93/ab/b7241a3ed6090805b1cedf60ee1d42bf827b71a8abb065202314ddbd10a3/icemu-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "75406c89522be7b4f585796f83d821d8", "sha256": "ff59bf8c2d8f60b3631d39c4bf529e212d6bcd9ea028dc1464a8dc7d41303dc3" }, "downloads": -1, "filename": "icemu-0.1.1-py3-none-any.whl", "has_sig": true, "md5_digest": "75406c89522be7b4f585796f83d821d8", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 9845, "upload_time": "2017-09-08T01:31:05", "url": "https://files.pythonhosted.org/packages/87/92/9e1100b82fccaee4a17b48aa5afd4a17a1db937afe17f185d4f69d952afa/icemu-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "001fe37513e71fecb1f0400842d98cd8", "sha256": "553cdcead90fdd5710c139d17c28602979a75a0c41dab0e020a1f2bb6ffd519f" }, "downloads": -1, "filename": "icemu-0.1.1.tar.gz", "has_sig": true, "md5_digest": "001fe37513e71fecb1f0400842d98cd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5879, "upload_time": "2017-09-08T01:31:02", "url": "https://files.pythonhosted.org/packages/ec/48/3aad655637a56472631813fe9084334321aa7ff837980448370d00b91de1/icemu-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ab9a36e29b06a7c46954759028aba2c0", "sha256": "7138753648b04b8e3f302a45f4f091521c88ad5d45c41b78b323b1c4b3dc4990" }, "downloads": -1, "filename": "icemu-0.2.0-py3-none-any.whl", "has_sig": true, "md5_digest": "ab9a36e29b06a7c46954759028aba2c0", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11877, "upload_time": "2017-09-22T02:09:51", "url": "https://files.pythonhosted.org/packages/6e/d1/bd7b6ca262e49a370b4c7fc840f5667c57aa3c1f7b87552da5aba47a870b/icemu-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e34c2eb8c715689bde54dd5acfb3c739", "sha256": "44af26703198ab7b425e0f2b2d7cf42c068a033109a830d24fe7e06ad679fd0a" }, "downloads": -1, "filename": "icemu-0.2.0.tar.gz", "has_sig": true, "md5_digest": "e34c2eb8c715689bde54dd5acfb3c739", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7057, "upload_time": "2017-09-22T02:09:49", "url": "https://files.pythonhosted.org/packages/84/db/e0329529711cc41f99c3b618cf296d9c69b70a27609d4d186caeaba82fbc/icemu-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5ceae1acb7698c845ea57e2dfe21bc17", "sha256": "4353ea37ff728c85f1b1adb83601b5e593ab4a3ed2d963afc3681bebfc673103" }, "downloads": -1, "filename": "icemu-0.3.0-py3-none-any.whl", "has_sig": true, "md5_digest": "5ceae1acb7698c845ea57e2dfe21bc17", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 16279, "upload_time": "2017-10-23T22:35:12", "url": "https://files.pythonhosted.org/packages/59/53/fc18849bdfb8509b01506d28a85fb7c7bf89463ab1d87db93854b8f53dcf/icemu-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bc1b3a2b20caed738ca2b99657147a0f", "sha256": "b86cb2cc37169a5d0f85f25241275ce5a564c72b2238704fdcf58fc3c01d576a" }, "downloads": -1, "filename": "icemu-0.3.0.tar.gz", "has_sig": true, "md5_digest": "bc1b3a2b20caed738ca2b99657147a0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12607, "upload_time": "2017-10-23T22:35:10", "url": "https://files.pythonhosted.org/packages/cb/f3/f4b34ea3d913a602912e71315bdaabd81f94324860bf4019ca75901b13ca/icemu-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "c687ac6732a0de9bc75bb95350d95296", "sha256": "a01ee6db0b36adab45820e4b20c3359c5e0736b13d027ffc8cad05d403d526b9" }, "downloads": -1, "filename": "icemu-0.4.0-py3-none-any.whl", "has_sig": true, "md5_digest": "c687ac6732a0de9bc75bb95350d95296", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 18719, "upload_time": "2017-10-31T17:17:42", "url": "https://files.pythonhosted.org/packages/a5/33/e4848cda809e6911f28c6e0e7262af8ca325c8c8cf892ca40f102c7f19e0/icemu-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9b18c0bea4047b43cd05181eb3d9f2ab", "sha256": "dc9dc0084655a40b1d6d718a507d55496138811c9f6147311cdbf202c37dad6e" }, "downloads": -1, "filename": "icemu-0.4.0.tar.gz", "has_sig": true, "md5_digest": "9b18c0bea4047b43cd05181eb3d9f2ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14681, "upload_time": "2017-10-31T17:17:41", "url": "https://files.pythonhosted.org/packages/ce/f4/c4eaa319aff2c45c80e528a483d6c139afe1b88fbfc758a1ee0a28ba0979/icemu-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c687ac6732a0de9bc75bb95350d95296", "sha256": "a01ee6db0b36adab45820e4b20c3359c5e0736b13d027ffc8cad05d403d526b9" }, "downloads": -1, "filename": "icemu-0.4.0-py3-none-any.whl", "has_sig": true, "md5_digest": "c687ac6732a0de9bc75bb95350d95296", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 18719, "upload_time": "2017-10-31T17:17:42", "url": "https://files.pythonhosted.org/packages/a5/33/e4848cda809e6911f28c6e0e7262af8ca325c8c8cf892ca40f102c7f19e0/icemu-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9b18c0bea4047b43cd05181eb3d9f2ab", "sha256": "dc9dc0084655a40b1d6d718a507d55496138811c9f6147311cdbf202c37dad6e" }, "downloads": -1, "filename": "icemu-0.4.0.tar.gz", "has_sig": true, "md5_digest": "9b18c0bea4047b43cd05181eb3d9f2ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14681, "upload_time": "2017-10-31T17:17:41", "url": "https://files.pythonhosted.org/packages/ce/f4/c4eaa319aff2c45c80e528a483d6c139afe1b88fbfc758a1ee0a28ba0979/icemu-0.4.0.tar.gz" } ] }