2022-12-27 23:05:26 +00:00
|
|
|
package riscvemu
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCPU(t *testing.T) {
|
|
|
|
|
2022-12-28 00:59:35 +00:00
|
|
|
sw := VirtualEEI{
|
2022-12-27 23:05:26 +00:00
|
|
|
Ram: make([]byte, 1024),
|
|
|
|
}
|
|
|
|
_ = sw.Write32(0, 0b00000000000100000000000001110011) // EBREAK
|
|
|
|
|
|
|
|
c := CPUState{
|
|
|
|
w: &sw,
|
|
|
|
}
|
|
|
|
|
|
|
|
err := c.Step()
|
|
|
|
panic(err)
|
|
|
|
|
|
|
|
}
|