IFUTest.scala 1.5 KB
Newer Older
L
Lingrui98 已提交
1
// package xiangshan.frontend
J
jinyue 已提交
2

L
Lingrui98 已提交
3 4 5 6
// import chisel3._
// import chiseltest._
// import org.scalatest.flatspec.AnyFlatSpec
// import org.scalatest.matchers.must.Matchers
J
jinyue 已提交
7

L
Lingrui98 已提交
8 9
// class IFUTest extends AnyFlatSpec with ChiselScalatestTester with Matchers {
//   behavior of "IFU Test"
J
jinyue 已提交
10

L
Lingrui98 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
//   it should "test IFU pipeline" in {
//     test(new IFU) { c =>
//       //-----------------
//       //Cycle 0
//       //-----------------
//       //c.io.icacheReq.ready.poke(true.B)
//       c.io.icacheReq.ready.poke(false.B)
//       c.io.fetchPacket.ready.poke(true.B)
//       c.clock.step()
//       //-----------------
//       //Cycle 1
//       //-----------------
//       c.clock.step()
//       c.clock.step()
//       c.clock.step()
//       //-----------------
//       // Cycle 2
//       //-----------------
//       c.io.icacheReq.ready.poke(true.B)
//       c.clock.step()
//       //-----------------
//       // Cycle 3
//       //-----------------
//       c.clock.step()
//       //-----------------
//       // Cycle 4
//       //-----------------
//       c.io.icacheResp.valid.poke(true.B)
//       c.clock.step()
//       //-----------------
//       // Cycle 5
//       //-----------------
//       c.io.redirect.valid.poke(true.B)
//       c.io.redirect.bits.poke("h80002800".U)
//       c.clock.step()
//       //-----------------
//       // Cycle 6
//       //-----------------
//       c.io.redirect.valid.poke(false.B)
//       c.clock.step()
//       //-----------------
//       // Cycle 7
//       //-----------------
//       c.clock.step()
//     }
//   }
// }
L
LinJiawei 已提交
58