-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
130 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Open Source License Acknowledgements and Third-Party Copyrights | ||
|
||
TreeCore CPU utilizes third party software from various sources. Portions of this software are copyrighted by their respective owners as indicated in the copyright notices below. | ||
|
||
The following acknowledgements pertain to this software license. | ||
|
||
## Main components used by TreeCore CPU | ||
These components are installed via composer or via npm. You can check all the dependencies using the instructions from the section Libraries dynamically referenced via Composer and Libraries dynamically referenced via npm. | ||
|
||
### verilator | ||
* maintainer: [verilator](https://github.com/verilator) | ||
* License: [LGPL-3.0](https://github.com/verilator/verilator/blob/master/LICENSE) | ||
* repo: https://github.com/verilator/verilator | ||
|
||
### mill | ||
* maintainer: [com-lihaoyi](https://github.com/com-lihaoyi) | ||
* License: [MIT](https://github.com/com-lihaoyi/mill/blob/main/LICENSE) | ||
* repo: https://github.com/com-lihaoyi/mill | ||
|
||
### riscv-test | ||
* maintainer: [NJU-ProjectN](https://github.com/NJU-ProjectN) | ||
* License: [custom](https://github.com/NJU-ProjectN/riscv-tests/blob/master/LICENSE) | ||
* repo: https://github.com/NJU-ProjectN/riscv-tests | ||
|
||
### difftest | ||
* maintainer: [oscpu](https://gitee.com/oscpu) | ||
* License: [MulanPSL-2.0](https://gitee.com/oscpu/difftest/blob/master/LICENSE) | ||
* repo: https://gitee.com/oscpu/difftest | ||
|
||
### NEMU | ||
* maintainer: [oscpu](https://gitee.com/oscpu) | ||
* License: [MulanPSL-2.0](https://gitee.com/oscpu/difftest/blob/master/LICENSE) | ||
* repo: https://gitee.com/oscpu/NEMU | ||
|
||
### DRAMsim3 | ||
* maintainer: [OpenXiangShan](https://github.com/OpenXiangShan) | ||
* License: [MIT](https://github.com/OpenXiangShan/DRAMsim3/blob/co-simulation/LICENSE) | ||
* repo: https://github.com/OpenXiangShan/DRAMsim3 | ||
|
||
### ysyxSoC | ||
* maintainer: [oscpu](https://github.com/OSCPU) | ||
* License: [custom](https://github.com/OSCPU/ysyxSoC/blob/master/LICENSE.Berkeley) | ||
* repo: https://github.com/OSCPU/ysyxSoC | ||
|
||
## Libraries modified for TreeCore CPU | ||
These libraries derive from [NJU-ProjectN](https://github.com/NJU-ProjectN) and are modified specifically for TreeCore CPU. | ||
|
||
### abstract-machine | ||
* maintainer: [maksyuki](https://github.com/maksyuki) | ||
* License: [GPL-3.0](https://github.com/maksyuki/ysyx-software-file/blob/master/LICENSE) | ||
* repo: https://github.com/maksyuki/ysyx-software-file/tree/master/abstract-machine | ||
|
||
### am-kernels | ||
* maintainer: [maksyuki](https://github.com/maksyuki) | ||
* License: [GPL-3.0](https://github.com/maksyuki/ysyx-software-file/blob/master/LICENSE) | ||
* repo: https://github.com/maksyuki/ysyx-software-file/tree/master/am-kernels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
comp: | ||
verilator -Wall --cc --exe --build hello.cpp hello.v -o emu -Mdir build | ||
|
||
run: | ||
./build/emu | ||
|
||
.PHONY: | ||
comp run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "Vhello.h" | ||
#include "verilated.h" | ||
|
||
int main(int argc, char **argv, char **env) | ||
{ | ||
VerilatedContext *contextp = new VerilatedContext; | ||
contextp->commandArgs(argc, argv); | ||
Vhello *top = new Vhello{contextp}; | ||
while (!contextp->gotFinish()) | ||
{ | ||
top->eval(); | ||
} | ||
delete top; | ||
delete contextp; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module hello; | ||
initial begin | ||
$display("Hello World"); | ||
$finish; | ||
end | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
comp: | ||
verilator -Wall --cc --exe --build top.cpp top.v -o emu -Mdir build | ||
|
||
run: | ||
./build/emu | ||
|
||
.PHONY: | ||
comp run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <assert.h> | ||
|
||
#include "Vtop.h" | ||
#include "verilated.h" | ||
|
||
int main(int argc, char **argv, char **env) | ||
{ | ||
VerilatedContext *contextp = new VerilatedContext; | ||
contextp->commandArgs(argc, argv); | ||
Vtop *top = new Vtop{contextp}; | ||
while (!contextp->gotFinish()) | ||
{ | ||
int a = rand() & 1; | ||
int b = rand() & 1; | ||
top->a = a; | ||
top->b = b; | ||
top->eval(); | ||
printf("a = %d, b = %d, f = %d\n", a, b, top->f); | ||
assert(top->f == a ^ b); | ||
} | ||
delete top; | ||
delete contextp; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module top( | ||
input a, | ||
input b, | ||
output f | ||
); | ||
assign f = a ^ b; | ||
endmodule |