SmartSim, a digital circuit designer and simulator

Ashley Newson is a sixth-form student from Oxford. Alex Bradbury and Rob Mullins from the Raspberry Pi Foundation met him at the University of Cambridge Computer Lab open day, where he came over with an SD card ready to show off a demo of SmartSim, his home-grown circuit design and simulation package. It was, said Alex, hugely impressive – I’ve had a play too now, and couldn’t agree with him more. Ashley’s now polished it off and released it for public consumption under the GPLv3.

smartsim tv

SmartSim running on the Raspberry Pi

SmartSim, just to make you feel completely sick about what you were doing when you were 16/17 (me? I spent the year on boys, tie-dye cheesecloth and Doc Martens boots), came out of Ashley’s A Level computing project, which he completed (getting, of course, an A* grade) in his first year of sixth form. At a school that didn’t offer electronics or computing – so he ended up teaching himself. Ashley says:

It was at this point I realised the only way I was going to achieve my goal was to take the matter into my own hands and independently study for my computing A-level; surely they couldn’t stop me doing that. The school said fine, we can enter you for the exams when you’re ready to take them, but on the strict understanding you don’t require any teaching resource. So I got hold of the appropriate textbooks and embarked on my course of self-study.

As I was following my own agenda, I decided to challenge myself by studying for the three written exams alongside my GSCEs in year 11. I was only going to do the AS-level part at first, but found it so interesting I just couldn’t stop, so I simply kept on going.

Project report

Ashley’s 400-page A Level project report

I particularly enjoyed the topics on logic gates, Boolean algebra, computer organisation and architecture, Turing machines, finite state machines and simulation. Driven by my desire to learn more about digital logic and electronics, I decided to choose a project relating to these areas. Another main aim of my project was that I wanted it to be of benefit and interest to anyone seeking to learn about these aspects of computing. With these points in mind I decided to develop SmartSim, a cross-platform digital logic circuit design and simulation package for Windows and Linux.

You can read more about the downright remarkable development of the project, and the headaches we inadvertently gave him (sorry Ashley) when it turned out he wasn’t able to get his hands on a Raspberry Pi until this May, on Ashley’s website.

SmartSim GUI

The SmartSim GUI – this is a RISC chip partway through development.

If you’re using one of the Foundation’s Raspbian-based images, you can give it a try by just doing `sudo apt-get update && sudo apt-get install smartsim`. You might want to play with one of the example projects, or check out the rather extensive user manual. Ashley will be hanging out in the comments and I’m sure would greatly appreciate any feedback. Do send bug reports (and patches!) via the SmartSim GitHub page.

Thanks so much, Ashley; and I’m sorry it took me a little while to get this post up. I really hope you apply to the lab here for your university course – I can think of some summer projects you might like to get your teeth into!

48 comments

Avatar

Doesn’t work on ubuntu…

Avatar

Seriously? That’s all you’ve got?

Avatar

Yeah seriously, it’s called feedback. Do you know how to fix it?
I issued a bug report on github.

Avatar

That is not called feedback. It’s called complaining.

Avatar

SNERK!
Cool answer … Thank You.

Avatar

Oh, the Internet :(.

Adrian, whilst your comment certainly does convey that you’ve encountered a problem it certainly doesn’t do it in an appropriate way. Additionally, this isn’t the place to report such an issue.

Avatar

May I point you to “How to report bugs effectively” by Simon Tatham: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html :)

More information will help Ashley track down the problem, though I have to say it works wonderfully for me on my Ubuntu install.

Avatar

Should go like this:

sudo apt-get install librsvg2-dev libgtk2.0-dev libglib2.0-dev libxml2-dev git-core
git clone git://github.com/ashleynewson/SmartSim.git
cd SmartSim
./configure
make
make install

The only problem is that it does not compile on my Ubuntu 12.04. I will try to find out what is wrong after I finish work.

Avatar

The binary from: http://smartsim.org.uk/downloads/linux_x86_64/smartsim.tar.gz
work just fine.

