OT: Learning Verilog
Seairth
Posts: 2,474
Preparing for the day that P3 is started as an open source effort, as well as to better understand some of the P2 conversations, I've started learning Verilog (and CPU design). I finally got around to buying the DE0-Nano, which will help a lot. However, I already know I'm going to have a lot of questions. So, where would be the best place to ask them?
Also, to start things off, I'm particularly interested in understanding instruction pipeline designs. I've looked at the opencores site, but I need something more focused on the topic, with documentation. Any suggestions?
Also, to start things off, I'm particularly interested in understanding instruction pipeline designs. I've looked at the opencores site, but I need something more focused on the topic, with documentation. Any suggestions?
Comments
In terms of where to go try Altera's forum.
And here's a freebie from digilent - a sample from the book Introduction to Digital Design" by Richard E. Haskell & Darrin M. Hanna
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,729,744&Prod=LBE-IDD
Though the book is geared to Xilinx you can use most of it for Quartus. If you like the sample I'd probably buy the book.
I'll take a look at the book. Also, the J1 Forth CPU (http://www.excamera.com/sphinx/fpga-j1.html) that was mentioned in another post recently has been very helpful. While there is no pipelining, the basic CPU concepts are very easy to understand.
Both Altera and Xilinx have example code.
I found "The Verilog Golden Reference Guide" by "Doulos" www.doulos.co.uk from a link on this forum a month or two ago. Haven't had time to read it yet though.
www.fpga4fun.com may also contain some useful info.
However, it should be:
A few additional notes:
Thanks! This is exactly what I'm looking for!
I'll mention two books. You're probably far enough along that you don't need it, but "Verilog by Example: A Concise Introduction for FPGA Design" by Blaine Readler is an excellent primer. I have looked at but have not yet read "Advanced Chip Design, Practical Examples in Verilog" by Mr Kishore K Mishra, but it appears to be very thorough and gets good reviews.
Things like... should I use asnyc muxes or sync ones and things like that.
One simple and clear example of a pipelined processor that you can understand in like 30 mins (if you know nothing about mips), is http://opencores.org/project,mips_16. I also asked myself how exactly a pipeline processor works, and at least in its simplest form, it works as I thought, but the implementation escaped me till I found this, maybe worth a look.
I bought this book: "The Verilog® Hardware Description Language" Donald Thomas und Philip Moorby von Springer, it was really helpful. I understood the basic concepts on how the hw works.
I'd like a book more oriented on real implementation practices now, but not a >100$ monster...
Have fun
We could have a nice verilog sub-forum here
This might be a bit ambitious, but I feel like others in my position (new to CPU hardware design) would find it helpful (particularly if P3 goes "open source"). And there isn't really a good place for this on the forums. So, would others find this useful, or is there a different way and/or location that something like this should be done?
(Note: do not expect any revelations of the internal workings of the P2, or other Parallax products, unless Parallax itself starts providing that information. If I post anything that looks P2-specific, it'll be entirely speculative and will be marked as such.)
That would be a good exercise/goal. I'm not sure what Parallax would think of someone creating a P1 clone on their own site, though.
Also, somewhat related, I should point out that I only intend to cover CPU design as far as FPGA soft cores. As I'm not really interested in making my own ASICs, I won't be focusing on that aspect of CPU design.
I'm only interested in FPGAs myself.Making a P1 clone would be a learning exercise and not intended to compete in any way with what Parallax is doing. Just want to create a simple platform for playing with ideas.
. Small memory from where instructions are fetched (fits a few block-rams)
. Very orthogonal instruction set with no surprises
. 4 clocks per instruction allow to easily do fetch, decode, exec and writeback
. Instruction encoding (effects) help with execution
It is not trivial but simple and very elegant. I should give it another try too