lefticus / cpp_box Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Currently two sample goals exist, this issue should be used to track a specific set of lessons that we might want to implement.
Current UI is cumbersome, we need some way to have it better organized / dockable. The current experimental dockable branch on imgui should help https://github.com/ocornut/imgui/tree/docking
See https://github.com/lefticus/cpp_box#architecture-documentation for specifics on the goals
I've started the hardware design on the wiki https://github.com/lefticus/arm_thing/wiki/Memory-Map
Soliciting comments if you have any, @mattgodbolt and @jonathandturner
internal compiler error: in force_type_die, at dwarf2out.c:25955
for (int i = 0; i < status.opsPerFrame && status.sys->operations_remaining(); ++i) { status.sys->next_operation(); }
g++ version:
g++ (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0
You can see here in codecov that the unit tests are only covering about 1/2 of the possible Data Processing instructions that the ARM supports.
https://codecov.io/gh/lefticus/cpp_box/src/master/include/cpp_box/arm.hpp#L725...742
You can see details about the instruction format and architecture supported in the README
The instructions to test can be generated by hand or with an ARM assembler or compiler (using objdump on an ARM object file can be quite revealing)
$ clang++ --target=armv4-linux -stdlib=libc++ -O3 some_file.cpp -o some_file.o
$ llvm-objdump --disassemble some_file.o
Tests are located here: https://github.com/lefticus/cpp_box/blob/master/test/constexpr_tests.cpp
There are a couple of important things to notice:
constexpr
or not. This is important for debugging. A constexpr
build will simply fail to build if there is a problem, and this makes debugging the issue very difficult.relaxed_constexpr_tests
binary is built specifically for this reason, so we can test all aspects of the CPU as either constexpr
or notconstexpr
and non-constexpr
run
that takes a set of pre-set register values if desired.CMP
test for a basic design https://github.com/lefticus/cpp_box/blob/master/test/constexpr_tests.cpp#L94-L101Once you have made the PR we should be able to see the change in test coverage in the PR report on github.
Feel free to make multiple PRs as well, for different instruction tests.
Will be necessary for statics/globals
Currently main.cpp takes too long to compile.
Options include:
fmt::
calls, they are heavy at compile timeApple LLVM version 10.0.1 does not come with filesystem library header, resulting in an error on compilation. experimental/filesystem is also cannot be found.
Any workarounds?
See here:
Should at least start with a command line configuration. catch2::clara is already available for use, but other command line parser options could be considered.
Minor: Displaying %s
instead of Hint headers.
From the cpp_box.cpp: 641
if (ImGui::CollapsingHeader("%s", fmt::format("Show Hint #{}", clue).c_str())) { text(true, "{}", goal.hints[clue]); }
Currently the ELF loading capability is baked into the front-end cpp file and should be moved into another file/lib
User needs to have compiler output (warnings and errors) parsed and shown in the IDE.
Consider using CMakeRC to package up the headers?
https://github.com/vector-of-bool/cmrc
Specifically we want this standalone header implementation of libcxx https://github.com/lefticus/libcxx
We'll prefer ChaiScript (for obvious reasons) for the scripting technology.
The current interface to the lessons / goals can be found here:
Lines 580 to 608 in 2da3c85
Because of conan deps we aren't getting a clean built yet on LGTM
Currently it's not possible to write assembly code directly. While it's possible to utilize inline assembly, it's just not very nice. I know this project is called cpp_box
but an "Assembly" switch would be nice anyway. Especially if you plan any more videos like this one.
I will try to implement this myself because it seems relatively trivial, Clang can do all the heavy lifting for me. This is my working branch in a local fork: asynts/cpp_box.
Can your program be used to investigate the real time behavior for cache line loads?
https://medium.com/software-design/why-software-developers-should-care-about-cpu-caches-8da04355bb8a
Could be interesting to debugging of the system.
They should result in a call to the unhandled opcode vector
Which should by default log / emit / somehow log that what the unhandled opcode was so it can be tracked and later implemented if it's a valid correct opcode.
Currently each part of the opcode is decoded on demand, we should try doing this upfront when the opcode type is constructed to see if the reduced work done during actual processing of the instruction helps performance.
if it does we can build a better/smarter CPU cache.
Relies on #26
Basic ARM object files that are simple (terminating loops that exercise various instructions) so we can test performance of the CPU emulator
Currently there are some functions that take a list of strings or paths and it's possible to swap up the order of parameters. Look for these cases and better utilize strongly typed wrappers to make mixing up params impossible.
I believe we need to look in the dynamic symbol table.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.