Too bad I can’t figure out what’s wrong with building from source.

Avatar

Thanks for the heads up about the compilation problem. I’ve found the problem and have solved the issue; the GitHub repository is update. The issue was related to using LDFLAGS rather than LDADD in the ccode Makefile.am.

Please could you reply to let me know if it’s fixed.
Thank you! :)

Avatar

Fixed :)
Thanks!

Avatar

This looks good – I’ve been using logicly for a while, but this looks like it has a few things it’s missing… Definitely giving it a try.

Avatar

Excellent ! :) One of my friends did a VERY VERY simple graphical Gate Simulator for his A Level project way back in about 1987. It could only do a few gates and I am not tooo sure that it could do feed back ie Flip Flops might not have been possible.
So to get something as complex as this is very impressive, also to be self taught is even better !
Congratulations !

Avatar

As a “grumpy old git” (according to my wife) I’d just like to say that Ashley has done himself proud. I remember trying to teach myself Digital Electronics and failing miserably.

I wish Ashley all the best for his future. I’m off to download and try out his software.

Well done. I am seriously impressed. And that’s before I’ve even seen the SmartSim.

Cheers,
Norm.

Avatar

As one of those odd people who use Minecraft for circuit building (your redstone opens a door? Mine operates an 8-bit ALU :D ) this looks amazing. I’ve been looking for a way to transfer my skills to real systems for a while, and this might be it :)

Avatar

The best I’ve managed in minecraft was a 1/2 bit binary adder (-:

Avatar

Our boss in the office has put a complete ban on anyone mentioning Minecraft, even got us a swear jar that we’re supposed to put a pound in if someone forgets. So now, it’s officially known as ThingyCraft :)

Avatar

Well done Ashley! inspiring stuff.. I’ll be reading some more on your website.

Avatar

Thanks Ashley! I am studying electronics and I am a Linux User. For long time I was looking for a tool like this, where I can simulate circuits and stuff under Linux, because the ones I know don’t are too good, or they are just for winsucks. When I arrive home I will download it to my arch linux ;)
I’ll then give you feedback. Thanks a lot, and keep the great job!

Avatar

winsucks? really?

Avatar

I can’t try this out at the moment, but I just have to say you’ve done a fantastic job – teaching yourself and getting a brilliant grade, well done.

Avatar

I’m in awe. Period.

Avatar

Dude!

Avatar

Wow. Very impressive.

Avatar

I’ve just given SmartSim a try and I must say it’s pretty damn good as far as I can see. It’s slick, easy to use, looks great and seems to do exactly what it says on the tin.
I’m also pleasantly surprised by its performance on a fairly large circuit I concocted.
Fantastic stuff Ashley… and if you haven’t got your Pi yet, it even runs on other Linux platforms and Windows – what sort of sorcery is this!

Avatar

SmartSim looks amazing. I’ll surely try it out next time I build a robot or something.
P.S, When will the results of the Summer Programming Contest be published? Just curious.

Avatar

Amazing work! Does this program incorporate the concept of gate delays, eg. when drawing the signals on a timing diagram, or are all the gates instantaneous from input to output?

Avatar

WOW im shocked There is STILL an A level in computing. I got an A in mine in 1984! My project documentation was only 200pages of daisy wheel printed document, on the “C” compiler and optomizer, i implemented. It cost 50 squid to print….. But in 15 years of doing interviews I have never met another computer programmer with the same qulification.

Avatar

Though… I have just dug out my O and A level text books from the time and “logic gates, Boolean algebra, computer organisation and architecture, Turing machines, finite state machines” where in the 1982 O-Level, and only briefly touched upon in the 1984 A level.

Avatar

I’ve now had a chance to try out SmartSim on three different platforms and I must say I’m seriously impressed with it’s multi-platform capability – it looks and feels identical on all three and the circuit files it creates transfer between the different versions seamlessly.
We expend huge amounts of effort getting things as complex as this working reliably on one platform, let alone three!
I don’t know where you’ll end up or what you’ll be doing in the future, but people like you are like gold dust; the big software development companies should be contacting you and offering you a job IMO.

