Verified Commit bd28a583 authored by Minyong Li's avatar Minyong Li 💬
Browse files

core.*Test: add subjects

parent 5f5d8b49
......@@ -90,6 +90,8 @@ class ChaChaBlockTest extends FlatSpec with ChiselScalatestTester {
}
}
behavior of "The ChaCha Block Function"
it should "compute RFC8439 2.3.2 test vector correctly" in
test(new ChaChaBlock)(doTest(_, rfc8439232TestVector))
......
......@@ -12,6 +12,8 @@ class DataMemoryTest extends FlatSpec with ChiselScalatestTester {
private val dataWidth = 16
private val size = 32
behavior of "The Data Memory"
it should "store some values" in {
test(new DataMemory(addrWidth, dataWidth, size)) { c =>
c.io.write.addr.poke("h01".U(addrWidth.W))
......
......@@ -36,6 +36,8 @@ class ProgramMemoryTest extends FlatSpec with ChiselScalatestTester {
pm.reset.poke(false.B)
}
behavior of "The Program Memory"
it should "be writable and readable as PC increments" in {
test(new ProgramMemory(addrWidth, cwWidth, size)) { c =>
c.io.br.abs.poke(false.B)
......
......@@ -8,6 +8,8 @@ import chiseltest._
import chisel3._
class QuarterRoundTest extends FlatSpec with ChiselScalatestTester {
behavior of "The ChaCha Quarter Round Function"
it should "compute RFC8439 2.1.1 test vector correctly" in {
test(new QuarterRound) { c =>
c.io.in(0).poke("h11111111".U(32.W))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment