Add state-aware random program scaffolding
This commit is contained in:
@@ -208,7 +208,13 @@ module cpu_tb_top;
|
||||
|
||||
// CONSTRAINED-RANDOM TESTS
|
||||
// TODO: Add constrained-randomized testing for cpu_seq_item and cpu_xbar_item
|
||||
// Use the existing helpers
|
||||
// For every random CPU program:
|
||||
// 1. print an iteration label so the seed and failure are reproducible,
|
||||
// 2. reset the CPU and call init_memories() before gen_program(),
|
||||
// 3. wait for program writes, run with the supplied bounded helper,
|
||||
// 4. queue the register and relevant memory reads needed by the scoreboard.
|
||||
// Keep randomized external-port traffic in a phase where the CPU is stopped.
|
||||
// The README explains why memory must be reinitialized every iteration.
|
||||
|
||||
|
||||
// TEST FINISH
|
||||
@@ -265,4 +271,4 @@ module cpu_tb_top;
|
||||
!(cpu_if.w_en && cpu_if.r_en))
|
||||
else assertion_fail("w_en_i and r_en_i were asserted together");
|
||||
|
||||
endmodule: cpu_tb_top
|
||||
endmodule: cpu_tb_top
|
||||
|
||||
Reference in New Issue
Block a user