|
|
This post was updated on .
Hi, I would be grateful for you help. I thought I have figured out the right code, but it is not the case. Internal pins are created but not the required outcome.
My code is a follows:
<code snipped> Mux8Way16(a=out1,b=out2,c=out3,d=out4,e=out5,f=out6,g=out7,h=out8,sel=address,out=out);
Please help me to figure out what is wrong.
Sincerely, Ron
|
Administrator
|
How is the outcome not correct? What is the error message?
Have you verified the individual parts you are using?
You might try using the built-in parts to see if the results are any different.
|
|
This post was updated on .
Thank you very much for your answer.
I have done what you said - used only built in chips.
I came up with the following code:
// Put your code here:
<code snipped> Mux8Way16(a=out1,b=out2,c=out3,d=out4,e=out5,f=out6,g=out7,h=out8,sel=address,out=out);`
}
I received a mistake remark
"line 29 (the line of the last bracket, just }) A GateClass name is expected"
Will you please be kind enough to explain to me what this means?
Thnaks
Ron
|
Administrator
|
The reason that it is complaining about line 29 is that it had to reach the closing brace before it could be sure that something was wrong.
The error message would indicate that it is trying to find one (or more) of the gates used (as a Java class) and is not finding it. This could mean that your paths are not set up right for the simulator to run, but if all of your earlier work had no problems, this would seem unlikely.
Please post the ENTIRE contents of your file (we can go back and delete it later). The error might be above the snippet provided.
|
|
This post was updated on .
Thank you very, very much.
Following please find the entire code
I could not print the screen of the simulator with the mistake messege.
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/03/a/RAM8.hdl
/**
* Memory of 8 registers, each 16 bit-wide. Out holds the value
* stored at the memory location specified by address. If load==1, then
* the in value is loaded into the memory location specified by address
* (the loaded value will be emitted to out from the next time step onward).
*/
CHIP RAM8 {
IN in[16], load, address[3];
OUT out[16];
PARTS:
// Put your code here:
<code snipped>
Mux8Way16(a=out1,b=out2,c=out3,d=out4,e=out5,f=out6,g=out7,h=out8,sel=address,out=out);`
}
I hope this is the correct thing you asked me to send.
Ron
|
Administrator
|
Look at the last part (the DMux). Do you see the extra character after the semicolon at the end?
Remove that and give it a try.
|
|
I have no words to express my gratitude.
Thank you
|
|