{"id":17239869,"url":"https://github.com/pbui/psim","last_synced_at":"2025-03-26T03:12:44.910Z","repository":{"id":86545708,"uuid":"479446041","full_name":"pbui/psim","owner":"pbui","description":"Simple assembler/simulator suite for the ISA found in Vahid's Digital Design textbook","archived":false,"fork":false,"pushed_at":"2022-04-08T15:35:17.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T00:31:49.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbui.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-08T15:34:56.000Z","updated_at":"2022-04-08T15:35:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"10666b5d-fbb3-4904-8f75-a7ba01dbc817","html_url":"https://github.com/pbui/psim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbui%2Fpsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbui%2Fpsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbui%2Fpsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbui%2Fpsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbui","download_url":"https://codeload.github.com/pbui/psim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245579677,"owners_count":20638679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T05:49:58.545Z","updated_at":"2025-03-26T03:12:44.888Z","avatar_url":"https://github.com/pbui.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"--------------------------------------------------------------------------------\nPSIM\n--------------------------------------------------------------------------------\n\nAuthor\n------\n\nPeter Bui \u003cpbui@cse.nd.edu\u003e\n\n--------------------------------------------------------------------------------\n\nDescription\n-----------\n\nPSIM is simple assembler/simulator suite for the ISA found in Vahid's Digital\nDesign textbook.  The syntax of the assembler mostly follows that of the\ntextbook with the exception that semi-colons are not needed at the end of each\nassembly line.  Likewise, the code is split into a data and text segment\nresembling that of MIPS.  This is because the simulator uses a unified memory\narchitecture.  Example assembly source code is available in this package.\n\nThe software is still requires testing and bug checking, so please free feel to\nfile bug reports or suggestions.\n\n--------------------------------------------------------------------------------\n\nChangeLog\n---------\n\n*   11/07/2007\n    -\tAssembler supports MOVR R1, R0, @A (ie. label constant for MOVR)\n    -\tAssembler supports WORD 0, 1, 2, 3, 4 (ie. comma separated array)\n\n*   11/06/2007\n    -\tChanged pasm to output either unified memory or non-unified memory\n\tbinary file (psim requires unified memory, default is non-unified\n\tmemory that works with verilog)\n\n*   11/01/2007\n    -\tSupport files made on Windows (ie. \\r\\n end of lines)\n    -\tAssembler outputs error when label is undefined\n\n*   10/18/2007\n    -\tImplemented MOV I/O assembler and simulator instruction\n\n*   10/16/2007\n    -   Implemented MOVR\n    -   Added Address-field type to assembler so that you can load actual\n\taddresses:\n\tMOV    R0, @A   // Converts address of label A to constant\n    -   Changed assembler to use token_is_* helper functions (this fixes the\n\tJMP label bug)\n\n--------------------------------------------------------------------------------\n\nKnown Bugs/Issues\n-----------------\n\n*   10/11/2007: JMP, JMPN, JMPZ only work w/ labels and not numeric offsets\n    10/16/2007: Fixed in latest version\n\n*   10/11/2007: Labels must be on the same line as instruction:\n    Foo:\n\t    MOV\t    R0, #1  // Invalid\n    Foo:    MOV\t    R0, #1  // Valid\n\n*   10/16/2007: Non-existant labels do not throw error in assembler\n    11/01/2007: Fixed in latest version\n\n*   10/16/2007: pasm doesn't handle multiple files correctly\n    10/17/2007: Fixed in latest version\n\n--------------------------------------------------------------------------------\n\nBuild\n-----\n\nExtract the tarball and run make:\n\n$   tar -xzvf psim.tar.gz\n$   cd psim\n$   make\n\n--------------------------------------------------------------------------------\n\nUsage\n-----\n\nTo use the assembler:\n\n$   ./pasm ex1.s\n\nThis will create a non-unified memory binary output file ex1.bin\n\n$   ./pasm u ex1.s\n\nThis will create a unified memory binary output file ex1.ubin\n\nTo use the simulator:\n\n    Command   Description\n    ---------------------------------------------\n    l \u003cfile\u003e  Load binary file (must be unified memory)\n    i \u003cp\u003e \u003cv\u003e Set pregister \u003cp\u003e to \u003cv\u003e\n    o         Print i/o pregister file\n    p         Print register file, i/o, and memory\n    m \u003cs\u003e \u003ce\u003e Print memory regions from s to e (s defaults to 0, e to end of memory)\n    r         Print register file\n    s \u003cn\u003e     Step n times (n defaults to 1)\n    q         Quit this program\n\n$   ./psim\n[0000]-\u003e l ex1.ubin\n[0001]-\u003e p\n[0002]-\u003e i 2 50\n[0003]-\u003e s 100\n[0004]-\u003e r\n[0005]-\u003e q\n\nThis loads the source binary, prints out the register, io, and memory contents,\nsets io p-register 2 to 50, steps 100 times, prints out the register contents\nand then quits.  Check out the help message by entering 'h' into psim to find\nout about the other commands in the simulator.\n\n--------------------------------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbui%2Fpsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbui%2Fpsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbui%2Fpsim/lists"}