Hello everyone,
I am trying to make the 1-bit register following the figure given in the book, I understand how the register is built but my HDL implementation seems to be wrong since I get many Comparison Failures when I load the corresponding script in the Hardware simulator.
The figure is in page 43:
http://www1.idc.ac.il/tecs/book/chapter%2003.pdfMy HDL code:
/**
* 1-bit memory register.
* If load[t-1]=1 then out[t] = in[t-1]
* else out does not change (out[t] = out[t-1])
*/
CHIP Bit {
IN in, load;
OUT out;
PARTS:
Mux(a = in, b = loopIn, sel = load, out = outMux);
DFF(in = outMux, out = loopIn, out = out);
}
I do not see what's wrong with the code, any help is greatly appreciated!