Avatar

Now there is a guy who would actually deserve a free Pi.

If that unbalanced loony crackpot from the other day is following the discussion: It’s normal engineering practice to actually be someone who can DO something with a product before you get a sample.

Avatar

It was really wonderful to see how such a talented individual worked hard and created such volume of work.

Avatar

Good work. He does realise he could easily have submitted this to get his Degree in Computing let alone an A Level. Well done. Now start writing some more widespread commercial software and make yourself financially independant (always a good move).

Avatar

How can we subscribe to this blogs RSS feed?

Avatar

Not got a Pi, not got Linux, and not got a use for this program…

…but just looking at the description and screenshots, I’m still fully in awe of it. The age of the bedroom programmer is not over yet, it would seem. Give that man a Raspi.

When I was 16 going on 17, I’d just finished fighting my teachers to be actually given the chance to do GCSE “Information Technology” … for which they grudgingly ordered in the -standard- level paper … so I’ve got a C in it, representing a 100% scored gained with 30 minutes easy work and an hour of thumb twiddling.

I wish we’d known that independent registration for stuff like this was an option. Would probably have sucked at it, but I’d have cherished an “E” at A-level scored when still a year or two too young in a interesting and useful subject more than that C showing that, wow, I’d learnt how to use a word processor. In 1998.

Avatar

You don’t need a Pi, or Linux for that matter, cos Ashley’s catered for everyone with a Windows version as well; any/all platform versions (including some “here’s one I prepared earlier” examples) can be downloaded from his excellent website http://www.smartsim.org.uk.
Also, you’re never too old (or young) to learn, apparently!

Avatar

Amazing, Im definitely going to be looking at this sometime in the next few weekends (decorating comes first with the missus unfortunately)

“(me? I spent the year on boys”

Liz, Bit too much information there…. sorry couldn’t help that.

Avatar

This is amazing.. maybe I should transfer some redstone knowledge to these digital logic systems to get a better understanding of the whole deal

Though the 400-page manual seems impressive, pasting the source code into word probably gives you more than that. It’s thus easy to see the immense effort that has already gone into this!

Avatar

Great scot! Ashley thats insane.. this deserves the Slashdot.org frontpage!

Avatar

Oh then it’s you who submitted this story ? The copy-paste was not well done, and at this time it seems to have disappeared. Resubmit after a little while !

Avatar

AWESOME !

The binary wouldn’t run on my old fedora but the ./configure; make; make install-strip; trilogy worked smoothly.

I can’t wait to see the VHDL export so people can run the sim on http://ghdl.free.fr/ or synthesise on FPGA !

Really Ashley deserves a lot more than a free Pi board :-)

Avatar

Ooops got a segfault :-D

Avatar

after the crash (and despite another make install-strip) the gates outlines don’t appear anymore, only the pins o_O

Avatar

Amazing – and highly intriguing!
So easy to use, yet so poweful in the complexities it can handle – and even further functionality contemplated!

Smartsim was conceived to be an educational resourceavailable to everyone without cost – what public-spirit!
Ashley says he has some ideas about how to engage with youngsters of 4 – 5 years of age; what an achievement that would be.

Shakespeare said:
“We are such stuff as dreams are made on”;
We may well adapt that slightly to:
“This is such stuff as stars are made on”.

Have a stellar life, Ashley!

Avatar

i’ve buyed a raspberry pi B, but i haven’t received a mail to confirm a purchased object. there are not an email address to contact a seller,please you can give me a contacts for my order? Thank

Avatar

I wish I could have done A-level computing, but they only did ICT at my college which consisted of health and safety and making word documents *yawn*. 400 words for A-Level though!?!!? I didn’t even write that much in my thesis for University!

Avatar

this program is amaizing. there should be a version for every computer, tablet and smart phone. all of us users are lucky that there are developers will in to make free software for us.

Avatar

Wow. Totally cool. Planning to do something with rasberrypi for my college project.

Leave a Comment

Comments are closed