Giter VIP home page Giter VIP logo

gt-cs2110 / lc3tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chiragsakhuja/lc3tools

3.0 0.0 6.0 9.8 MB

Fixing bugs in the complete overhaul of the LC-3 simulator used in EE 306 at The University of Texas at Austin so we can use it in CS 2110 at the Georgia Institute of Technology at Atlanta

License: Apache License 2.0

Shell 0.28% JavaScript 6.57% C++ 73.65% Python 4.46% C 0.05% Assembly 3.04% CMake 0.58% Vue 11.12% EJS 0.14% CSS 0.10%

lc3tools's People

Stargazers

 avatar  avatar  avatar

lc3tools's Issues

yarn is yarnpkg

On Ubuntu 23.10, the build command "yarn" is called "yarnpkg" so the build instructions should mention that. (There is a "yarn" tool which tests scenarios on Unix.)

LC3Tools should not ignore commas

Currently, you can write stuff like NOT R3 R3 or even NOT R3,,,,,,,,,,,R3 and LC3Tools doesn't care. We should make it more strict about this, because students are writing things like NOT R3 R3 on quizzes and homeworks

Merging changes back into original repository

I just found this fork of LC3Tools and it looks like y'all have made quite a few thoughtful additions and bugfixes. Thank you for supporting the project to make up for my lack thereof!

I'm wanting to merge your changes back into main repository, but I have a couple of questions before doing so.

  1. Is master in this repository guaranteed to be stable?
  2. Have any changes been made that deviate from the ISA defined by the textbook? For example, are there any changes made to adapt the simulator to teaching decisions for CS 2110?

Add a timer interrupt

Add a super basic timer interrupt to devices.{cpp,h} and hook it up in simulator.cpp. This would make a basic interrupt example way simpler in lecture. I went through a full keyboard interrupt example in lecture and it just about put all the students to sleep, just too complicated for an initial example

Build fails on Linux

Trying to build on Ubuntu 23.10. Cloned repo, made build directory, ran Cmake twice:

$ cmake -DCMAKE_BUILD_TYPE=Release ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0

(Note the deprecation warning. Not the big problem, but easy to fix.)

Ran make:


$ make
[  1%] Building CXX object src/backend/CMakeFiles/lc3core.dir/asm_types.cpp.o
[  3%] Building CXX object src/backend/CMakeFiles/lc3core.dir/assembler.cpp.o
[  5%] Building CXX object src/backend/CMakeFiles/lc3core.dir/callback.cpp.o
[  7%] Building CXX object src/backend/CMakeFiles/lc3core.dir/converter.cpp.o
In file included from /home/aaron/lc3tools/src/backend/converter.cpp:15:
/home/aaron/lc3tools/src/backend/mem.h:18:29: error: expected ‘)’ before ‘value’
   18 |         MemLocation(uint16_t value, std::string const & line) : MemLocation(value, line, false) { }
      |                    ~        ^~~~~~
      |                             )
/home/aaron/lc3tools/src/backend/mem.h:19:29: error: expected ‘)’ before ‘value’
   19 |         MemLocation(uint16_t value, std::string const & line, bool is_orig) :
      |                    ~        ^~~~~~
      |                             )
/home/aaron/lc3tools/src/backend/mem.h:22:9: error: ‘uint16_t’ does not name a type
   22 |         uint16_t getValue(void) const { return value; }
      |         ^~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:9:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    8 | #include <iostream>
  +++ |+#include <cstdint>
    9 | 
/home/aaron/lc3tools/src/backend/mem.h:25:23: error: ‘uint16_t’ has not been declared
   25 |         void setValue(uint16_t value) { this->value = value; }
      |                       ^~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:33:9: error: ‘uint16_t’ does not name a type
   33 |         uint16_t value;
      |         ^~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:33:9: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/aaron/lc3tools/src/backend/mem.h: In constructor ‘lc3::core::MemLocation::MemLocation()’:
/home/aaron/lc3tools/src/backend/mem.h:17:51: error: no matching function for call to ‘lc3::core::MemLocation::MemLocation(int, const char [1])’
   17 |         MemLocation(void) : MemLocation(0x0000, "") {}
      |                                                   ^
/home/aaron/lc3tools/src/backend/mem.h:17:9: note: candidate: ‘lc3::core::MemLocation::MemLocation()’
   17 |         MemLocation(void) : MemLocation(0x0000, "") {}
      |         ^~~~~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:17:9: note:   candidate expects 0 arguments, 2 provided
/home/aaron/lc3tools/src/backend/mem.h:14:11: note: candidate: ‘lc3::core::MemLocation::MemLocation(const lc3::core::MemLocation&)’
   14 |     class MemLocation
      |           ^~~~~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:14:11: note:   candidate expects 1 argument, 2 provided
/home/aaron/lc3tools/src/backend/mem.h:14:11: note: candidate: ‘lc3::core::MemLocation::MemLocation(lc3::core::MemLocation&&)’
/home/aaron/lc3tools/src/backend/mem.h:14:11: note:   candidate expects 1 argument, 2 provided
/home/aaron/lc3tools/src/backend/mem.h: In member function ‘void lc3::core::MemLocation::setValue(int)’:
/home/aaron/lc3tools/src/backend/mem.h:25:47: error: ‘class lc3::core::MemLocation’ has no member named ‘value’
   25 |         void setValue(uint16_t value) { this->value = value; }
      |                                               ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/c++allocator.h:33,
                 from /usr/include/c++/13/bits/allocator.h:46,
                 from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bitset:52,
                 from /home/aaron/lc3tools/src/backend/converter.cpp:5:
/usr/include/c++/13/bits/new_allocator.h: In instantiation of ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = lc3::core::MemLocation; _Args = {short unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool}; _Tp = lc3::core::MemLocation]’:
/usr/include/c++/13/bits/alloc_traits.h:537:17:   required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = lc3::core::MemLocation; _Args = {short unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool}; _Tp = lc3::core::MemLocation; allocator_type = std::allocator<lc3::core::MemLocation>]’
/usr/include/c++/13/bits/vector.tcc:117:30:   required from ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {short unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool}; _Tp = lc3::core::MemLocation; _Alloc = std::allocator<lc3::core::MemLocation>]’
/home/aaron/lc3tools/src/backend/converter.cpp:55:30:   required from here
/usr/include/c++/13/bits/new_allocator.h:187:11: error: no matching function for call to ‘lc3::core::MemLocation::MemLocation(short unsigned int, std::__cxx11::basic_string<char>&, bool)’
  187 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:17:9: note: candidate: ‘lc3::core::MemLocation::MemLocation()’
   17 |         MemLocation(void) : MemLocation(0x0000, "") {}
      |         ^~~~~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:17:9: note:   candidate expects 0 arguments, 3 provided
/home/aaron/lc3tools/src/backend/mem.h:14:11: note: candidate: ‘lc3::core::MemLocation::MemLocation(const lc3::core::MemLocation&)’
   14 |     class MemLocation
      |           ^~~~~~~~~~~
/home/aaron/lc3tools/src/backend/mem.h:14:11: note:   candidate expects 1 argument, 3 provided
/home/aaron/lc3tools/src/backend/mem.h:14:11: note: candidate: ‘lc3::core::MemLocation::MemLocation(lc3::core::MemLocation&&)’
/home/aaron/lc3tools/src/backend/mem.h:14:11: note:   candidate expects 1 argument, 3 provided
make[2]: *** [src/backend/CMakeFiles/lc3core.dir/build.make:118: src/backend/CMakeFiles/lc3core.dir/converter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:191: src/backend/CMakeFiles/lc3core.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Build fails.

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.