mariusmm / risc-v-tlm Goto Github PK
View Code? Open in Web Editor NEWRISC-V SystemC-TLM simulator
License: GNU General Public License v3.0
RISC-V SystemC-TLM simulator
License: GNU General Public License v3.0
When I am trying to build the cloned repo. After all the compilations and exports its failing at specially building for spdlog. I am currently using an ubuntu version 16
**----->
cmake --build _builds --config Release
[ 80%] Built target spdlog
[ 90%] Building CXX object example/CMakeFiles/example.dir/example.cpp.o
/home/saswatm/RISC-V-TLM/spdlog/example/example.cpp:267:13: error: specialization of ‘template<class T, class Char, class Enable> struct fmt::v9::formatter’ in different namespace [-fpermissive]
struct fmt::formatter<my_type> : fmt::formatterstd::string
^
In file included from /home/saswatm/RISC-V-TLM/spdlog/include/spdlog/fmt/fmt.h:27:0,
from /home/saswatm/RISC-V-TLM/spdlog/include/spdlog/common.h:45,
from /home/saswatm/RISC-V-TLM/spdlog/include/spdlog/spdlog.h:12,
from /home/saswatm/RISC-V-TLM/spdlog/example/example.cpp:29:
/home/saswatm/RISC-V-TLM/spdlog/include/spdlog/fmt/bundled/core.h:791:8: error: from definition of ‘template<class T, class Char, class Enable> struct fmt::v9::formatter’ [-fpermissive]
struct formatter {
^
example/CMakeFiles/example.dir/build.make:75: recipe for target 'example/CMakeFiles/example.dir/example.cpp.o' failed
make[2]: *** [example/CMakeFiles/example.dir/example.cpp.o] Error 1
CMakeFiles/Makefile2:125: recipe for target 'example/CMakeFiles/example.dir/all' failed
make[1]: *** [example/CMakeFiles/example.dir/all] Error 2
Makefile:155: recipe for target 'all' failed
make: *** [all] Error 2
**----->
Any suggestions how to solve it.
Some C tests programs make fillure.
Such as tests/c/func2, $make directly:
riscv32-unknown-linux-gnu-objdump -d func2.o > dump
/bin/sh: 1: riscv32-unknown-linux-gnu-objdump: not found
Makefile:32: recipe for target 'func2' failed
make: *** [func2] Error 127
After changed 'riscv32-unknown-linux-gnu-objdump' in the makefile to 'riscv32-unknown-elf-objdump', success to obtain 'func2.hex'.
The method is right or wrong?
Thanks.
Describe the bug
A clear and concise description of what the bug is.
The repo has submodule configuration but it seems the submodule spdlog
has been incorrectly configured.
To Reproduce
Steps to reproduce the behavior:
git submodule init
git submodule update --init --recursive
# This command does nothing.
Unable to locate spdlogConfig.cmake
-- Found Threads: TRUE
CMake Error at CMakeLists.txt:28 (find_package):
Could not find a package configuration file provided by "spdlog" with any
of the following names:
spdlogConfig.cmake
spdlog-config.cmake
Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set
"spdlog_DIR" to a directory containing one of the above files. If "spdlog"
provides a separate development package or SDK, be sure it has been
installed.
Expected behavior
The repo should be able to build from sources.
Desktop (please complete the following information):
In tests/c/timer , $make
There is a n error:
timer.c:(.text+0x96): undefined reference to `TIMER_CMP_INT'
Hi. Looking at the Compile section of the README.md, the need to update the SYSTEMC path in the Makefile is mentioned.
However, the only provided Makefiles are for the tests, there is no Makefile to build the project itself:
$ find . -type f -name Makefile
./tests/C/malloc_test/Makefile
./tests/C/long_test3/Makefile
./tests/C/func2/Makefile
./tests/C/func3/Makefile
./tests/C/long_test1/Makefile
./tests/C/func4/Makefile
./tests/C/long_test2/Makefile
./tests/C/func1/Makefile
./tests/C/trace3/Makefile
./tests/C/forloop/Makefile
./tests/C/func6/Makefile
./tests/C/stdlibs/Makefile
./tests/C/trace/Makefile
./tests/C/func5/Makefile
./tests/C/dhrystone/Makefile
./tests/C/long_test4/Makefile
./tests/C/trace2/Makefile
./tests/FreeRTOSv10/Makefile
./tests/FreeRTOS/Makefile
./tests/CPP/rtti3/Makefile
./tests/CPP/cout/Makefile
./tests/CPP/rtti2/Makefile
./tests/CPP/rtti/Makefile
Does the project support building with just make, or is compiling SYSTEMC with CMake and then this project with CMake required?
Marius:
I am trying to run your model on Windows Visual Studio and got error message saying that 'Memory:' is not a class or name space.
You defined memory as following in the Memory.h file
class Memory: sc_core::sc_module {
public:
// TLM-2 socket, defaults to 32-bits wide, base protocol
tlm_utils::simple_target_socket socket;
//enum { SIZE = 0x90000000 };
enum {
SIZE = 0x10000000
};
The syntax seems correct as a C++ class declaration.
The following statements in the Memeory.cpp file were highlighted by Visual Studio as problems:
SC_HAS_PROCESS(Memeory);
Memory::Memory(sc_core::sc_module_name name, std::string filename) :
Also compiling error: 'Memeory': undeclared identifier.
Maybe you can help to elaborate a bit of your thinking of defining the memory module?
Thanks in advance.
Instruction.cpp:(.text.startup+0x2e): undefined reference to sc_core::sc_api_ve rsion_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_ver sion_2_3_2_cxx201103L(sc_core::sc_writer_policy)' obj/Trace.o:Trace.cpp:(.text.startup+0xea): more undefined references to
sc_cor e::sc_api_version_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_> ::sc_api_version_2_3_2_cxx201103L(sc_core::sc_writer_policy)' follow
collect2: error: ld returned 1 exit status
Makefile:31: recipe for target 'RISCV_TLM' failed
make: *** [RISCV_TLM] Error 1
Currently QEMU is likely the only supported simulator able to run zephyrOS.
Now to run a new board zephyrOS does provide documentation guidelines to do so. I want to load zephyrOS on this simulator.
Can you share how I can do it. Kindly share the dts of the simulator and various software configurations files as marked mandatory by zephyrOS.
https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Hi sir,
when I try to link the object file according to README.md, the "my_linker_script.ld" is not found. where can i get the file? or could you discribe the detail memory map table.
Best Regards
You provide an LT model, is an AT model for more detailed performance analysis also on your roadmap?
BUG DESCRIPTION
I had no problems with the compilation, but when I try to start a .asm test I always receive an exception at the beginning of the simulation (the same for each .asm). I didn't tried the C and FreeRTOS ones. The only changes that I made was in the Makefile to declare my SYSTEMC_HOME and to change from c++11 to c++14.
INFOs:
(Virtual Machine)
COMPILATION AND OUTPUT
`
~/Desktop/RISCV$ make
Compiling src/C_Instruction.cpp ...
Done!
Compiling src/Simulator.cpp ...
Done!
Compiling src/CPU.cpp ...
Done!
Compiling src/Timer.cpp ...
Done!
Compiling src/M_Instruction.cpp ...
Done!
Compiling src/Trace.cpp ...
Done!
Compiling src/Instruction.cpp ...
Done!
Compiling src/Log.cpp ...
Done!
Compiling src/Performance.cpp ...
Done!
Compiling src/Registers.cpp ...
Done!
Compiling src/A_Instruction.cpp ...
Done!
Compiling src/Memory.cpp ...
Done!
Compiling src/Execute.cpp ...
Done!
Compiling src/BusCtrl.cpp ...
Done!
Linking complete!
~/Downloads/RISC-V-TLM-master$ ./RISCV_TLM tests/asm/BasicLoop.asm
SystemC 2.3.3-Accellera --- Jul 23 2019 11:58:05
Copyright (c) 1996-2018 by all Contributors,
ALL RIGHTS RESERVED
LogLevel set to 0
No DMI access
Registers dump
x0 (zero): 0 x1 (ra): 0 x2 (sp): 67108863 x3 (gp): 0
x4 (tp): 0 x5 (t0): 0 x6 (t1): 0 x7 (t2): 0
x8 (s0/fp): 0 x9 (s1): 0 x10 (a0): 0 x11 (a1): 0
x12 (a2): 0 x13 (a3): 0 x14 (a4): 0 x15 (a5): 0
x16 (a6): 0 x17 (a7): 0 x18 (s2): 0 x19 (s3): 0
x20 (s4): 0 x21 (s5): 0 x22 (s6): 0 x23 (s7): 0
x24 (s8): 0 x25 (s9): 0 x26 (s10): 0 x27 (s11): 0
x28 (t3): 0 x29 (t4): 0 x30 (t5): 0 x31 (t6): 0
PC: 0x0
Simulation time 0 s
Error: Exception: Exception
In file: src/Execute.cpp:2171
In process: top.cpu.CPU_thread @ 0 s`
Hello,
Followed the ‘readme’,in tsets/asm/ , I translated .asm files to 0.hex file, while run the simulator, there will be an 'Error Exception',:
Error: Exception: Exception
In file: src/extension_base.cpp:58
I fixed it by add ‘ecall’ instruction at the bottom line in the .asm files.
root@ubuntu-s-4vcpu-8gb-sfo2-01:~/RISC-V-TLM# make
Compiling src/A_Instruction.cpp ...
Assembler messages:
Fatal error: can't create obj/A_Instruction.o: No such file or directory
Makefile:37: recipe for target 'obj/A_Instruction.o' failed
make: *** [obj/A_Instruction.o] Error 1
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.