22 lines
248 B
Go
22 lines
248 B
Go
package riscvemu
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestCPU(t *testing.T) {
|
|
|
|
sw := VirtualEEI{
|
|
Ram: make([]byte, 1024),
|
|
}
|
|
_ = sw.Write32(0, 0b00000000000100000000000001110011) // EBREAK
|
|
|
|
c := CPUState{
|
|
w: &sw,
|
|
}
|
|
|
|
err := c.Step()
|
|
panic(err)
|
|
|
|
}
|