Logisim circuit and asm code - writing and reading data to slow Flash RAM

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Logisim circuit and asm code - writing and reading data to slow Flash RAM

Thing1
Hello

I have a task to design a circuit which links the CPU and RAM and then write test code to check it successfully stores and then can read back the data, the second part of the task is to then interface a keyboard and display which waits for the user to enter a command before storing or saving typed data.

I am very behind on this subject and have spent most of my time cramming the textbook rather than doing practical exercises...which I now regret and am so stressed that I have no idea where to start without having a panic attack.

I'm not sure I fully understand how data is stored or how you go about designing such a thing, can anyone recommend a good tutorial/video/pdf for a beginner that could get me up to speed quickly or suggest the main elements I need to focus on rather than just reading everything from top to bottom aimlessly?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Logisim circuit and asm code - writing and reading data to slow Flash RAM

cadet1620
Administrator
To clarify, you are using Logisim, not Nand2Tetris HDL, and you have built the Hack CPU and its constituent parts.
Now you need to interface this CPU to Logisim's built-in RAM, ROM, Keyboard and TTY?

--Mark

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Logisim circuit and asm code - writing and reading data to slow Flash RAM

Thing1
Hello

Sorry, yes i'm working in Logisim and came accross the Hack CPU which seemed similar to what I was trying to do... I will remove this post as i don't think is relevant.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Logisim circuit and asm code - writing and reading data to slow Flash RAM

ivant
You can start by reading the Logisim documentation for the relevant chips. Look at the Help -> Library Reference menu.

Then start playing with the chip in Logisim. For example, start a new circuit and put a single RAM chip on it. Then connect the ports to some input (the green square from the toolbar) and output (the green circle) pins. Make sure they are the right width (e.g. address and data pins should be 8 bits by default). You may want to switch the RAM chip to use separate load and store pins, which is a bit easier to understand and make it work.

Then switch to "execution" mode (press the hand icon on the toolbar) and change the values by clicking on the input pins. You can see, that by modifying the address, the RAM chips selects different cells. Select some of the bits in the Data input, set the Store bit. Is the value stored in the RAM? Why not?

After getting a feel of how the RAM chip works, you can start connecting it to the CPU. You have to be able to control what the RAM chip does and when, by the CPU.

I hope that helps.
Loading...