Code Monkey home page Code Monkey logo

computer-architecture's People

Contributors

jordan-cottle avatar

Watchers

 avatar

computer-architecture's Issues

Implement Risc-V register scheme

The risc-v instruction set has a specific use for registers. To make the cpu behave like a risc-v cpu, we need to make sure the registers match.

Implement byte addressed memory

For the instructions in the isa to make sense, the cpu must operate on a byte addressable memory.

Currently the memory acts more like an array of objects and separate ones are needed for int, float, and instruction data.

The memory in the simulation should store bytes that can be addressed individually.

Add second cpu

The second cpu should use the memory bus to coordinate with cpu 1.

The second cpu runs program 2, while the first cpu runs program 1.

part of #50

Implement unit tests

Convert .cpp files in a test directory into .report files.

Python script for compiling a test module, executing it, and generating the report file.

A second python script then would go through the root test directory and invoke the first script on each file. A final report can be collected at the end.

Add this process to the github action to enforce no tests are broken with each PR.

Set up CPU0.s for execution

Assignment 3 Part 1 provides a CPU0.s file for executing on our simulator.

It contains instructions for the logic of an algorithm but does not set up the memory beforehand.

The CPU and simulation set up should be done prior and be separate from other files so that they can all be run. Switching between tests like I've been doing so far is tedious and it'd be nice to keep adding to the suite that can be run all at once.

Fix cpu register bank sizes

The cpu in the simulation should have 32 integer registers and 32 floating point registers, both 32 bits wide.

Fix tests

#67 made sweeping changes to the project and caused a ton of compilation errors with some of the tests.

The tests are the only think keeping me sane, so I need to fix them.

Implement memory bus

Memory bus should be able to take requests from arbitrary cpus and handle balancing the single memory between the two.

Conflicting requests should be handled by rescheduling one of them.

Use event for ticking devices

Since most devices right now need to tick on each clock cycle, the simulation is doing that manually.

Use events to trigger a tick on each device instead of calling it manually by the sim.

Implement assembly macros

The programs given to use use some of the macros defined by riscv. These don't mean anything to the actual computer, they are just make writing the assembly easier.

Only the ones used in the provided programs need to be implemented.

Update event system

Use events for devices to signal a need to process something.

Events shouldn't be used to pass data around, the devices should have a mechanism for doing that directly. Ex: pipelines should stage() instructions into their neighbors directly, not with PipelineInsertEvents

This should dramatically simplify the Event class to only require a time, type and device. The subclasses behavior can all be collapsed and logic placed into the devices.

Implement pseudo instructions

The programs given to use use a subset of the pseudoinstructions. For this assignment I only need to implement the ones needed for the given programs.

Render the pseudoinstructions into their actual instructions at link time. The binary loaded by the simulation should have no pseudoinstruction details.

Implement RAM

The RAM should be designed to emulate the structure and behavior of a real cpu.

Implement needed instructions first

With the due date coming up, I may not have the time to implement all of the instructions in all of the extensions.

Start with just the ones in the provided programs. The unused ones can be implemented last so that things like the memory bus and multiple cores have a better chance of getting done.

Fix flush

Flush of the pipeline does not clean events that are in flight.

Implement instruction latencies

Different types of instructions should take different amounts of time in the cpu.

RV32I instructions = 1 CPU cycle (10 sim ticks)
RV32M instructions = 2 CPU cycles (20 sim ticks)
RV32F instructions = 5 CPU cycles (50 sim ticks)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.