parent
cbc770deb3
commit
f8678698fc
|
@ -36,6 +36,7 @@ bin/
|
||||||
!tester/src/test/resources/*.vhd
|
!tester/src/test/resources/*.vhd
|
||||||
obj_dir
|
obj_dir
|
||||||
*.logTrace
|
*.logTrace
|
||||||
|
*.yaml
|
||||||
*.memTrace
|
*.memTrace
|
||||||
*.regTrace
|
*.regTrace
|
||||||
|
|
||||||
|
|
36
cpu0.yaml
36
cpu0.yaml
|
@ -1,3 +1,39 @@
|
||||||
|
dBus: !!SpinalRiscv.BusReport
|
||||||
|
flushInstructions: [147, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455, 33587347, 1879101455,
|
||||||
|
33587347, 1879101455]
|
||||||
|
info: !!SpinalRiscv.CacheReport {bytePerLine: 32, size: 4096}
|
||||||
|
kind: cached
|
||||||
iBus: !!SpinalRiscv.BusReport
|
iBus: !!SpinalRiscv.BusReport
|
||||||
flushInstructions: [16399]
|
flushInstructions: [16399]
|
||||||
info: !!SpinalRiscv.CacheReport {bytePerLine: 32, size: 4096}
|
info: !!SpinalRiscv.CacheReport {bytePerLine: 32, size: 4096}
|
||||||
|
|
|
@ -123,42 +123,42 @@ object TopLevel {
|
||||||
catchMemoryTranslationMiss = true,
|
catchMemoryTranslationMiss = true,
|
||||||
asyncTagMemory = false,
|
asyncTagMemory = false,
|
||||||
twoStageLogic = true
|
twoStageLogic = true
|
||||||
|
),
|
||||||
|
askMemoryTranslation = true,
|
||||||
|
memoryTranslatorPortConfig = MemoryTranslatorPortConfig(
|
||||||
|
portTlbSize = 4
|
||||||
)
|
)
|
||||||
// askMemoryTranslation = true,
|
|
||||||
// memoryTranslatorPortConfig = MemoryTranslatorPortConfig(
|
|
||||||
// portTlbSize = 4
|
|
||||||
// )
|
|
||||||
),
|
),
|
||||||
new DBusSimplePlugin(
|
// new DBusSimplePlugin(
|
||||||
catchAddressMisaligned = true,
|
// catchAddressMisaligned = true,
|
||||||
catchAccessFault = true
|
// catchAccessFault = true
|
||||||
),
|
|
||||||
// new DBusCachedPlugin(
|
|
||||||
// config = new DataCacheConfig(
|
|
||||||
// cacheSize = 4096,
|
|
||||||
// bytePerLine = 32,
|
|
||||||
// wayCount = 1,
|
|
||||||
// addressWidth = 32,
|
|
||||||
// cpuDataWidth = 32,
|
|
||||||
// memDataWidth = 32,
|
|
||||||
// catchAccessError = true,
|
|
||||||
// catchIllegal = true,
|
|
||||||
// catchUnaligned = true,
|
|
||||||
// catchMemoryTranslationMiss = true
|
|
||||||
// ),
|
// ),
|
||||||
|
new DBusCachedPlugin(
|
||||||
|
config = new DataCacheConfig(
|
||||||
|
cacheSize = 4096,
|
||||||
|
bytePerLine = 32,
|
||||||
|
wayCount = 1,
|
||||||
|
addressWidth = 32,
|
||||||
|
cpuDataWidth = 32,
|
||||||
|
memDataWidth = 32,
|
||||||
|
catchAccessError = true,
|
||||||
|
catchIllegal = true,
|
||||||
|
catchUnaligned = true,
|
||||||
|
catchMemoryTranslationMiss = true
|
||||||
|
),
|
||||||
// memoryTranslatorPortConfig = null
|
// memoryTranslatorPortConfig = null
|
||||||
//// memoryTranslatorPortConfig = MemoryTranslatorPortConfig(
|
memoryTranslatorPortConfig = MemoryTranslatorPortConfig(
|
||||||
//// portTlbSize = 6
|
portTlbSize = 6
|
||||||
//// )
|
)
|
||||||
// ),
|
|
||||||
new StaticMemoryTranslatorPlugin(
|
|
||||||
ioRange = _(31 downto 28) === 0xF
|
|
||||||
),
|
),
|
||||||
// new MemoryTranslatorPlugin(
|
// new StaticMemoryTranslatorPlugin(
|
||||||
// tlbSize = 32,
|
|
||||||
// virtualRange = _(31 downto 28) === 0xC,
|
|
||||||
// ioRange = _(31 downto 28) === 0xF
|
// ioRange = _(31 downto 28) === 0xF
|
||||||
// ),
|
// ),
|
||||||
|
new MemoryTranslatorPlugin(
|
||||||
|
tlbSize = 32,
|
||||||
|
virtualRange = _(31 downto 28) === 0xC,
|
||||||
|
ioRange = _(31 downto 28) === 0xF
|
||||||
|
),
|
||||||
new DecoderSimplePlugin(
|
new DecoderSimplePlugin(
|
||||||
catchIllegalInstruction = true
|
catchIllegalInstruction = true
|
||||||
),
|
),
|
||||||
|
@ -192,7 +192,7 @@ object TopLevel {
|
||||||
catchAddressMisaligned = true,
|
catchAddressMisaligned = true,
|
||||||
prediction = DYNAMIC
|
prediction = DYNAMIC
|
||||||
),
|
),
|
||||||
new YamlPlugin("cpu0")
|
new YamlPlugin("cpu0.yaml")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ class Briey(config: BrieyConfig) extends Component{
|
||||||
case plugin : IBusSimplePlugin => iBus = plugin.iBus.toAxi4ReadOnly()
|
case plugin : IBusSimplePlugin => iBus = plugin.iBus.toAxi4ReadOnly()
|
||||||
case plugin : IBusCachedPlugin => iBus = plugin.iBus.toAxi4ReadOnly()
|
case plugin : IBusCachedPlugin => iBus = plugin.iBus.toAxi4ReadOnly()
|
||||||
case plugin : DBusSimplePlugin => dBus = plugin.dBus.toAxi4Shared()
|
case plugin : DBusSimplePlugin => dBus = plugin.dBus.toAxi4Shared()
|
||||||
case plugin : DBusCachedPlugin => dBus = plugin.dBus.toAxi4Shared()
|
case plugin : DBusCachedPlugin => dBus = plugin.dBus.toAxi4Shared(true)
|
||||||
case plugin : DebugPlugin => {
|
case plugin : DebugPlugin => {
|
||||||
resetCtrl.coreResetUnbuffered setWhen(plugin.io.resetOut)
|
resetCtrl.coreResetUnbuffered setWhen(plugin.io.resetOut)
|
||||||
debugBus = plugin.io.bus.toApb3()
|
debugBus = plugin.io.bus.toApb3()
|
||||||
|
@ -298,20 +298,33 @@ class Briey(config: BrieyConfig) extends Component{
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
axiCrossbar.addPipelining(apbBridge.io.axi,(crossbar,bridge) => {
|
axiCrossbar.addPipelining(apbBridge.io.axi)((crossbar,bridge) => {
|
||||||
crossbar.sharedCmd.halfPipe() >> bridge.sharedCmd
|
crossbar.sharedCmd.halfPipe() >> bridge.sharedCmd
|
||||||
crossbar.writeData.halfPipe() >> bridge.writeData
|
crossbar.writeData.halfPipe() >> bridge.writeData
|
||||||
crossbar.writeRsp << bridge.writeRsp
|
crossbar.writeRsp << bridge.writeRsp
|
||||||
crossbar.readRsp << bridge.readRsp
|
crossbar.readRsp << bridge.readRsp
|
||||||
})
|
})
|
||||||
|
|
||||||
axiCrossbar.addPipelining(sdramCtrl.io.axi,(crossbar,ctrl) => {
|
axiCrossbar.addPipelining(sdramCtrl.io.axi)((crossbar,ctrl) => {
|
||||||
crossbar.sharedCmd.halfPipe() >> ctrl.sharedCmd
|
crossbar.sharedCmd.halfPipe() >> ctrl.sharedCmd
|
||||||
crossbar.writeData >/-> ctrl.writeData
|
crossbar.writeData >/-> ctrl.writeData
|
||||||
crossbar.writeRsp << ctrl.writeRsp
|
crossbar.writeRsp << ctrl.writeRsp
|
||||||
crossbar.readRsp << ctrl.readRsp
|
crossbar.readRsp << ctrl.readRsp
|
||||||
})
|
})
|
||||||
|
|
||||||
|
axiCrossbar.addPipelining(ram.io.axi)((crossbar,ctrl) => {
|
||||||
|
crossbar.sharedCmd.halfPipe() >> ctrl.sharedCmd
|
||||||
|
crossbar.writeData >/-> ctrl.writeData
|
||||||
|
crossbar.writeRsp << ctrl.writeRsp
|
||||||
|
crossbar.readRsp << ctrl.readRsp
|
||||||
|
})
|
||||||
|
|
||||||
|
axiCrossbar.addPipelining(vgaCtrl.io.axi)((ctrl,crossbar) => {
|
||||||
|
ctrl.readCmd.halfPipe() >> crossbar.readCmd
|
||||||
|
ctrl.readRsp << crossbar.readRsp
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
axiCrossbar.build()
|
axiCrossbar.build()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -971,6 +971,7 @@ public:
|
||||||
#include<pthread.h>
|
#include<pthread.h>
|
||||||
#include<stdlib.h>
|
#include<stdlib.h>
|
||||||
#include<unistd.h>
|
#include<unistd.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
|
||||||
#define RISCV_SPINAL_FLAGS_RESET 1<<0
|
#define RISCV_SPINAL_FLAGS_RESET 1<<0
|
||||||
#define RISCV_SPINAL_FLAGS_HALT 1<<1
|
#define RISCV_SPINAL_FLAGS_HALT 1<<1
|
||||||
|
@ -1027,6 +1028,13 @@ public:
|
||||||
//---- Create the socket. The three arguments are: ----//
|
//---- Create the socket. The three arguments are: ----//
|
||||||
// 1) Internet domain 2) Stream socket 3) Default protocol (TCP in this case) //
|
// 1) Internet domain 2) Stream socket 3) Default protocol (TCP in this case) //
|
||||||
clientSocket = socket(PF_INET, SOCK_STREAM, 0);
|
clientSocket = socket(PF_INET, SOCK_STREAM, 0);
|
||||||
|
int flag = 1;
|
||||||
|
int result = setsockopt(clientSocket, /* socket affected */
|
||||||
|
IPPROTO_TCP, /* set option at TCP level */
|
||||||
|
TCP_NODELAY, /* name of option */
|
||||||
|
(char *) &flag, /* the cast is historical
|
||||||
|
cruft */
|
||||||
|
sizeof(int)); /* length of option value */
|
||||||
|
|
||||||
//---- Configure settings of the server address struct ----//
|
//---- Configure settings of the server address struct ----//
|
||||||
// Address family = Internet //
|
// Address family = Internet //
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IBUS=IBUS_CACHED
|
IBUS=IBUS_CACHED
|
||||||
DBUS=DBUS_SIMPLE
|
DBUS=DBUS_CACHED
|
||||||
TRACE?=no
|
TRACE?=no
|
||||||
TRACE_ACCESS?=no
|
TRACE_ACCESS?=no
|
||||||
TRACE_START=0
|
TRACE_START=0
|
||||||
|
|
Loading…
Reference in New Issue