Monday, July 30, 2012

Presentation Day

I hope Steve likes what I've accomplished with this processor. I'm sure proud it. There's lots more I can do, but I did what I set out to do and produced something with polish.
I will continue to post any progress here and post links to future projects.

Sunday, July 15, 2012

More Software work

I think I have the beginnings of some reasonable demo code well on the way.  Currently, it implements writing immediate values to registers, copying registers, using flow control operations to generate delays and call subroutines.  It performs mathematical operations like multiplication, addition and subtraction, logical operations like shift-right logical, xor and "and" operations, and conditional loops, jump-returns and breaks within 293 lines of machine code.

That's right, with a custom array of op-codes, I cannot program in high-level or even assembly language.  I have to write out each instruction as a 64-bit hexadecimal value.  In first year they tell you, "Don't worry, you will never have to even look at machine language.  The worst you will see is inline assembly."

<edit> Here is a link to a video of the work in progress.  There's no audio except the clicking of the switches.

Hardware Complete(-ish); Software on its Way!

It seems that, if I wish to implement a division operator, I will have to generate a whole new component to take care of it.  Quartus will not synthesize a division operator with STD_LOGIC_UNSIGNED elements.  So that may have to be held over for recreational programming time.  Otherwise, my program control operators are working beautifully and my biggest problem has been missing details in my memory initialization file.  But who ever said programming in machine language was fun?  I feel confident that my design meets or exceeds my expectations at this point.  All that remains is the demo and the final report.  As far as I'm concerned, this project already falls under the SUCCESS column.  I'll post a video soon of the working board.

Saturday, July 14, 2012

More good news

Things are swimming along now.  I have successfully tested about 60% of my operation codes with mostly positive results.  Some of my program control ops are having difficulty: notably, JMP and RET.  I would have liked to have those working by now.  I have successfully managed to display a scrolling marquee on the 7-segment HEX components and displayed the state of the switches on the red LEDs.  Now I am working on incrementing the value of the green LEDs with a delay generated by a JMP to a subroutine and a RET to the next stage, but it keeps jumping to the very beginning of the program.  It will take some time to set it up in ModelSim so I've been flashing the board about as frequently as compile-time will allow.  It's late and my brain hurts.  More work for another day.

Software Progress

After some hard work this morning, a preliminary demo program is about 1/3 done.  I'm currently compiling for test right now, which takes about 2.5 minutes on this PC and 5 minutes on my laptop...
more hardware work clearly needs doing but things are looking up!

Friday, July 13, 2012

GREAT SUCCESS!!!!!!!!!


Everything seems to be working much better now.  Of course, I currently have my DE1 counting back from 4,294,967,295 to 0, which may take a bit longer than I want, but we'll see what happens.  Anyway, the registers are taking the right values and the I/O seems to be displaying correctly.  Much testing and machine code is yet to come.  Stay tuned.  Next comes writing the software.

Thursday, July 12, 2012

Problems with memory

Having used the Quartus megafunction wizard to implement my program ROM seems to be causing a great deal of problems at this point in the design phase.  When testing all other aspects of my design in ModelSim, they operate effectively and predictably, but when I re-integrate the memory and flash my DE-1 board, the results become unpredictable.  I can see that values are repeatedly being written to the registers my program calls, but the values are far from predictable.  Since the ROM and its memory initialization file can't be simulated properly by ModelSim, it's next to impossible to pinpoint the source of the data loss.  I have attempted to create a combinational "memory" but that has also had no results thus far.  Can't keep working all night.  Need rest.  More to come...