hi all,
If you are interest in the CPU architecture design,i think the '
rsic cpu' is a good choice.It is a sample package in
systemc example, but it contain some problems with multi-drive. What's the multi-drive, it means the multi inputs drive the same output. you can image the data in this point is unstable, it should be 1 or 0 or x.... ,so the compiler would confuse what's the data in it.Because in
systemc is no wire definition, in '
sc_signal' declare it like the register or buffer design, it would keep the current data until the next trigger to change it's data. we use a very sample way to avoid it, to create a new module and change the declare of '
sc_signal' to '
sc_in' and '
sc_out' . all new packages and version is release in
here
please use this command to compile our package.
g++ *.cpp -I/usr/systemc/include -L/usr/systemc/lib-linux -o cpu -lsystemc
1 fix lists
1. multi drive example
Error: (E115) sc_signal
cannot have more than one driver:
signal `STALL_FETCH' (sc_signal)
first driver `PAGING_BLOCK.port_13' (sc_out)
second driver `BIOS_BLOCK.port_6' (sc_out)
In file: ..\..\src\sysc\communication\sc_signal.cpp:126
2. data cache miss
the environment of dcache is unconnected, we replace it by mem architecture,that can be work on "lw,sw" commands
3. branch && jump conditions not work
fix the program counter to jump && branch condition
2. how to use
//1 use this command to load our asm code 2 icache file
perl assembler.pl test2.asm -code > icache
//2 use this command to get visible asm code
perl assembler.pl test2.asm > view
//3 run and check
./cpu
謝謝你,提供了解決的方法
回覆刪除基廉列克
不必客氣
回覆刪除天朝威武啊
回覆刪除一门课上几十个外国人都靠这个解决问题啊
回覆刪除