From 8982b5529c7074de31e4efd5e79c2d2fae3c5fb2 Mon Sep 17 00:00:00 2001 From: peteraa Date: Wed, 28 Aug 2019 16:13:15 +0200 Subject: [PATCH] Clarify setup instructions for IF.scala --- src/main/scala/IF.scala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/scala/IF.scala b/src/main/scala/IF.scala index 55b9c87..2195819 100644 --- a/src/main/scala/IF.scala +++ b/src/main/scala/IF.scala @@ -49,11 +49,18 @@ class InstructionFetch extends MultiIOModule { /** - * Setup. You should not change this code + * Setup. + * + * When you have added an instruction signal to this module you + * should ensure that it is set to NOP during program loading. + * + * If not you will end up issuing instructions during program load + * which will start executing before memory, registers and programs + * are fully loaded. */ when(testHarness.IMEMsetup.setup) { PC := 0.U - // TODO: You must set the instruction to Instruction.NOP here. - // throw new Exception("Just making sure you're seeing the line above") + // TODO: You should probably set the instruction to Instruction.NOP here. + throw new Exception("Just making sure you're seeing the line above.\nYou can delete this exception now, it's found at line 64 at IF.scala") } }