Question: Stretch Activity When performing computational operations it is often useful to be able to exe - cute a sequence of operations, each one using the
Stretch Activity
When performing computational operations it is often useful to be able to exe
cute a sequence of operations, each one using the output of the previous step as
an input to the next step. For example to OR values X OR Y OR Z you might
first calculate X OR Y and then on the next step apply OR Z to the previous
output X OR Y
For this task adapt the circuit FALL so that it can combine a sequence of
operations defined by different values for f and f at each step, by enabling
the outputs Ft and Gt of step t to be used feedback as the inputs for the next
operation Ct and Dt for step t You should also add a further input
Load to the chip which when Load will enable you to load new inputs to
Ct and Dt and when set to sets Ct Ft and Dt Gt The Load input
will allow you to manually set the values of C and D at the start and during
the sequence if required.
Call this chip FSEQ. You can test this chip using FSEQ.tst but may wish to
create further tests before submission.
You must only use the builtin AND, NAND, OR NOR, NOT, Mux, DMux,
XOR or DFF chips.
Here is my chip FSEQ: CHIP FSEQ
IN A B C D f f load;
OUT E F G Ft Gt;
PARTS:
FZeroAA BB CC DD FoutF GoutG;
FOneAA BB CC DD FoutF GoutG;
FTwoAA BB CC DD FoutF GoutG;
FThreeAA BB CC DD EoutE FoutF GoutG;
MuxaoutE bfalse, self outEMux;
MuxaEMux bfalse, self outE;
MuxaoutF boutF self outFMux;
MuxaoutF boutF self outFMux;
MuxaFMux bFMux self outF;
MuxaoutG boutG self outGMux;
MuxaoutG boutG self outGMux;
MuxaGMux bGMux self outG;
DFFinnextC, outcurrentC;
DFFinnextD, outcurrentD;
MuxaA bcurrentC, selload, outnextC;
MuxaB bcurrentD, selload, outnextD;
MuxacurrentC, bnextC, selload, outFt;
MuxacurrentD, bnextD, selload, outGt;
However, it is not passing the following test file FSEQ.tst:
load FSEQ.hdl
outputfile FSEQ.out,
compareto FSEQ.cmp
outputlist fB fB AB BB CB DB EB FB GB;
set load
set f
set f
set A
set B
set C
set D
tick,
tock,
output;
set load
set f
set f
tick,
tock,
output;
set f
set f
tick,
tock,
output;
Please help me to fix my chip so that it passes this test. You can test the file with the hardware simulator on nandtetris.com Below is FSEQ.cmp:
f f A B C D E F G
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
