mirror of
https://github.com/handsomezhuzhu/2025-yatcpu.git
synced 2026-02-20 20:10:14 +00:00
add file
This commit is contained in:
BIN
lab2/src/main/resources/say_goodbye.asmbin
Normal file
BIN
lab2/src/main/resources/say_goodbye.asmbin
Normal file
Binary file not shown.
25
lab2/src/test/scala/riscv/BoardTest.scala
Normal file
25
lab2/src/test/scala/riscv/BoardTest.scala
Normal file
@@ -0,0 +1,25 @@
|
||||
package riscv
|
||||
|
||||
import board.z710.Top
|
||||
|
||||
import riscv.{Parameters, TestAnnotations}
|
||||
import chisel3._
|
||||
import chisel3.util.{is, switch}
|
||||
import chiseltest._
|
||||
import org.scalatest.flatspec.AnyFlatSpec
|
||||
import board.z710.Top
|
||||
|
||||
|
||||
class SayGoodbyeTest extends AnyFlatSpec with ChiselScalatestTester {
|
||||
behavior of "Board simulation"
|
||||
it should "say goodbye " in {
|
||||
test(new Top("say_goodbye.asmbin")).withAnnotations(TestAnnotations.annos) { c =>
|
||||
|
||||
for (i <- 1 to 50000) {
|
||||
c.clock.step(5)
|
||||
c.io.rx.poke((i % 2).U) // poke some useless value, since rx not yet used
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user