Nand2Tetris CPU Emulator Clock Frequency

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Nand2Tetris CPU Emulator Clock Frequency

henryt
What frequency does the CPU emulator run at when there are no animations and the slider is set to fast?

I am creating the Nand2Tetris computer on breadboards (sort of like Ben Eaters breadbaord computer) and I want to know roughly what clock input to use.
Reply | Threaded
Open this post in threaded view
|

Re: Nand2Tetris CPU Emulator Clock Frequency

WBahn
Administrator
It just runs as fast as it can. How fast depends entirely on your computer and what else you are running.

You can figure it out by printing out the 'time' variable to the output file at the end of a simulation and then either manually timing how long the program runs or writing a batch file that captures the time before starting the emulator and again after the emulator exits. There's some start-up and wrap-up code that pollutes the data, but if the program itself runs for a long time that will get lost in the noise.
Reply | Threaded
Open this post in threaded view
|

Re: Nand2Tetris CPU Emulator Clock Frequency

henryt
Okay thanks, that makes sense. I will try and get a rough number with some experimentation.